Exception when exiting minimal sample

82 views
Skip to first unread message

t...@raisedbar.net

unread,
Aug 15, 2018, 7:18:18 AM8/15/18
to wx-users

Hi,

 

I built the wxWidgets-3.1.0 minimal sample using the provided minimal_vc14.sln using the latest Visual Studio 17 and allowing VS to update the solution file. I then changed the run-time to MTD, as this fits my needs for a new project.

 

The project built and ran, but throws an exception when it exits:

 

'minimal.exe' (Win32): Loaded 'C:\wxWidgets-3.1.0\samples\minimal\vc_mswud\minimal.exe'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\apphelp.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\comdlg32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\SHCore.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.191_none_42ebcb8844e52e49\comctl32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\windows.storage.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\profapi.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\fltLib.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winspool.drv'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcrypt.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\propsys.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msimg32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Program Files\Freedom Scientific\JAWS\2018\x86\jhookSatellite.dll'. Cannot find or open the PDB file.

'minimal.exe' (Win32): Loaded 'C:\Program Files\Freedom Scientific\JAWS\2018\x86\jhook.dll'. Cannot find or open the PDB file.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleacc.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Symbols loaded.

'minimal.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winmmbase.dll'

'minimal.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winmmbase.dll'

'minimal.exe' (Win32): Loaded 'C:\Program Files\Freedom Scientific\JAWS\2018\x86\GdiHooks.dll'. Cannot find or open the PDB file.

'minimal.exe' (Win32): Loaded 'C:\Program Files (x86)\Freedom Scientific\Shared\HookManager\1\HookManager.dll'. Cannot find or open the PDB file.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\psapi.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\UIAutomationCore.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\clbcatq.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\TextInputFramework.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreUIComponents.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreMessaging.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\CoreMessaging.dll'. Symbols loaded.

'minimal.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\CoreMessaging.dll'

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinTypes.dll'. Symbols loaded.

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinTypes.dll'. Symbols loaded.

'minimal.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\WinTypes.dll'

'minimal.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WinTypes.dll'. Symbols loaded.

'minimal.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\WinTypes.dll'

The thread 0x1e0a8 has exited with code 0 (0x0).

The thread 0x1d100 has exited with code 0 (0x0).

The thread 0x1d2d8 has exited with code 0 (0x0).

The thread 0x1d088 has exited with code 0 (0x0).

The thread 0x1c7dc has exited with code 0 (0x0).

The thread 0x1d370 has exited with code 0 (0x0).

The thread 0x1b76c has exited with code 0 (0x0).

Exception thrown at 0x779F47C5 (ntdll.dll) in minimal.exe: 0xC0000005: Access violation reading location 0x00000008.

 

I built Minimal as I was experiencing the same issue with my actual application and I wanted to check the simplest possible case.

 

Any suggestions as to why, please?

 

 

 

Best wishes.

 

Tim Burgess

Raised Bar Ltd.

E: t...@raisedbar.net

M: +44 (0)7989 486976

 

Frédéric

unread,
Aug 15, 2018, 8:11:56 AM8/15/18
to wx-u...@googlegroups.com
> I built the wxWidgets-3.1.0 minimal sample using the provided minimal_vc14.sln using the latest Visual Studio 17 and allowing VS to update the solution file. I then changed the run-time to MTD, as this fits my needs for a new project.

I won't probably help but I just tested minimal built with mingw-w64 +
gcc 8.2.0 and wxWidgets nearly latest master commit, statically linked
and there is no such problem.

F

Igor Korot

unread,
Aug 15, 2018, 8:44:17 AM8/15/18
to wx-u...@googlegroups.com
Hi, Tim,

On Wed, Aug 15, 2018 at 6:18 AM, <t...@raisedbar.net> wrote:
> Hi,
>
>
>
> I built the wxWidgets-3.1.0 minimal sample using the provided
> minimal_vc14.sln using the latest Visual Studio 17 and allowing VS to update
> the solution file. I then changed the run-time to MTD, as this fits my needs
> for a new project.
>
>
>
> The project built and ran, but throws an exception when it exits:

