Page 1 of 1

Application hangs on startup in InitHandleExceptionThread()

Posted: Tue Sep 12, 2017 9:13 am
by jmarder
I have a customer which reported that my application no longer starts on his machine, but the process appears in the task manager.

I let the user create a report using MadTraceProcess and the outcome was that the process hangs in MadExcept.InitHandleExceptionThread():

date/time : 2017-09-11, 10:37:55, 543ms
operating system : Windows 10 x64 build 15063
system language : English
system up time : 2 days 23 hours
program up time : 36 seconds
processors : 4x Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
physical memory : 11819/16265 MB (free/total)
free disk space : (C:) 100.20 GB
display mode : 1680x1050, 32 bit
process id : $41cc
allocated memory : 17.55 MB
largest free block : 1.99 GB
executable : TreeSize.exe
exec. date/time : 2017-08-02 13:08
version : 6.3.7.1231
compiled with : BCB XE7
madExcept version : 4.0.18
callstack crc : $1cc6ea91, $1c150d97, $1c150d97

main thread ($2574):
77e3204a +000a ntdll.dll NtOpenFile
004aaf87 +0057 TreeSize.exe madExcept InitHandleExceptionThread
004b912f +1133 TreeSize.exe madExcept Init
0157a6bc +00a4 TreeSize.exe madExcept initialization
0040a6de +0042 TreeSize.exe System 494 +0 InitUnits
0040a747 +003f TreeSize.exe System 494 +0 @StartExe
00410b66 +0042 TreeSize.exe SysInit @InitExe
0157fcce +0016 TreeSize.exe TreeSize 75 +0 initialization
75578742 +0022 KERNEL32.DLL BaseThreadInitThunk

thread $2ad0:
75578742 +22 KERNEL32.DLL BaseThreadInitThunk

thread $2a4c:
75578742 +22 KERNEL32.DLL BaseThreadInitThunk

thread $2ac8:
74ab2bed +fd KERNELBASE.dll WaitForMultipleObjectsEx
75578742 +22 KERNEL32.DLL BaseThreadInitThunk

thread $2688:
74ab35c3 +93 KERNELBASE.dll SleepEx
74ab351a +0a KERNELBASE.dll Sleep
75578742 +22 KERNEL32.DLL BaseThreadInitThunk

thread $2b54:
74ab35c3 +93 KERNELBASE.dll SleepEx
74ab351a +0a KERNELBASE.dll Sleep
75578742 +22 KERNEL32.DLL BaseThreadInitThunk

thread $35e0:
75578742 +22 KERNEL32.DLL BaseThreadInitThunk

Do you have any suggestions what to do?

Re: Application hangs on startup in InitHandleExceptionThrea

Posted: Tue Sep 19, 2017 5:45 pm
by madshi
That appears to be the call to "CreatePipe", I would guess, but I've no idea why that would get stuck. Is it a specific problem with a new version of your application? Did it not occur with older versions of your application? Or did this problem show up for the user at some point (without knowing why) and now it occurs with every version of your application (that has madExcept built in)?

A wild guess could be an anti-malware software thinking that your application (or madExcept) is doing something dangerous. But a freeze in "CreatePipe"? I've never seen this problem reported before!

One thing you could try is to send the customer an "empty" exe file compiled with madExcept, to see if that freeze, too?

Re: Application hangs on startup in InitHandleExceptionThrea

Posted: Tue Sep 19, 2017 6:22 pm
by jmarder
madshi wrote: Is it a specific problem with a new version of your application?
It occurred only once for one customer/machine. The new version is already several weeks old and is successfully used by many other customers.
madshi wrote:Did it not occur with older versions of your application?
No.
madshi wrote:One thing you could try is to send the customer an "empty" exe file compiled with madExcept, to see if that freeze, too?
This is worth a try, I will get back with the result.

I totally agree that this is a strange and unique case, but the customer is somewhat unhappy and the MadTraceProcess report is allt hat I have.

Re: Application hangs on startup in InitHandleExceptionThrea

Posted: Tue Sep 19, 2017 6:48 pm
by madshi
If the empty application doesn't show the problem, then maybe it would be a next step to try different versions of your application?

Re: Application hangs on startup in InitHandleExceptionThrea

Posted: Wed Sep 27, 2017 6:55 am
by jmarder
The problem could not be reproduced with a hello world example. Since this was an absolutely unique case, no further discussion is necessary at this point.