QT deployed executable crashes on some computers
-
In addition to my fellows, did you compare the hardware of these machines ? Especially on the graphical card side.
-
Have you tried running your app on the crashing PCs using the Remote Desktop? I.e. turning on the switch "Enable Remote Desktop" in Settings and then remotely running those PCs from your development PC using the Remote Desktop Client
@hskoglund I use remote desktop at all computers :) (though I tried directly using the computers as well)
@SGaist , as I mentioned I also doubt about the graphic cards initially. But I tried on two computers with same specifications including graphic cards (GeForce 605) and both have now same nVidia drivers. And executable crashes only on one of them.
Following is the event viewer log of the crash, maybe someone can take a hint:
"Faulting application name: svchost.exe_TermService, version: 10.0.18362.1, time stamp: 0x32d6c210
Faulting module name: ntdll.dll, version: 10.0.18362.267, time stamp: 0xc00f8a30
Exception code: 0xc0000008
Fault offset: 0x000000000009fe8a
Faulting process ID: 0x5b8
Faulting application start time: 0x01d5a2cd25825160
Faulting application path: C:\WINDOWS\System32\svchost.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report ID: 9b7e234e-f934-4cd5-8ad2-6910fae80b34
Faulting package full name:
Faulting package-relative application ID: " -
@Lati said in QT deployed executable crashes on some computers:
Faulting application name: svchost.exe_TermService
From a quick look that might be network related. Are these computer configured exactly the same ? Connected on the same network ? Is your application using the network ?
-
If possible you should enable minidump creation on one of the computers so you can analyze it later on your system. See e.g. here on how to create them
-
@Lati said in QT deployed executable crashes on some computers:
Faulting application name: svchost.exe_TermService
From a quick look that might be network related. Are these computer configured exactly the same ? Connected on the same network ? Is your application using the network ?
@SGaist, all computers are connected to the company network through LAN.
I am using "webkit" and "webkitwidgets" might be related to the crash?
@Christian-Ehrlicher, I will try that but it is not an easy process since I need permission from our system admin :/
-
"Faulting application name: svchost.exe_TermService,.." means as @SGaist says, it's smells network related.
Try walking up to the crashing PCs, pulling out the network plug and then test your app (but don't tell your system admin about the pulled plug :-)
Edit: Exception code: 0xc0000008 I've seen that when remote debugging across a network, but you get that code also on a Release build?
-
"Faulting application name: svchost.exe_TermService,.." means as @SGaist says, it's smells network related.
Try walking up to the crashing PCs, pulling out the network plug and then test your app (but don't tell your system admin about the pulled plug :-)
Edit: Exception code: 0xc0000008 I've seen that when remote debugging across a network, but you get that code also on a Release build?
@hskoglund I plugged out the network cable, no change (admin is on vacation, he will not realise that :))
I tried again debug executable and I have now following error on the computer where it normally crashes:
-
@hskoglund I plugged out the network cable, no change (admin is on vacation, he will not realise that :))
I tried again debug executable and I have now following error on the computer where it normally crashes:
@Lati
Suggestion then is that your app does indeed attempt to load something off the network?Meanwhile, I don't understand why your program causes
svchost.exe_TermService,.
.svchost
is to do with Windows Services, I wonder why these are involved in running this application? -
@Lati
Suggestion then is that your app does indeed attempt to load something off the network?Meanwhile, I don't understand why your program causes
svchost.exe_TermService,.
.svchost
is to do with Windows Services, I wonder why these are involved in running this application? -
Hmm error 0xc0000007b means there's a mixup of 32-bits and 64-bits .dlls. If your app is 32-bit, perhaps you've copied the msvc runtime library .dlls from C:\Windows\System32?
Note that in Windows the 32-bits MSVC runtime .dlls are found in C:\Windows\SysWOW64 and instead C:\Windows\System32 houses the 64-bits one. -
Hmm error 0xc0000007b means there's a mixup of 32-bits and 64-bits .dlls. If your app is 32-bit, perhaps you've copied the msvc runtime library .dlls from C:\Windows\System32?
Note that in Windows the 32-bits MSVC runtime .dlls are found in C:\Windows\SysWOW64 and instead C:\Windows\System32 houses the 64-bits one.@hskoglund
I noted that too. But users says only happens when network cable unplugged! Normally he gets a0xc0000008
rather than a0xc0000007b
. Strange how that could lead to 32-/64-bit issue?! -
@hskoglund
I noted that too. But users says only happens when network cable unplugged! Normally he gets a0xc0000008
rather than a0xc0000007b
. Strange how that could lead to 32-/64-bit issue?!@JonB No no, I haven't said it happens only when network cable is unplugged. It happens always with or without internet connection.
@hskoglund I wonder if this is the reason because I use the same deployment on all computers. But, I will check that again.
I hope I can solve this "mystery" soon :/
-
@JonB No no, I haven't said it happens only when network cable is unplugged. It happens always with or without internet connection.
@hskoglund I wonder if this is the reason because I use the same deployment on all computers. But, I will check that again.
I hope I can solve this "mystery" soon :/
@JonB No no, I haven't said it happens only when network cable is unplugged. It happens always with or without internet connection.
Read what you have posted and you do seem to say what I wrote. First earlier:
Exception code: 0xc0000008
then later screenshot
0xc0000007b
It's what you have pasted!
Anyway, if you Google for the
0xc0000007b
you will come across 32-/64-bit mis-match. I am not certain whether that always applies, but worth investigating. -
@JonB No no, I haven't said it happens only when network cable is unplugged. It happens always with or without internet connection.
Read what you have posted and you do seem to say what I wrote. First earlier:
Exception code: 0xc0000008
then later screenshot
0xc0000007b
It's what you have pasted!
Anyway, if you Google for the
0xc0000007b
you will come across 32-/64-bit mis-match. I am not certain whether that always applies, but worth investigating.@JonB @hskoglund
Nope, I have re-deployed using windeployqt.exe and copied the necessary dlls from SysWOW64 (again) and still have the same problem.To summarize: I deployed the application created using QT Creator and test the executable on different computers. Deployed files are same on 6 different computers. Executable runs on three computers without any issue and crashes on other three without any indication.
Additionally, I uninstalled all VC++ Runtime installations on one of the computer and installed the ones in the "C:\Qt\vcredist" and still have the same problem.
-
If you have 2 computers pretty near each other, and one of them is of the crashing kind and the other is one the healthy ones, try swapping the network cables, i.e. unplug the network cable going to the healthy PC and instead plug it into the crashing PC, and the other way around.
-
A couple thoughts:
- Make sure you are running the correct version of the deploy tool. I had issues with my deploys where I was running it under the 5.12.2 console when I should be running it under the 5.12.5 console.
- Check for race conditions on when your web data arrives. Is your app relying on the data it grabs and if it doesn't get it in time it will cause a crash.
-
A couple thoughts:
- Make sure you are running the correct version of the deploy tool. I had issues with my deploys where I was running it under the 5.12.2 console when I should be running it under the 5.12.5 console.
- Check for race conditions on when your web data arrives. Is your app relying on the data it grabs and if it doesn't get it in time it will cause a crash.
Ok. I decided to install the Qt on one of the computer where executable crashes. I copied the whole development folder and build the application. I can build the application in Debug and Release without any problem. However, when I try to start the debug with F5, I get following error:
Please note that Qt is installed on D drive. I tried few solutions offered by Google, like copying the Qt dll's in the debug folder which didn't help. I feel very desperate.
@hskoglund
Pc's are a bit far from each other :) I use remote desktop most of the time.@fcarney
I checked that, it is v 5.12.1. I don't know how to be sure which version it should be. -
Ok. I decided to install the Qt on one of the computer where executable crashes. I copied the whole development folder and build the application. I can build the application in Debug and Release without any problem. However, when I try to start the debug with F5, I get following error:
Please note that Qt is installed on D drive. I tried few solutions offered by Google, like copying the Qt dll's in the debug folder which didn't help. I feel very desperate.
@hskoglund
Pc's are a bit far from each other :) I use remote desktop most of the time.@fcarney
I checked that, it is v 5.12.1. I don't know how to be sure which version it should be.Finally! I found where the problem is. I received source code of the one of the libraries I use. And there is following code in the library:
programXRootDirectory = getenv("ProgramXROOT");
And yes, if the environmental variable doesn't exist, executable crashes. Strangely, there is no sign about the crash caused by
getenv
.I will keep this thread, maybe someone else has the same problem.
I would like to thank you everyone who tried to help me so far!
Update:
getenv
is deprecated and_dupenv_s
recommended instead. More information about _dupenv_s -
Finally! I found where the problem is. I received source code of the one of the libraries I use. And there is following code in the library:
programXRootDirectory = getenv("ProgramXROOT");
And yes, if the environmental variable doesn't exist, executable crashes. Strangely, there is no sign about the crash caused by
getenv
.I will keep this thread, maybe someone else has the same problem.
I would like to thank you everyone who tried to help me so far!
Update:
getenv
is deprecated and_dupenv_s
recommended instead. More information about _dupenv_s@Lati said in QT deployed executable crashes on some computers:
Strangely, there is no sign about the crash caused by getenv.
Well, it looks like the culprit isn't getenv() but the way the return value from that function is used within the DLL later on. From man getvenv:
The getenv() function returns a pointer to the value in the environment, or NULL if there is no match.
so
programXRootDirectory
becomes NULL when the variable is not set, and the world ends...