Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-23 Thread alexander golks
Am Tue, 22 Mar 2022 09:28:05 -0300
schrieb Thiago Macieira :

> On Tuesday, 22 March 2022 04:13:27 -03 Alexander Dyagilev wrote:
> > Why does it attempts to load this driver at all, if QT_OPENGL=software
> > is set?..  
> 

first i laughed having seen exact same error message at a colleague's vs 
debugger session,
just while this thread is active xD.

but:
we're currently working via rdp, so maybe having same "virtual" use case, also 
an ati graphics card is involved.

our solution:
quick search revelead:
  
https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/AutoCAD-startup-error-load-liabrary-failed-with-error-87.html
and followed the solution to rename the "atig6pxx.dll", yet is was 
c:\windows\syswow64\atiglpxx.dll, as the debugger stacktrace showed atiglpxx 
instead of atig6pxx.
now our qt program runs again in debugger session in rdp session.

maybe it helps for now for you, too.

alex

-- 
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-22 Thread Thiago Macieira
On Tuesday, 22 March 2022 04:13:27 -03 Alexander Dyagilev wrote:
> Why does it attempts to load this driver at all, if QT_OPENGL=software
> is set?..

Please turn on the debug logging for category "qt.qpa.gl" and see what it said 
for this debug line:

qCDebug(lcQpaGl) << "Qt: Using WGL and OpenGL from" << openglDll;

That second argument is the name of the DLL that Qt is trying to use.

Since you asked for software rendering, that should be "opengl32sw". If you 
see something other than that here, check if you didn't set QT_OPENGL_DLL in 
the environment, that QT_OPENGL=software is indeed set and that no other 
errors in loading happened.

That said, this comment in the source is relevant:

if (moduleIsNotOpengl32()) {
// Load opengl32.dll always. GDI functions like ChoosePixelFormat do
// GetModuleHandle for opengl32.dll and behave differently (and call 
back into
// opengl32) when the module is present. This is fine for dummy 
contexts and windows.
QSystemLibrary::load(L"opengl32");
}

Looks like it always loads opengl32 anyway and one of the functions it may use 
for it is ChoosePixelFormat, which is in your stack trace:

opengl32.dll!wglChoosePixelFormat()
gdi32full.dll!ChoosePixelFormat()
qwindows.dll!7ffcede270ae()

It might be that one of those safe uses from GDI is not safe because your 
video card driver is broken. I suggest you contact your vendor for help.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-22 Thread Alexander Dyagilev
I'm not telling that it's a solely Qt issue. But maybe there is a 
workaround?


Why does it attempts to load this driver at all, if QT_OPENGL=software 
is set?..



On 3/22/2022 9:25 AM, Henry Skoglund wrote:
If you google for that video driver **atig6pxx.dll** you'll find 
non-Qt programs that also exhibit the same error 87, for example AutoCAD:
https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/AutoCAD-startup-error-load-liabrary-failed-with-error-87.html 




___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-21 Thread Henry Skoglund

On 2022-03-22 07:11, Alexander Dyagilev wrote:

Hello,

The stack trace is the following. Should I file a bug report? Is there 
a workaround I can suggest to the user?


win32u.dll!NtUserWaitMessage()
user32.dll!DialogBox2()
user32.dll!InternalDialogBox()
user32.dll!SoftModalMessageBox()
user32.dll!MessageBoxWorker(struct _MSGBOXDATA *)
user32.dll!MessageBoxTimeoutW()
user32.dll!MessageBoxTimeoutA()
user32.dll!MessageBoxA()
atig6pxx.dll!7ffd04194e11()
atig6pxx.dll!7ffd0419526e()
opengl32.dll!pgldrvLoadAndAllocDriverInfo()
opengl32.dll!LoadAvailableDrivers()
..



On 3/18/2022 6:41 AM, Thiago Macieira wrote:

On Thursday, 17 March 2022 19:50:45 PDT Alexander Dyagilev wrote:

This error message is shown by Windows OS when it's failed to load a
library the process sayed it to load.