What is the backtrace at the time of the exception?
Did you modify the sample in any way? What did you do after you started it?

Thank you.
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to wx-users+u...@googlegroups.com
> or visit http://groups.google.com/group/wx-users

Eric Jensen

unread,
Aug 15, 2018, 9:24:30 AM8/15/18
to wx-u...@googlegroups.com
Hello Tim,

Wednesday, August 15, 2018, 1:18:15 PM, you wrote:

trn> Hi,

trn> I built the wxWidgets-3.1.0 minimal sample using the provided
trn> minimal_vc14.sln using the latest Visual Studio 17 and allowing
trn> VS to update the solution file. I then changed the run-time to
trn> MTD, as this fits my needs for a new project.

If you change the runtime, you also need to change that for all
projects in the wxWidgets solution and rebuild.

Did you do that?

Eric



--

t...@raisedbar.net

unread,
Aug 15, 2018, 9:55:34 AM8/15/18
to wx-u...@googlegroups.com
Hi,

I definitely changed to MTD for all of the WX projects when I built the libraries, but a thought occurs that this was a little while ago and it may be that my current VS2017 is using a different toolset. I'll rebuild the libs and see what happens.

Best wishes.

Tim Burgess

-----Original Message-----
From: wx-u...@googlegroups.com <wx-u...@googlegroups.com> On Behalf Of Eric Jensen
Sent: 15 August 2018 14:25
To: wx-u...@googlegroups.com
Subject: Re: Exception when exiting minimal sample

Hello Tim,

Wednesday, August 15, 2018, 1:18:15 PM, you wrote:

trn> Hi,

trn> I built the wxWidgets-3.1.0 minimal sample using the provided
trn> minimal_vc14.sln using the latest Visual Studio 17 and allowing VS
trn> to update the solution file. I then changed the run-time to MTD, as
trn> this fits my needs for a new project.

If you change the runtime, you also need to change that for all projects in the wxWidgets solution and rebuild.

Did you do that?

Eric



--

t...@raisedbar.net

unread,
Aug 15, 2018, 10:28:51 AM8/15/18
to wx-u...@googlegroups.com
Hi,

I've double-checked that my libs were all built with MTD specified using the same toolset. I've made no changes to the minimal project other than the change to MTD.

Here's the stack when the exception is thrown:

ntdll.dll!RtlAllocateHeap() Unknown
HookManager.dll!66307ce9() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for HookManager.dll]
HookManager.dll!662fef41() Unknown
HookManager.dll!662d8bf8() Unknown
HookManager.dll!662d8806() Unknown
HookManager.dll!662d873c() Unknown
HookManager.dll!662d85a3() Unknown
HookManager.dll!662d70d9() Unknown
GdiHooks.dll!59cea711() Unknown
[External Code]
> minimal.exe!exit_or_terminate_process(const unsigned int return_code) Line 144 C++
minimal.exe!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 280 C++
minimal.exe!exit(int return_code) Line 293 C++
[External Code]

Best wishes.

Tim Burgess

-----Original Message-----
From: wx-u...@googlegroups.com <wx-u...@googlegroups.com> On Behalf Of Igor Korot
Sent: 15 August 2018 13:44
To: wx-u...@googlegroups.com
Subject: Re: Exception when exiting minimal sample

Eric Jensen

unread,
Aug 15, 2018, 10:48:16 AM8/15/18
to wx-u...@googlegroups.com
Hello Tim,

Wednesday, August 15, 2018, 4:28:49 PM, you wrote:

trn> Hi,

trn> I've double-checked that my libs were all built with MTD
trn> specified using the same toolset. I've made no changes to the
trn> minimal project other than the change to MTD.

