← Back to team overview

kicad-developers team mailing list archive

Re: winbuilder debug build link fail

 

I don't have the source to wx 3.0.  I have some newer code from subversion.  But let's
assume its close to what you are using in version 3.0.

Here is common/init.cpp:

int wxEntryReal(int& argc, wxChar **argv)
{
    // library initialization
    wxInitializer initializer(argc, argv);

    if ( !initializer.IsOk() )
    {
#if wxUSE_LOG
        // flush any log messages explaining why we failed
        delete wxLog::SetActiveTarget(NULL);
#endif
        return -1;
    }

    wxTRY
    {
#if 0 // defined(__WXOSX__) && wxOSX_USE_COCOA_OR_IPHONE
        // everything done in OnRun using native callbacks
#else
        // app initialization
        if ( !wxTheApp->CallOnInit() )
        {
            // don't call OnExit() if OnInit() failed
            return -1;
        }

        // ensure that OnExit() is called if OnInit() had succeeded
        class CallOnExit
        {
        public:
            ~CallOnExit() { wxTheApp->OnExit(); }
        } callOnExit;

        WX_SUPPRESS_UNUSED_WARN(callOnExit);
#endif
        // app execution
        return wxTheApp->OnRun();
    }
    wxCATCH_ALL( wxTheApp->OnUnhandledException(); return -1; )
}


1) Note that you do not report any printf()s from wxTheApp->OnExit() in your log.  This is
curious.  Because callOnExit's destructor should run right after wxTheApp->OnRun()
returns.  Putting that aside for a moment.... maybe 3.0 source is different, or you did
not report those printf()s....


Looking at line 182 of msw/main.cpp, there are two versions of wxEntry() supplied.  One is
used if wxUSE_ON_FATAL_EXCEPTION is declared, and the other when not.  The one uses
structured exception handling, the other does not.  I do not believe that SEH is supported
in the 32 bit MINGW compiler, and that support only exists experimentally in the 64 bit
MINGW compiler.

So this could be the problem, since it looks like you are running 32 bit code, not 64 bit.

Brian maybe can help, but take a look at this posting, which is a bit old.  But in the
last 9 months I was up on the 32 bit deficiency of MINGW's ability to handle SEH.  That
is, unless its changed in the last 9 months, it still does not work.


http://wxwidgets.10942.n7.nabble.com/Mingw-compiler-td31128.html


There is a -1 in your disassembly, this might correspond to something happening in
wxEntry() in the 3.0 source of wxEntry(), take a look.

We might need to rebuild wx without this wxUSE_ON_FATAL_EXCEPTION  #define.