I.e. Qt calls LoadLibrary (directly, or by loading some other modules
which calls it to load another modules they depends on).

Short googling tells that it's an graphics card driver related issue
(e.g. https://github.com/spyder-ide/spyder/issues/10084).

But, maybe there is some known work around for this...
If you can generate a backtrace from the application at the moment 
that dialog
is shown, it can help pinpoint what was being loaded and where from. 
There are

too many LoadLibrary in the source code to guess which one has incorrect
parameters.





If you google for that video driver **atig6pxx.dll** you'll find non-Qt 
programs that also exhibit the same error 87, for example AutoCAD:

https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/AutoCAD-startup-error-load-liabrary-failed-with-error-87.html

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-21 Thread Alexander Dyagilev

Hello,

The stack trace is the following. Should I file a bug report? Is there a 
workaround I can suggest to the user?


win32u.dll!NtUserWaitMessage()
user32.dll!DialogBox2()
user32.dll!InternalDialogBox()
user32.dll!SoftModalMessageBox()
user32.dll!MessageBoxWorker(struct _MSGBOXDATA *)
user32.dll!MessageBoxTimeoutW()
user32.dll!MessageBoxTimeoutA()
user32.dll!MessageBoxA()
atig6pxx.dll!7ffd04194e11()
atig6pxx.dll!7ffd0419526e()
opengl32.dll!pgldrvLoadAndAllocDriverInfo()
opengl32.dll!LoadAvailableDrivers()
opengl32.dll!__DescribePrimaryPixelFormat()
opengl32.dll!wglNumHardwareFormats()
opengl32.dll!wglDescribePixelFormat()
opengl32.dll!wglChoosePixelFormat()
gdi32full.dll!ChoosePixelFormat()
qwindows.dll!7ffcede270ae()
qwindows.dll!7ffcede291ae()
qwindows.dll!7ffcedded786()
qwindows.dll!7ffceddee0d1()
qwindows.dll!7ffceddedaa9()
Qt5Quick.dll!QSGRenderLoop::instance() Line 200    C++
Qt5Quick.dll!QQuickWindowPrivate::init(QQuickWindow * c, 
QQuickRenderControl * control) Line 636    C++
Qt5Quick.dll!QQuickWindow::QQuickWindow(QQuickWindowPrivate & dd, 
QWindow * parent) Line 1388    C++
Qt5Quick.dll!QQuickWindowQmlImpl::QQuickWindowQmlImpl(QWindow * parent) 
Line 75    C++
Qt5QuickTemplates2.dll!QQuickApplicationWindow::QQuickApplicationWindow(QWindow 
* parent) Line 351    C++

qtquicktemplates2plugin.dll!7ffcffb010b1()
Qt5Qml.dll!QQmlType::create(QObject * * out, void * * memory, unsigned 
__int64 additionalMemory) Line 1045    C++
Qt5Qml.dll!QQmlObjectCreator::createInstance(int index, QObject * 
parent, bool isContextObject) Line 1166    C++
Qt5Qml.dll!QQmlObjectCreator::create(int subComponentIndex, QObject * 
parent, QQmlInstantiationInterrupt * interrupt) Line 203    C++
Qt5Qml.dll!QQmlObjectCreator::createInstance(int index, QObject * 
parent, bool isContextObject) Line 1202    C++
Qt5Qml.dll!QQmlObjectCreator::create(int subComponentIndex, QObject * 
parent, QQmlInstantiationInterrupt * interrupt) Line 203    C++
Qt5Qml.dll!QQmlComponentPrivate::beginCreate(QQmlContextData * context) 
Line 883    C++

Qt5Qml.dll!QQmlComponent::create(QQmlContext * context) Line 795    C++
Qt5Qml.dll!QQmlApplicationEnginePrivate::finishLoad(QQmlComponent * c) 
Line 137    C++
Qt5Qml.dll!QQmlApplicationEnginePrivate::startLoad(const QUrl & url, 
const QByteArray & data, bool dataFlag) Line 121 C++

Qt5Qml.dll!QQmlApplicationEngine::load(const QUrl & url) Line 266    C++
fdm.exe!AppQmlModule::initialize(bool)    C++
vmsclshared.dll!QtAbstractComplexModule::onModuleInitializeRunning(bool,bool) 
C++

fdm.exe!AppModule::onModuleInitializeRunning(bool,bool)    C++
[Inline Frame] Qt5Core.dll!QtPrivate::QSlotObjectBase::call(QObject *) 
Line 394    C++

Qt5Core.dll!QMetaCallEvent::placeMetaCall(QObject * object) Line 525    C++
Qt5Core.dll!QObject::event(QEvent * e) Line 1261    C++
Qt5Widgets.dll!QApplicationPrivate::notify_helper(QObject * receiver, 
QEvent * e) Line 3652    C++
Qt5Widgets.dll!QApplication::notify(QObject * receiver, QEvent * e) Line 
3604    C++
Qt5Core.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent 
* event) Line 1088    C++
[Inline Frame] Qt5Core.dll!QCoreApplication::sendEvent(QObject *) Line 
1476    C++
Qt5Core.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * 
receiver, int event_type, QThreadData * data) Line 1825    C++