trn> Here's the stack when the exception is thrown:

trn> ntdll.dll!RtlAllocateHeap() Unknown
trn> HookManager.dll!66307ce9() Unknown
trn> [Frames below may be incorrect and/or missing, no
trn> symbols loaded for HookManager.dll]
trn> HookManager.dll!662fef41() Unknown
trn> HookManager.dll!662d8bf8() Unknown
trn> HookManager.dll!662d8806() Unknown
trn> HookManager.dll!662d873c() Unknown
trn> HookManager.dll!662d85a3() Unknown
trn> HookManager.dll!662d70d9() Unknown
trn> GdiHooks.dll!59cea711() Unknown
trn> [External Code]
>> minimal.exe!exit_or_terminate_process(const unsigned int return_code) Line 144 C++
trn> minimal.exe!common_exit(const int return_code, const
trn> _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 280 C++
trn> minimal.exe!exit(int return_code) Line 293 C++
trn> [External Code]

The callstack seems to point to JAWS, i think that's the screenreader
you're using?

Do you get the same problem when you don't switch to MTD runtime?

Did you have the same problem with earlier wx and/or VS versions?

Eric

t...@raisedbar.net

unread,
Aug 15, 2018, 11:01:28 AM8/15/18
to wx-u...@googlegroups.com
How did I not spot that? I'll test again using Microsoft Narrator. I'm sure I've seen this before but did the lazy catch-all cludge, but I'm trying to improve the quality of my code.

Best wishes.

Tim Burgess

-----Original Message-----
From: wx-u...@googlegroups.com <wx-u...@googlegroups.com> On Behalf Of Eric Jensen
Sent: 15 August 2018 15:49
To: wx-u...@googlegroups.com
Subject: Re: Exception when exiting minimal sample

Hello Tim,

Wednesday, August 15, 2018, 4:28:49 PM, you wrote:

trn> Hi,

trn> I've double-checked that my libs were all built with MTD specified
trn> using the same toolset. I've made no changes to the minimal project
trn> other than the change to MTD.

trn> Here's the stack when the exception is thrown:

trn> ntdll.dll!RtlAllocateHeap() Unknown
trn> HookManager.dll!66307ce9() Unknown
trn> [Frames below may be incorrect and/or missing, no
trn> symbols loaded for HookManager.dll]
trn> HookManager.dll!662fef41() Unknown
trn> HookManager.dll!662d8bf8() Unknown
trn> HookManager.dll!662d8806() Unknown
trn> HookManager.dll!662d873c() Unknown
trn> HookManager.dll!662d85a3() Unknown
trn> HookManager.dll!662d70d9() Unknown
trn> GdiHooks.dll!59cea711() Unknown
trn> [External Code]
>> minimal.exe!exit_or_terminate_process(const unsigned int
>> return_code) Line 144 C++
trn> minimal.exe!common_exit(const int return_code, const
trn> _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 280 C++
trn> minimal.exe!exit(int return_code) Line 293 C++
trn> [External Code]

The callstack seems to point to JAWS, i think that's the screenreader you're using?

Do you get the same problem when you don't switch to MTD runtime?

Did you have the same problem with earlier wx and/or VS versions?

Eric

t...@raisedbar.net

unread,
Aug 15, 2018, 11:06:41 AM8/15/18
to wx-u...@googlegroups.com
OK, no exception thrown when Narrator is being used as my screen-reader - rats. There's been changes to the way that Jaws gets display information in recent months, so I'll need to backtrack and see if I can find an earlier version that doesn't cause the exception to be thrown. Unfortunately, this also ties in with Windows 10 updates that are forcing Jaws to use different methods. This could end up being a real can of worms, but I'm very grateful to you for spotting what I'd missed.

It's about time they brought out the eyeball 2.0 so that I can upgrade...

Best wishes.

Tim Burgess

-----Original Message-----
From: wx-u...@googlegroups.com <wx-u...@googlegroups.com> On Behalf Of Eric Jensen
Sent: 15 August 2018 15:49
To: wx-u...@googlegroups.com
Subject: Re: Exception when exiting minimal sample

Hello Tim,

Wednesday, August 15, 2018, 4:28:49 PM, you wrote:

trn> Hi,

trn> I've double-checked that my libs were all built with MTD specified
trn> using the same toolset. I've made no changes to the minimal project
trn> other than the change to MTD.

trn> Here's the stack when the exception is thrown:

trn> ntdll.dll!RtlAllocateHeap() Unknown
trn> HookManager.dll!66307ce9() Unknown
trn> [Frames below may be incorrect and/or missing, no
trn> symbols loaded for HookManager.dll]
trn> HookManager.dll!662fef41() Unknown
trn> HookManager.dll!662d8bf8() Unknown
trn> HookManager.dll!662d8806() Unknown
trn> HookManager.dll!662d873c() Unknown
trn> HookManager.dll!662d85a3() Unknown
trn> HookManager.dll!662d70d9() Unknown
trn> GdiHooks.dll!59cea711() Unknown
trn> [External Code]
>> minimal.exe!exit_or_terminate_process(const unsigned int
>> return_code) Line 144 C++
trn> minimal.exe!common_exit(const int return_code, const
trn> _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 280 C++
trn> minimal.exe!exit(int return_code) Line 293 C++
trn> [External Code]

The callstack seems to point to JAWS, i think that's the screenreader you're using?

Do you get the same problem when you don't switch to MTD runtime?

Did you have the same problem with earlier wx and/or VS versions?

Eric

PB

unread,
Aug 15, 2018, 11:07:05 AM8/15/18
to wx-users

I cannot confirm the issue (Windows 10 v1803 64-bit).

 

Step 1: As v3.1.0 is obsolete and no longer offered for download on wxWidgets site, I downloaded the zip for 3.1.0 tag from Github, unpacked it into an empty folder and in include/wx/msw copied setup0.h to setup.h.

Step 2: I opened samples/minimal/minimal_vc14.sln in MSVC 2017 Express (v15.8.0) and confirmed that the Windows SDK version will be changed to 10.0.17134.0 and Platform Toolset to v141.

Step 3: I selected all three projects (base, core, minimal) in the Solution Explorer and in their properties changed the C/C++ / Code Generation / Runtime Library from /MDd to /MTd.  I proceeded to Build Solution in the debug (default) configuration. However, I ran into an issue here, I could not build the library as the compiler complained that it cannot find setup.h although I created it in Step 1.

Step 4: I opened build/msw/wx_vc14.sln confirmed changing SDK and Toolset version as in Step 3, changed the CRT to /MTd for all the projects and built the library in the debug configuration. I then opened the VC14 solution for the minimal sample, successfully built it in the debug configuration, ran it and exited it without any exception being thrown.

 

TBH, I found the issue in Step 3 rather odd but I never build wxWidgets with the IDE, I use the makefile, so … * shrug *

t...@raisedbar.net

unread,
Aug 16, 2018, 9:45:53 AM8/16/18
to wx-u...@googlegroups.com

Hi,

 

Just to report that I’ve now raised this as an issue with the Jaws beta manager. Thanks to all who helped, yet again.

 

 

Best wishes.

 

Tim Burgess

 

From: wx-u...@googlegroups.com <wx-u...@googlegroups.com> On Behalf Of PB
Sent: 15 August 2018 16:07
To: wx-users <wx-u...@googlegroups.com>
Subject: Re: Exception when exiting minimal sample

 

I cannot confirm the issue (Windows 10 v1803 64-bit).

--

pizz...@gmail.com

unread,
Aug 16, 2018, 10:51:55 PM8/16/18
to wx-users
PLEASE let me know when you spot the availability of eyeball 2.0!

Joe
Reply all
Reply to author
Forward
0 new messages