On 07/15/2014 10:28 AM, Jason Whiteman wrote:
> Thanks for "the answer" style response.  I should have ran through the traps of your
> original message as I would have found main() there.  Finally, I've reached a point where
> I cannot get to debug output as my code:
> 
>         OutputDebugString(TEXT("single_top.cpp: main() - Before wxEntry\n"));  // YDF Debug
>         int ret = wxEntry(argc, argv);
>         OutputDebugString(TEXT("single_top.cpp: main() - End of main\n"));  // YDF Debug
> 
> Does not show the "End of main\n". 
> 
> More info on the exception (problem in wxbase300u_gcc_cm.dll):
> 
> Call Stack:
>> wxbase300u_gcc_cm.dll!638b1990()  
>   [Frames below may be incorrect and/or missing, no symbols loaded for wxbase300u_gcc_cm.dll] 
>   msvcrt.dll!74eba442()  
>   user32.dll!754afcb8()  
>   msvcrt.dll!74ec118e()  
>   msvcrt.dll!74ec1162()  
>   msvcrt.dll!74ec1162()  
>   pcbnew.exe!004018bb()  
>   pcbnew.exe!0043d23d()  
>   pcbnew.exe!004013de()  
>   kernel32.dll!7594338a()  
>   ntdll.dll!77479f72()  
>   ntdll.dll!77479f45()  
> 
> Decompile @ exception:
> 
> 638B1977  mov         eax,dword ptr [ecx] 
> 638B1979  mov         eax,dword ptr [eax+60h] 
> 638B197C  mov         dword ptr [esp+20h],3 
> 638B1984  call        eax 
> 638B1986  mov         ecx,dword ptr ds:[63A7B074h] 
> 638B198C  mov         dword ptr [esp+18h],eax 
> 638B1990  mov         eax,dword ptr [ecx]           <-------- IP Here On Error
> 638B1992  mov         eax,dword ptr [eax+6Ch] 
> 638B1995  mov         dword ptr [esp+20h],2 
> 638B199D  call        eax 
> 638B199F  mov         dword ptr [esp+20h],0FFFFFFFFh 
> 638B19A7  call        638AF980 
> 638B19AC  jmp         638B193C
> 
> Null Ptr (ECX):
>   EAX 00000000 
>   ECX 00000000 
>   ESP 0028FD90 
>  
> Memdump @ 63A7B074h:
> 0x63A7B074  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ...............
> 0x63A7B083  00 00 00 00 00 00 00 00 00 00 00 00 00 78 f4  .............xô
> 0x63A7B092  a7 63 40 9c a3 63 10 00 00 00 00 00 00 00 1c  §c@œ£c.........
> 0x63A7B0A1  f3 a7 63 00 00 00 00 ac b0 a7 63 20 9c a3 63  ó§c....¬°§c œ£c
> 0x63A7B0B0  0c 00 00 00 00 00 00 00 50 f0 a7 63 00 00 00  ........Pð§c...
> 0x63A7B0BF  00 c4 b0 a7 63 64 b9 a3 63 28 00 00 00 00 00  .Ä°§cd.£c(.....
> 0x63A7B0CE  00 00 50 f0 a7 63 00 00 00 00 f8 b0 a7 63 00  ..Pð§c....ø°§c.
> 0x63A7B0DD  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ...............
> =================
> 
> Debug Output:
> [37104] single_top.cpp: PGM_BASE& Pgm() - Before return program
> [37104] kiway.cpp: KIWAY::SetTop - Before if( m_top )
> [37104] kiway.cpp: KIWAY::SetTop - Before if( aTop )
> [37104] kiway.cpp: KIWAY::SetTop - Before m_top = aTop
> [37104] kiway.cpp: KIWAY::SetTop - After m_top = aTop
> [37104] single_top.cpp: main() - Before wxEntry                  <----- New Debug output,
> no associated "after"
> [37104] single_top.cpp: PGM_BASE& Pgm() - Before return program
> [37104] single_top.cpp: PGM_BASE& Pgm() - Before return program
> [37104] python_scripting.cpp: pcbnewInitPythonScripting() - Before Py_Initialize()
> [37104] python_scripting.cpp: pcbnewInitPythonScripting() - After Py_Initialize()
> [37104] python_scripting.cpp: pcbnewInitPythonScripting() - Before sprintf
> [37104] python_scripting.cpp: pcbnewInitPythonScripting() - Before PyRun_SimpleString( cmd )
> [37104] python_scripting.cpp: pcbnewInitPythonScripting() - After PyRun_SimpleString( cmd )
> [37104] kiway.cpp: KIWAY::SetTop - Before if( m_top )
> [37104] kiway.cpp: KIWAY::SetTop - Before if( aTop )
> [37104] kiway.cpp: KIWAY::SetTop - Before m_top = aTop
> [37104] kiway.cpp: KIWAY::SetTop - After m_top = aTop
> [37104] single_top.cpp: OnRun() - Before ret = wxApp::OnRun()
> [37104] pcbframe.cpp: PCB_EDIT_FRAME::OnCloseWindow - Before m_canvas--SetAbortRequest
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] pcbframe.cpp: PCB_EDIT_FRAME::OnCloseWindow - Before Destroy()
> [37104] pcbframe.cpp: PCB_EDIT_FRAME::OnCloseWindow - After Destroy()
> [37104] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - Before destroyTools()
> [37104] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - Before m_RecordingMacros = -1
> [37104] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - Before for loop
> [37104] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - Before delete m_drc
> [37104] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - After delete m_drc
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before w = event.GetWindow()
> [37104] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
> [37104] kiway.cpp: KIWAY::player_destroy_handler - After for loop
> [37104] single_top.cpp: OnRun() - After ret = wxApp::OnRun()
> [37104] single_top.cpp: OnRun() - Before Pgm().OnPgmExit()
> [37104] single_top.cpp: PGM_BASE& Pgm() - Before return program
> [37104] single_top.cpp: OnPgmExit() - Before Kiway.OnKiwayEnd()
> [37104] pcbnew.cpp: IFACE::OnKifaceEnd() - before end_common()
> [37104] pcbnew.cpp: IFACE::OnKifaceEnd() - after end_common()
> [37104] python_scripting.cpp: pcbnewFinishPythonScripting() - Before Py_Finalize()
> [37104] python_scripting.cpp: pcbnewFinishPythonScripting() - After Py_Finalize()
> [37104] pcbnew.cpp: IFACE::OnKifaceEnd() - after pcbnewFinishPythonScripting()
> [37104] single_top.cpp: OnPgmExit() - Before saveCommonSettings()
> [37104] single_top.cpp: OnPgmExit() - Before PGM_BASE::destroy()
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_common_settings
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before m_common_settings = 0
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_pgm_checker
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before m_pgm_checker = 0
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_file_checker
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before m_file_checker = 0
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_locale
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before m_locale = 0
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_html_ctrl
> [37104] pgm_base.cpp: PGM_BASE::destroy() - Before m_html_ctrl = 0
> [37104] pgm_base.cpp: PGM_BASE::destroy() - After m_html_ctrl = 0
> [37104] single_top.cpp: OnPgmExit() - After PGM_BASE::destroy()
> [37104] single_top.cpp: OnRun() - After Pgm().OnPgmExit()
> 
> 
> On Tue, Jul 15, 2014 at 8:02 AM, Dick Hollenbeck <dick@xxxxxxxxxxx
> <mailto:dick@xxxxxxxxxxx>> wrote:
> 
>     main is in wx/app.h, because this is where IMPLMENT_APP is defined.
> 
> 
>     Try the attached patch, after applying, modify printf() to your different output function
>     if that is appropriate.
> 
>     Any output text after "end of main" are coming from static destructors.  If you don't see
>     that output, then the crash is before the end of main().
> 
>     That first question halves the search space.  Then you will have to delve into one of the
>     halves.
> 
>     If the crash is in the static destructor half of the problem space, the linker map for
>     pcbnew.kiface may be of some help.  Or you can google for how to debug static destructors
>     when using gcc/mingw.
> 
> 
>     Dick
> 
> 
> 
>     On 07/15/2014 04:18 AM, Jason Whiteman wrote:
>     > I'm having some difficulty locating the entry point for pcbnew ("main()").
>     >
>     > Regards,
>     > Jason
>     >
>     >
>     >
>     > On Mon, Jul 14, 2014 at 9:45 AM, Dick Hollenbeck <dick@xxxxxxxxxxx
>     <mailto:dick@xxxxxxxxxxx>
>     > <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>>> wrote:
>     >
>     >     On 07/14/2014 03:14 AM, Jason Whiteman wrote:
>     >     > Thanks again.  I had already added the suggested OnExit printfs directly after
>     >     sending my
>     >     > previous message as I had mentioned the coverage was not full.
>     >     >
>     >     > int  OnExit()           // overload wxApp virtual
>     >     >     {
>     >     >   int jwdebug; // JW Debug
>     >     >
>     >     >   OutputDebugString(TEXT("single_top.cpp: OnExit() - Before wxApp::OnExit()\n"));
>     >      // JW Debug
>     >     >   jwdebug = wxApp::OnExit();  // JW Debug
>     >     >   OutputDebugString(TEXT("single_top.cpp: OnExit() - After
>     wxApp::OnExit()\n"));  //
>     >     JW Debug
>     >     >   return (jwdebug);
>     >     >         // return wxApp::OnExit(); original
>     >     >     }
>     >     >
>     >     > No interesting debug output as I saw printf output before and after wxApp::OnExit
>     >
>     >     Let's rewind just a little.  What I was recommending was to determine if the
>     crash is
>     >     happening in a static destructor or not.  Again "static destructor or not."
>      THis is a yes
>     >     or no question, with only one of two possible answers.
>     >
>     >     If the crash happens after main() then, its in a static destructor, else not.
>      Again, only
>     >     two choices.
>     >
>     >     Yes, you can inline expand the macro IMPLEMENT_APP() without recompiling
>     wxWidgets.  Just
>     >     look at the header where it is defined, and put that code in place of the macro in
>     >     single_top.cpp
>     >
>     >     And instrument the bottom of main() with a printf that will hopefully get you
>     the answer
>     >     to this YES/NO question.
>     >
>     >
>     >
>     >
>     >     >
>     >     > Converting the macro on line 190: "IMPLEMENT_APP( APP_SINGLE_TOP );" will require
>     >     > compiling wxWidgets from source which is a "blackbox" portion of winbuilder -
>     >     tipping the
>     >     > scale to use Linux as a dev. environment so I can compile "proper" in a native
>     dev.
>     >     > environment.   At least, it is my understanding that this is a pre-built
>     portion of
>     >     Kicad
>     >     > using the winbuilder environment.
>     >     >
>     >     > Something up with my target OS is not outside of the domain of possibilities.
>      Thus
>     >     far I
>     >     > have a win 2k8 server that bails out in early code - a win 7 machine that
>     bails out in
>     >     > very late code (possibly not even Kicad as mentioned -- the exception is noted
>     in the
>     >     > Kicad thread) so digging up a 3rd opinion in my local pool would be a datapoint.
>     >     >
>     >     > Regards,
>     >     > Jason
>     >     >
>     >     >
>     >     >
>     >     > On Sun, Jul 13, 2014 at 11:41 AM, Dick Hollenbeck <dick@xxxxxxxxxxx
>     <mailto:dick@xxxxxxxxxxx>
>     >     <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>>
>     >     > <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx> <mailto:dick@xxxxxxxxxxx
>     <mailto:dick@xxxxxxxxxxx>>>> wrote:
>     >     >
>     >          No idea.
>     >     >
>     >     >     I don't see the crash in the output.  It would be prudent to have the
>     crash text
>     >     and the
>     >     >     debug text in the same stream if possible, that way it might infer
>     "sequence of
>     >     events".
>     >     >
>     >     >     There's not much remaining in program execution before the end.  The only
>     additional
>     >     >     printf()'s you might add are here in APP_SINGLE_TOP's
>     >     >
>     >     >
>     >     >         int  OnExit()           // overload wxApp virtual
>     >     >         {
>     >     >             return wxApp::OnExit();
>     >     >         }
>     >     >
>     >     >
>     >     >     before and after.  The printf()'s from PGM_BASE::destroy() are expected twice,
>     >     yet we see
>     >     >     only one.  The second set of printf()s are expected from the static
>     destructor,
>     >     which
>     >     >     would fire way after APP_SINGLE_TOP::OnExit() returns, just before the program
>     >     is tossed
>     >     >     from memory.  This static destruction is the the result of line 190 in
>     >     single_top.cpp.
>     >     >     Since we don't see that second set of printf()s this tells us that the problem
>     >     may not be
>     >     >     the destruction of some other non-KiCad thing, possibily from another library
>     >     that I have
>     >     >     no knowledge of.  You might manually expand the macro at line 190 into C++
>     code.
>     >      That
>     >     >     would allow you to place some additional printf()s even closer to the end
>     of the
>     >     program.
>     >     >
>     >     >
>     >     >     Also, I found this:
>     >     >
>     >     >
>     >     >
>     >    
>     http://stackoverflow.com/questions/5162011/what-does-this-windows-2008-debug-output-mean
>     >     >
>     >     >
>     >     >     Maybe a phone call to Microsoft is in order, or a change in OS version or
>     >     something.  To
>     >     >     my knowledge you are the only KiCad user having this problem.
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >     On 07/13/2014 05:31 AM, Jason Whiteman wrote:
>     >     >     > I've been busy with other work - but wanted to offer an update.
>     >     >     >
>     >     >     > For debugging the crash - the PGM_KICAD entries do not apply since Kicad.exe
>     >     itself does
>     >     >     > not crash - just pcbnew.    I do not see that pcbnew uses the PGM_KICAD exit
>     >     >     routines here
>     >     >     > - as PGM_KICAD destroyers work fine with kicad.exe.
>     >     >     >
>     >     >     > Granted -- not yet fully understanding the structure -- I placed debug
>     outputs in
>     >     >     the exit
>     >     >     > routines of pcbnew and also destroyers within the src/kicad/common sources
>     >     >     (pgm_base.cpp,
>     >     >     > single_top.cpp, kiway.cpp).
>     >     >     >
>     >     >     > Therefore, the results are fairly noisy at this point.  Here is the
>     output at
>     >     this point
>     >     >     > (note there is an unhandled win32 exception associated with this shutdown).
>     >      Although I
>     >     >     > have not fully studied the output, I believe I may need to add more "printf"
>     >     output to
>     >     >     > capture the failure point:
>     >     >     >
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] pcbframe.cpp: PCB_EDIT_FRAME::OnCloseWindow - Before Destroy()
>     >     >     > [35836] pcbframe.cpp: PCB_EDIT_FRAME::OnCloseWindow - After Destroy()
>     >     >     > [35836] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - Before
>     destroyTools()
>     >     >     > [35836] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - Before
>     >     m_RecordingMacros = -1
>     >     >     > [35836] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - Before for loop
>     >     >     > [35836] pcbframe.cpp: PCB_EDIT_FRAME::~PCB_EDIT_FRAME() - Before delete
>     m_drc
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before w =
>     event.GetWindow()
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - Before for loop
>     >     >     > [35836] kiway.cpp: KIWAY::player_destroy_handler - After for loop
>     >     >     > [35836] single_top.cpp: OnPgmExit() - Before Kiway.OnKiwayEnd()
>     >     >     > [35836] single_top.cpp: OnPgmExit() - Before saveCommonSettings()
>     >     >     > [35836] single_top.cpp: OnPgmExit() - Before PGM_BASE::destroy()
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_common_settings
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before m_common_settings = 0
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_pgm_checker
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before m_pgm_checker = 0
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_file_checker
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before m_file_checker = 0
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_locale
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before m_locale = 0
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before delete m_html_ctrl
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - Before m_html_ctrl = 0
>     >     >     > [35836] pgm_base.cpp: PGM_BASE::destroy() - After m_html_ctrl = 0
>     >     >     > [35836] single_top.cpp: OnPgmExit() - After PGM_BASE::destroy()
>     >     >     > [FFFFFA800783F200] WskProIRPGetAddrInfo is called.
>     >     >     > [bind=FFFFFA8006F43760] Binding reference count++ = 2 (status = 00000000,
>     >     >     impersonation= 2).
>     >     >     > [FFFFFA80077D90F0] Request reference count++ = 3.
>     >     >     > [FFFFFA80077D90F0] RPC method type = 1: rpc-method succeeded, queue to
>     >     rpc-pending-list.
>     >     >     > [FFFFFA80077D90F0] Request reference count-- = 2.
>     >     >     > [FFFFFA80077D90F0] WskKnrRpcComplete: rpc calls back for completion.
>     >     >     > [FFFFFA80077D90F0] WskKnrCompletePending: complete pending request (rpc=1).
>     >     >     > [FFFFFA80077D90F0] Request reference count-- = 1.
>     >     >     > [FFFFFA80077D90F0] Request reference count-- = 0.
>     >     >     > [FFFFFA80077D90F0] WskKnrCompleteRequest: rpc completion return status =
>     00000000
>     >     >     > (reply=c0000272).
>     >     >     > [FFFFFA80077D90F0] WskProAPIGetAddressInfo returned addrinfo:
>     >     [addr=0000000000000000].
>     >     >     > [bind=FFFFFA8006F43760] Binding reference count-- = 1.
>     >     >     > [FFFFFA80077D90F0] WskKnrCompleteRequest: complete irp with IO status =
>     c0000272.
>     >     >     > [FFFFFA800783F200] WskProIRPGetAddrInfo is called.
>     >     >     > [bind=FFFFFA8006F43760] Binding reference count++ = 2 (status = 00000000,
>     >     >     impersonation= 2).
>     >     >     > [FFFFFA80077D90F0] Request reference count++ = 3.
>     >     >     > [FFFFFA80077D90F0] RPC method type = 1: rpc-method succeeded, queue to
>     >     rpc-pending-list.
>     >     >     > [FFFFFA80077D90F0] Request reference count-- = 2.
>     >     >     > [FFFFFA80077D90F0] WskKnrRpcComplete: rpc calls back for completion.
>     >     >     > [FFFFFA80077D90F0] WskKnrCompletePending: complete pending request (rpc=1).
>     >     >     > [FFFFFA80077D90F0] Request reference count-- = 1.
>     >     >     > [FFFFFA80077D90F0] Request reference count-- = 0.
>     >     >     > [FFFFFA80077D90F0] WskKnrCompleteRequest: rpc completion return status =
>     00000000
>     >     >     > (reply=c0000272).
>     >     >     > [FFFFFA80077D90F0] WskProAPIGetAddressInfo returned addrinfo:
>     >     [addr=0000000000000000].
>     >     >     > [bind=FFFFFA8006F43760] Binding reference count-- = 1.
>     >     >     > [FFFFFA80077D90F0] WskKnrCompleteRequest: complete irp with IO status =
>     c0000272.
>     >     >     >
>     >     >     >
>     >     >     > On Sun, Jul 6, 2014 at 11:54 AM, Dick Hollenbeck <dick@xxxxxxxxxxx
>     <mailto:dick@xxxxxxxxxxx>
>     >     <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>>
>     >     >     <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>
>     <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>>>
>     >     >     > <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>
>     <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>> <mailto:dick@xxxxxxxxxxx
>     <mailto:dick@xxxxxxxxxxx>
>     >     <mailto:dick@xxxxxxxxxxx <mailto:dick@xxxxxxxxxxx>>>>> wrote:
>     >     >     >
>     >     >     >     On 07/05/2014 08:23 PM, Jason Whiteman wrote:
>     >     >     >     > Team,
>     >     >     >     >
>     >     >     >     >      I've been using the "printf" method to identify the cause of
>     a windows
>     >     >     exception on
>     >     >     >     > close of pcbnew.exe (release) I have seen.  However, all passed for as
>     >     deep to the
>     >     >     >     end of
>     >     >     >     > the program as I could identify.
>     >     >     >
>     >     >     >     I maintain about 6 "out of tree" build directories:
>     >     >     >
>     >     >     >     Debug using wx3.1x
>     >     >     >     Debug using wx2.8.11
>     >     >     >     Release using wx2.8.11
>     >     >     >     Release using wx3.1x
>     >     >     >     Debug using SCRIPTING
>     >     >     >     Release using SCRIPTING
>     >     >     >
>     >     >     >     This way the whole tree rarely gets recompiled.
>     >     >     >
>     >     >     >     A fast computer helps, especially if your time is worth something.
>     >     >     >
>     >     >     >     For this problem, I think printf() may be a sufficient
>     troubleshooting aid.
>     >     >     >
>     >     >     >     After the program returns from main(), the static C++ destructors
>     run.  I
>     >     was seeing
>     >     >     >     problems with the destruction of the wxSingleInstanceChecker objects.
>     >      There can
>     >     >     be out of
>     >     >     >     sequence issues on static C++ destruction just like there can be for
>     static
>     >     >     construction.
>     >     >     >       You know, one object depends on another, and they are destroyed out of
>     >     sequence.
>     >     >     >
>     >     >     >     You might put some printf()'s in PGM_BASE::destroy(), be sure and
>     >     terminate each
>     >     >     string
>     >     >     >     with a newline so it gets flushed.
>     >     >     >
>     >     >     >     Probably these printf()'s will show up twice:
>     >     >     >
>     >     >     >     1) once during the explicit call to PGM_BASE::destroy() from
>     >     >     PGM_KICAD::OnPgmExit() thru
>     >     >     >     PGM_KICAD::destroy(), or PGM_SINGLE_TOP::OnPgmExit().
>     >     >     >
>     >     >     >
>     >     >     >     2) static C++ destruction of the PGM_BASE object.  Everything is already
>     >     >     destroyed by then
>     >     >     >     however.
>     >     >     >
>     >     >     >     I'm thinking that the last printf() you see, tells that you got at
>     least that
>     >     >     far before
>     >     >     >     the segfault.
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >     >     > Therefore, I wanted to transition to a debug build and
>     >     >     >     > use debug tools to attempt to identify the source of my windows
>     exception on
>     >     >     pcbnew
>     >     >     >     exit.
>     >     >     >
>     >     >     >     Are you starting with kicad.exe or pcbnew.exe ?
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >     >     >
>     >     >     >     >      What I've run into is a link error that mirrors a similar issue
>     >     previously
>     >     >     >     identified
>     >     >     >     > by another developer on the list -- and this thread is quite dated.
>     >      Reading the
>     >     >     >     thread, I
>     >     >     >     > did not readily see how to resolve the issue.
>     >     >     >     >
>     >     >     >     > https://lists.launchpad.net/kicad-developers/msg11097.html
>     >     >     >     >
>     >     >     >     >      What I found was the issue was reproduced with recent builds
>     if I had
>     >     >     >     previously set
>     >     >     >     > the debug level to "Release", change it to "Debug" and run "make"
>     then I
>     >     would see
>     >     >     >     this issue.
>     >     >     >     >
>     >     >     >     >       In an attempt to resolve the issue, I went to the ./build
>     >     directory and
>     >     >     ran a
>     >     >     >     > "mingw32-make.exe clean".   This did not help.  The latest attempt
>     used
>     >     >     SCRIPTING OFF,
>     >     >     >     > make clean, then the hour-long+ rebuild.
>     >     >     >     >
>     >     >     >     >      Some sample error output (without having to look at the link
>     above):
>     >     >     >     >
>     >     >     >     > CMakeFiles\_pcbnew.dir/objects.a(pcbnewPYTHON_wrap.cxx.obj): In
>     function
>     >     >     >     > `SWIG_Python_AddErrorMsg':
>     >     >     >     >
>     >     >     >
>     >     >
>     >    
>     C:/kicad_build/kicad-winbuilder-3.4/build/Debug/pcbnew/scripting/pcbnewPYTHON_wrap.cxx:1020:
>     >     >     >     > undefined reference to `_imp___Py_RefTotal'
>     >     >     >     >
>     >     >     >
>     >     >
>     >    
>     C:/kicad_build/kicad-winbuilder-3.4/build/Debug/pcbnew/scripting/pcbnewPYTHON_wrap.cxx:1020:
>     >     >     >     > undefined reference to `_imp___Py_RefTotal'
>     >     >     >     >
>     >     >     >
>     >     >
>     >    
>     C:/kicad_build/kicad-winbuilder-3.4/build/Debug/pcbnew/scripting/pcbnewPYTHON_wrap.cxx:1024:
>     >     >     >     > undefined reference to `_imp___Py_RefTotal'
>     >     >     >     >
>     >     >     >     >      Is there advice on how to get the debug to work w/winbuilder?
>     >     >     >     >
>     >     >     >     > Regards,
>     >     >     >     > Jason
>     >     >     >     >
>     >     >     >     >
>     >     >     >     >
>     >     >     >     >
>     >     >     >     > _______________________________________________
>     >     >     >     > Mailing list: https://launchpad.net/~kicad-developers
>     >     >     >     > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>>
>     >     >     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>>>
>     >     >     >     > Unsubscribe : https://launchpad.net/~kicad-developers
>     >     >     >     > More help   : https://help.launchpad.net/ListHelp
>     >     >     >     >
>     >     >     >
>     >     >     >
>     >     >     >     _______________________________________________
>     >     >     >     Mailing list: https://launchpad.net/~kicad-developers
>     >     >     >     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>>
>     >     >     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>>>
>     >     >     >     Unsubscribe : https://launchpad.net/~kicad-developers
>     >     >     >     More help   : https://help.launchpad.net/ListHelp
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >     > _______________________________________________
>     >     >     > Mailing list: https://launchpad.net/~kicad-developers
>     >     >     > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>>
>     >     >     > Unsubscribe : https://launchpad.net/~kicad-developers
>     >     >     > More help   : https://help.launchpad.net/ListHelp
>     >     >     >
>     >     >
>     >     >
>     >     >     _______________________________________________
>     >     >     Mailing list: https://launchpad.net/~kicad-developers
>     >     >     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>>
>     >     >     Unsubscribe : https://launchpad.net/~kicad-developers
>     >     >     More help   : https://help.launchpad.net/ListHelp
>     >     >
>     >     >
>     >     >
>     >     >
>     >     > _______________________________________________
>     >     > Mailing list: https://launchpad.net/~kicad-developers
>     >     > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     > Unsubscribe : https://launchpad.net/~kicad-developers
>     >     > More help   : https://help.launchpad.net/ListHelp
>     >     >
>     >
>     >
>     >     _______________________________________________
>     >     Mailing list: https://launchpad.net/~kicad-developers
>     >     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     Unsubscribe : https://launchpad.net/~kicad-developers
>     >     More help   : https://help.launchpad.net/ListHelp
>     >
>     >
> 
> 



Follow ups

References