qwindows.dll!7ffcede4335f()
Qt5Core.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, 
unsigned __int64 wp, __int64 lp) Line 250    C++

user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchMessageWorker()
Qt5Core.dll!QEventDispatcherWin32::processEvents(QFlagsQEventLoop::ProcessEventsFlag> flags) Line 650    C++

qwindows.dll!7ffcede43339()
[Inline Frame] Qt5Core.dll!QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag>) Line 138    C++
Qt5Core.dll!QEventLoop::exec(QFlags 
flags) Line 225    C++

Qt5Core.dll!QCoreApplication::exec() Line 1389    C++
fdm.exe!App::runImpl(void)    C++
fdm.exe!App::run(bool)    C++
fdm.exe!main()    C++
fdm.exe!WinMain()
[Inline Frame] fdm.exe!invoke_main() Line 102    C++
fdm.exe!__scrt_common_main_seh() Line 288    C++
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

On 3/18/2022 6:41 AM, Thiago Macieira wrote:

On Thursday, 17 March 2022 19:50:45 PDT Alexander Dyagilev wrote:

This error message is shown by Windows OS when it's failed to load a
library the process sayed it to load.

I.e. Qt calls LoadLibrary (directly, or by loading some other modules
which calls it to load another modules they depends on).

Short googling tells that it's an graphics card driver related issue
(e.g. https://github.com/spyder-ide/spyder/issues/10084).

But, maybe there is some known work around for this...

If you can generate a backtrace from the application at the moment that dialog
is shown, it can help pinpoint what was being loaded and where from. There are
too many LoadLibrary in the source code to guess which one has incorrect
parameters.

Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-18 Thread Björn Schäpers
If you can use the Process Monitor from SysInternals you can also see which 
library should be loaded.


But I don't know it that has an command line interface.

Am 18.03.2022 um 05:19 schrieb Alexander Dyagilev:

Yes. But what I meant is that it has to be triggered by Qt somehow.

As a first attempt I asked the user to set QT_OPENGL env var to "software". 
This did not help. So it's probably not related to OpenGL.


Anyway, thanks to Thiago Macieira, I asked the user to send me the dump file. 
Let's see. :)



On 3/18/2022 6:52 AM, Henry Skoglund wrote:

On 2022-03-18 04:41, Thiago Macieira wrote:

On Thursday, 17 March 2022 19:50:45 PDT Alexander Dyagilev wrote:

This error message is shown by Windows OS when it's failed to load a
library the process sayed it to load.

I.e. Qt calls LoadLibrary (directly, or by loading some other modules
which calls it to load another modules they depends on).

Short googling tells that it's an graphics card driver related issue
(e.g. https://github.com/spyder-ide/spyder/issues/10084).

But, maybe there is some known work around for this...

If you can generate a backtrace from the application at the moment that dialog
is shown, it can help pinpoint what was being loaded and where from. There are
too many LoadLibrary in the source code to guess which one has incorrect
parameters.

Hi, note: it's not certain that the LoadLibrary error is from Qt, for example 
a similar error:
"Load Library failed with error 126: The specified module could not be 
found." was found to be from within the bowels of Windows itself (non-Qt apps 
also got this error).
More here about error 126: 
https://forum.qt.io/topic/132880/qt-creator-error-126-running-on-windows-10-via-rdp


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-18 Thread Scott Bloom
If there is an error in LoadLibrary, qt will get the error message from the 
windows system, and then print it out.



-Original Message-
From: Interest  On Behalf Of Alexander Dyagilev
Sent: Thursday, March 17, 2022 9:20 PM
To: fro...@tungware.se; interest@qt-project.org
Subject: Re: [Interest] Windows: "loadlibrary failed with error 87" on a 
configuration with a fake video card?

Yes. But what I meant is that it has to be triggered by Qt somehow.

As a first attempt I asked the user to set QT_OPENGL env var to "software". 
This did not help. So it's probably not related to OpenGL.

Anyway, thanks to Thiago Macieira, I asked the user to send me the dump file. 
Let's see. :)


On 3/18/2022 6:52 AM, Henry Skoglund wrote:
> On 2022-03-18 04:41, Thiago Macieira wrote:
>> On Thursday, 17 March 2022 19:50:45 PDT Alexander Dyagilev wrote:
>>> This error message is shown by Windows OS when it's failed to load a
>>> library the process sayed it to load.
>>>
>>> I.e. Qt calls LoadLibrary (directly, or by loading some other modules
>>> which calls it to load another modules they depends on).
>>>
>>> Short googling tells that it's an graphics card driver related issue
>>> (e.g. https://github.com/spyder-ide/spyder/issues/10084).
>>>
>>> But, maybe there is some known work around for this...
>> If you can generate a backtrace from the application at the moment 
>> that dialog
>> is shown, it can help pinpoint what was being loaded and where from. 
>> There are
>> too many LoadLibrary in the source code to guess which one has incorrect
>> parameters.
>>
> Hi, note: it's not certain that the LoadLibrary error is from Qt, for 
> example a similar error:
> "Load Library failed with error 126: The specified module could not be 
> found." was found to be from within the bowels of Windows itself 
> (non-Qt apps also got this error).
> More here about error 126: 
> https://forum.qt.io/topic/132880/qt-creator-error-126-running-on-windows-10-via-rdp
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-17 Thread Alexander Dyagilev

Yes. But what I meant is that it has to be triggered by Qt somehow.

As a first attempt I asked the user to set QT_OPENGL env var to 
"software". This did not help. So it's probably not related to OpenGL.


Anyway, thanks to Thiago Macieira, I asked the user to send me the dump 
file. Let's see. :)



On 3/18/2022 6:52 AM, Henry Skoglund wrote:

On 2022-03-18 04:41, Thiago Macieira wrote:

On Thursday, 17 March 2022 19:50:45 PDT Alexander Dyagilev wrote:

This error message is shown by Windows OS when it's failed to load a
library the process sayed it to load.

I.e. Qt calls LoadLibrary (directly, or by loading some other modules
which calls it to load another modules they depends on).

Short googling tells that it's an graphics card driver related issue
(e.g. https://github.com/spyder-ide/spyder/issues/10084).

But, maybe there is some known work around for this...
If you can generate a backtrace from the application at the moment 
that dialog
is shown, it can help pinpoint what was being loaded and where from. 
There are

too many LoadLibrary in the source code to guess which one has incorrect
parameters.

Hi, note: it's not certain that the LoadLibrary error is from Qt, for 
example a similar error:
"Load Library failed with error 126: The specified module could not be 
found." was found to be from within the bowels of Windows itself 
(non-Qt apps also got this error).
More here about error 126: 
https://forum.qt.io/topic/132880/qt-creator-error-126-running-on-windows-10-via-rdp


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-17 Thread Henry Skoglund

On 2022-03-18 04:41, Thiago Macieira wrote:

On Thursday, 17 March 2022 19:50:45 PDT Alexander Dyagilev wrote:

This error message is shown by Windows OS when it's failed to load a
library the process sayed it to load.

I.e. Qt calls LoadLibrary (directly, or by loading some other modules
which calls it to load another modules they depends on).

Short googling tells that it's an graphics card driver related issue
(e.g. https://github.com/spyder-ide/spyder/issues/10084).

But, maybe there is some known work around for this...

If you can generate a backtrace from the application at the moment that dialog
is shown, it can help pinpoint what was being loaded and where from. There are
too many LoadLibrary in the source code to guess which one has incorrect
parameters.

Hi, note: it's not certain that the LoadLibrary error is from Qt, for 
example a similar error:
"Load Library failed with error 126: The specified module could not be 
found." was found to be from within the bowels of Windows itself (non-Qt 
apps also got this error).
More here about error 126: 
https://forum.qt.io/topic/132880/qt-creator-error-126-running-on-windows-10-via-rdp


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-17 Thread Thiago Macieira
On Thursday, 17 March 2022 19:50:45 PDT Alexander Dyagilev wrote:
> This error message is shown by Windows OS when it's failed to load a
> library the process sayed it to load.
> 
> I.e. Qt calls LoadLibrary (directly, or by loading some other modules
> which calls it to load another modules they depends on).
> 
> Short googling tells that it's an graphics card driver related issue
> (e.g. https://github.com/spyder-ide/spyder/issues/10084).
> 
> But, maybe there is some known work around for this...

If you can generate a backtrace from the application at the moment that dialog 
is shown, it can help pinpoint what was being loaded and where from. There are 
too many LoadLibrary in the source code to guess which one has incorrect 
parameters. 

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-17 Thread Alexander Dyagilev
This error message is shown by Windows OS when it's failed to load a 
library the process sayed it to load.


I.e. Qt calls LoadLibrary (directly, or by loading some other modules 
which calls it to load another modules they depends on).


Short googling tells that it's an graphics card driver related issue 
(e.g. https://github.com/spyder-ide/spyder/issues/10084).


But, maybe there is some known work around for this...

On 3/18/2022 5:28 AM, Thiago Macieira wrote:

On Thursday, 17 March 2022 19:15:01 PDT Alexander Dyagilev wrote:

"but when this is enabled, and if you try to open application it does
not open and always throw error "loadlibrary failed with error 87".".

I assume LoadLibrary was incorrectly lowercased in your copy & paste. None of
the following appears in Qt sources at all:

"%s failed with error"
"LoadLibrary failed with error"

Even the search for "failed with" only shows results that could not produce
the message you pasted.

So either your message is incorrect or it doesn't come from Qt.


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-17 Thread Thiago Macieira
On Thursday, 17 March 2022 19:15:01 PDT Alexander Dyagilev wrote:
> "but when this is enabled, and if you try to open application it does
> not open and always throw error "loadlibrary failed with error 87".".

I assume LoadLibrary was incorrectly lowercased in your copy & paste. None of 
the following appears in Qt sources at all:

"%s failed with error"
"LoadLibrary failed with error"

Even the search for "failed with" only shows results that could not produce 
the message you pasted.

So either your message is incorrect or it doesn't come from Qt.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Windows: "loadlibrary failed with error 87" on a configuration with a fake video card?

2022-03-17 Thread Alexander Dyagilev

Hello,

One of our users has reported issue and asks for help. I don't know what 
it can possible be, but I believe it's caused by Qt.


User says:

"in a computer running without a screen/monitor attached, I've created a 
fake/dummy card, using this tool: 
https://www.amyuni.com/forum/viewtopic.php?t=3030 
 in order to have a 
proper resolution in remote connections, instead of 640x480.


"but when this is enabled, and if you try to open application it does 
not open and always throw error "loadlibrary failed with error 87".".


We use QML (Quick Controls 2) in our app. Qt 5.12.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest