2

I have a simple application using

QT += core gui network webkitwidgets

I've used windeployqt.exe to generate the 32 bits release on my win-10 64 bit computer. When I put the folder on a win-7 64 Bit desktop and double-click the app.exe, it never starts.

I can see it in the task manager, but I can't kill it, and if I try I cannot close the explorer folder in which I double clicked anymore.

I've checked the usual platform, ICU, qwindows.dll, and so on.

http://doc.qt.io/qt-5/windows-deployment.html

EDIT Precisions:

I've compiled with default 32 Bit kit: "build-Test-Desktop_Qt_5_5_1_MinGW_32bit-Release" with "mingw492_32"

I have a package "release" generated by windeployqt.exe using the --webkit switch. I start a command prompt:

> set path=
> set mingw=
  • Then I make sure that no Qt/Mingw things exists anymore in my environment variables.
  • I also rename "c:\Qt" into "c:\ __Qt".
  • I move my release folder on my desktop.
  • I start release\test.exe ( from the clean path shell )

Everything runs fine! So The release/test.exe has everything it needs without the path/mingw variable.

But as soon as I put the folder on another windows machine ( 7 instead of 10 ) it never starts.

  • I tried dependency walker. It shows a lot of "API-MS-WIN*.dll" missing...
  • It even shows much more missing dlls on the "good" machine than on the bad one !!!
  • Every single "missing dll" on the "bad" target machine is actually in system32 on this machine.

Thanks for advice, every advice is welcome, I'm a bit desperate... :)

Edit

It seems to be related to the machine itself. I have successfully deployed this (very small) app to 2 non developer machine on win7 and win8 respectively. But the above "bad machine" still resits running it...

Edit

The problem seems not to be general but related to this one particular machine. Hence, feel free to close or move to the appropriate forum as it is not related to Qt/windeplyqt. If I figure out a solution, and question is closed, I'll simply add a last edit. Safe Boot and malwarebyte are my next actions.

user2346536
  • 1,464
  • 2
  • 21
  • 43
  • 1
    What compiler do you use? Did you copy the compiler dlls with your app? For example, for msvc 2010 compiler you need to redist msvcp100.dll and msvcr100.dll – Vladimir Bershov Jan 25 '16 at 01:15
  • 3
    Get a copy of Dependency Walker and see which DLLs your application is trying to load. Chances are, at least one is missing. – MrEricSir Jan 25 '16 at 02:17
  • @VladimirBershov, I used mingw. the mingw files ( LIBWINPTHREAD-1.DLL LIBGCC_S_DW2-1.DLL LIBSTDC++-6.DLL) were already inside. – user2346536 Jan 25 '16 at 06:07
  • @MrEricSir , I tried dependency walker. It shows more missing DLLs on the machine on which it runs fine than on the one on which it does not run at all.... The missing DLLs on the "bad" machine are some of the "win-api*" ones, which I've all found under system 32 anyway! – user2346536 Jan 25 '16 at 07:08
  • 1
    @user2346536, [This is a serious problem.](https://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems) **way 1:** upload an archive with your program to some file sharing service and let us a link, we will try to help. You may remove a part of a functionality if you don't want to show it. **way 2:** Give us a full list of missing dlls that dependency walker shows. **way 3**. Carefully watch the **output** of your project while starting it in IDE and try to find which references your project is calling and check. – Vladimir Bershov Jan 26 '16 at 17:10
  • @VladimirBershov please find here the package and the dependency walker image. ftp://62.210.105.111/ – user2346536 Jan 26 '16 at 22:39
  • @VladimirBershov, so you have a context. The app is fairly simple. It is a 1h work (I do not use Qt often...) to catch clipboard and automatically show 3 main translation websites. It is because some interpreters/translators around me perform these actions about 1000 times a day. I probably saved them 2-3 seconds for each :) It is intended as a first draft. Feature will be added on demand... If I can deploy! – user2346536 Jan 26 '16 at 22:41
  • @VladimirBershov, I have been able to deploy it to a non developer machine (no Qt installed) on both Win8 and Win7. But not on every supposedly compatible machine... – user2346536 Jan 26 '16 at 22:43
  • 1
    @user2346536, I have tested your app on a several computers with Win7, including on an absolutely clean virtual machines with win7 x64, and it works fine. Have you got only one problem machine? Are you sure that its operating system works correct? Did you check a system errors on it, for example, did you run a `sfc /scannow` command? Did you check viruses/malware? Are all the standard system services run on that "bad" machine?... – Vladimir Bershov Jan 27 '16 at 16:54
  • @VladimirBershov, the "bad" machine user is working away and will be back on Sunday. It is a one year old win 7 64bit install, and it runs fine for a normal office/internet/multimedia use. I've checked on a few extra machine, it seems to be the only one with the problem. **So feel free to close as the problem seems not to be related to Qt/Windeployqt.** I'll follow your advice and run "sfc /scannow" ; run malwarebytes and try to run the app after safe/minimal boot. – user2346536 Jan 27 '16 at 19:04
  • @VladimirBershov , after sfc /scannow, malwarebytes , safe mode, run as admin, trying to see everything the process was doing with process monitor, startng as admin in safe mode.... **The solution was to add the folder to avast exceptions**, Thanks for your help. – user2346536 Feb 07 '16 at 23:15

1 Answers1

1

After a long investigation.


  1. Do not believe dependency walker, it used to be a top notch tool but it is now outdated.
  2. If there is a missing dll, the system will prompt you with "cannot load dll xxx.dll" anyway.
  3. Your best shot in case a soft runs on machine X but not on Machine Y is:

    1. start in safe mode ( run: msconfig --> diagnostic startup )
    2. turn off any antivirus or non microsoft/driver software,
    3. "run as administrator".
  4. If you can run with step 3. Then proceed by elimination:

    1. run without admin rights,
    2. Start anti spyware, etc...
    3. Add appropriate exception to your antivirus if it is the root cause.
    4. If the antivirus is not the root cause, run process monitor on both machines. Then compare, what Failed on one machine and not the other ? Read the windows event log and compare any error messages on both machines.
  5. run sfc /scannow to check disk
  6. run a complete anti spyware scan/ pc-repair tool ( malwarebytes, combofix, ... )
  7. Make sure you really have the very same package on both machines, make sure you are not trying to run an exe on mac OS, make sure your computer is on.
  8. Call the oracle, you are in the matrix...

In my case the problem was Avast and it was solved by adding appropriate exception.

user2346536
  • 1,464
  • 2
  • 21
  • 43