← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] fix crashes related to footprint selection

 

Hi Jon,

Cool.  You want to attach that one to the bug?

Cheers,
Jeff.


> On 24 Feb 2018, at 17:55, Jon Evans <jon@xxxxxxxxxxxxx> wrote:
> 
> Yes it definitely is specific to some kind of library config issue.  I think I have one or more invalid library path, which helps in triggering the bug.
> Your patch does not completely fix the issue for me.  FP_CACHE::Load() is throwing an exception which is passed through validateCache() but then unhandled in doLoadFootprint()
> 
> If I change it to:
> 
>     try
>     {
>         validateCache( aLibraryPath, checkModified );
>     }
>     catch( const IO_ERROR& ioe )
>     {
>         // do nothing with the error
>     }
> 
> then it works.
> 
> Thanks,
> -Jon
> 
> On Sat, Feb 24, 2018 at 12:45 PM, Jeff Young <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>> wrote:
> Hey guys,
> 
> I’m not sure why I can’t reproduce this (perhaps because I’m still on old libraries?), but could you guys try this one out?
> 
> Cheers,
> Jeff.
> 
> 
> 
>> On 24 Feb 2018, at 17:32, Jeff Young <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>> wrote:
>> 
>> Hi Jon,
>> 
>> Thanks for looking into this, but the second one will kill performance.  I’ve got a slightly different one baking….
>> 
>> Cheers,
>> Jeff.
>> 
>> 
>>> On 24 Feb 2018, at 17:18, Jon Evans <jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>> wrote:
>>> 
>>> See: https://bugs.launchpad.net/kicad/+bug/1751464 <https://bugs.launchpad.net/kicad/+bug/1751464>
>>> 
>>> The first one is simple; m_Layers wasn't guaranteed to be null so in my recent change I introduced a path to crashing when creating a pcb frame.
>>> 
>>> The second one I am not so sure what is intended, since I haven't really looked at the code in this area very much, but there was a path to call LoadEnumeratedFootprint where m_cache is null.  I added a call to validateCache() to fix this, but I am discarding any exceptions thrown because I'm not sure how we want to handle them (on my install at least, I get some exceptions about bad paths, but if I apply this patch, everything seems to work regardless)
>>> 
>>> -Jon
>>> <0001-Make-sure-the-footprint-cache-exists-in-LoadEnumerat.patch><0001-Ensure-m_Layers-is-null-before-it-is-created.patch>_______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>>> More help   : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
>> More help   : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>
> 
> 
> 


Follow ups

References