← Back to team overview

kicad-developers team mailing list archive

Re: winbuilder debug build link fail

 

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
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References