PDA

View Full Version : App becoming white when running on Windows without Qt installed



Momergil
25th November 2015, 16:48
Hi!

Some time ago I successfully compiled a Qt app for Windows and created an installer for it with the traditional .dlls and others that are needed. That app would run properly in my PC both using Qt Creator and when running the installed version. But when I installed it in another PC also with Windows 7, but without Qt installed, I noticed that by passing and clicking the mouse over the screen (the app starts OK) it would become white.

At first I thought that would be a particular problem of that PC so I ignored for the time being.

But now I just finished creating a new installer for another software which would also work well in my PC both inside Qt Creator and when installed. I the installed it in another Windows 7 machine with Qt on it and it worked pretty well. But when I tried it in other 2 Windows 7 machines, both of which doesn't have Qt, the same white screen problem appeared:

11539

To get into the details: if the mouse is passed over one of the buttons, their area becomes white (left image). And if one of the buttons is clicked, what should show another screen in top of the main window, the whole screen becomes white (right image) even the status bar at the top, which is never hidden when other screens are shown.

Trying to find the solution to this problem, I used Dependency Walker to watch for any problems in missing DLLs; no missing DLL was reported and the only strange thing seen was a red value for the Qt5Core.dll in the column "Link Checksum" - which also appeared when I run DW in the second machine with Qt where everything worked OK.

Giving the fact that the only known significant difference between my PC and other where everything worked OK and the 2 machines where I got the white screens were the presence of installed Qt, it would seem that there is still something lacking. But what could it be that Dependency Walker isn't reporting?

Any help appreciated.

d_stranz
26th November 2015, 00:13
Did you install "qwindows.dll" in a "platforms" subdirectory of the directory where your app .exe lives? Are you sure you have installed the release version of your app, and that all Qt DLLs are also release versions? Did you compile your app and Qt (or install it) with the same compiler? Did you link your app against the same version of Qt that you are using as the source for your installation DLLs?

Momergil
26th November 2015, 18:39
Thanks d_stranz for the reply.

The answer is "Yes" for all of your items.

Any other tip?

d_stranz
27th November 2015, 17:33
OK, what other external things might your program depend on? Windows runtime libraries present on your Qt systems but not your non-Qt systems? Images? QML files? If the programs run up without complaints about missing DLLs, then it implies that there is some other dependency you aren't satisfying.

I would suggest trying to get a very simple,"Hello World" QDialog-based app to run. If that works, then it probably isn't a Qt problem.

Momergil
27th November 2015, 18:47
Thanks again for the reply, d_stranz.


I would suggest trying to get a very simple,"Hello World" QDialog-based app to run. If that works, then it probably isn't a Qt problem.

I'm asking myself why I didn't think about that earlier... Either way I tried it and the problem appeared again - it was a QMainWindow with a QLabel installed in the same folder where the real app resides with the same pack of libs, images and etc. around. So I suppose this makes us go back to the DLLS - or to a relation between those and the 2 PCs¹ such as a particular graphics driver and so forth.

Either way thanks. Any other suggestion in mind?

¹: although I tested the Hello World app in only one of them, which I suppose it's enough for that test.

d_stranz
27th November 2015, 19:55
Any other suggestion in mind?

No idea. I'd still suggest a completely independent install of a QDialog-based Hello World app is a fresh directory. If there is a problem with one of the DLLs you have installed with your other app, then running a different EXE from the same directory isn't going to help much with diagnosing the problem.

Momergil
4th December 2015, 19:00
No idea. I'd still suggest a completely independent install of a QDialog-based Hello World app is a fresh directory. If there is a problem with one of the DLLs you have installed with your other app, then running a different EXE from the same directory isn't going to help much with diagnosing the problem.

Hi d_stranz once again!

Well I accepted your last suggestion and did exactly that in one of the buggy machines. This was some days ago so I can't remember for certainty, but if I'm not mistaken everything worked fine then. I then decided to put my app inside its place and, guess what, everything worked fine.

Then I decided to test again (the whole process) in the second machine and the problem appeared again. Funny fact was that when I executed my test app inside a remote repository (with the DLLs there), things got right, but running the exact same app and libs inside a folder located inside the machine, the bug appeared. It didn't take much time, though, for the PC owner report that that could truly be a machine problem since he just found that another app, not developed with Qt, was having the exact same problem.

So, for the time being, I've concluded that the bug was solved (although I'm still not sure why and how).

Thanks for all the help!