← Back to team overview

kicad-developers team mailing list archive

Re: How to track down an exception?

 

On Thu, Sep 11, 2014 at 01:52:24PM +0200, Lorenzo Marcantonio wrote:
> Still wrestling with the random fault when doing a module change.
> Sometimes it segfaults, sometimes it throws a std:bad_alloc exception.
> 
> Usually symptoms of an heap smash...

Update: I finally found a way to throw it reliably.

Open in pcbnew a 'library board' (a board containing the modules for
a library). I'm using the newer .pretty libraries. Pick a module and
open it for edit.

Choose from the toolbar the library and re-write the module in the
library (with the save button in the module editor). This seems to be
the operation that triggers the initial corruption (I think). 
The interesting thing is that I don't see a write on the .kicad_mod
file... shouldn't it be happen at this time or is there some caching
mechanism?

Close the module editor. Go to the same module (it's important!) and do
a 'change module' operation on it. It should reload the same module but
instead it throws that exception...

The last things I see in strace are statting the .kicad_mod file (*not*
opening it) and then updating the pcbnew and kicad_common config files
(triggered by stack unwinding, I presume)

I hate these things...

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups

References