← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] correct some snprintf usage

 

r5447 does not affect file->save schematic.

Your problem is probably from r5446 which affects file dialogs on OSX.
Supposedly it was for Open File Dialogs but the option name implies
all file dialogs.

On Sun, Feb 22, 2015 at 8:40 PM, Bob Gustafson <bobgus@xxxxxxx> wrote:
> I built r5447 on OSX. The File->Save Schematic Project worked once, then I
> restarted and tried it again - changes were in the file, but it crashed when
> I tried to save it again (with no additional changes put in) - this seems
> consistent. The Apple problem report says:
> Performing @getselector(clickedAction:) from wxNSMenuItem
>
> On another run of this build, I saw the 'Unlocking focus on wrong view'
> again - this on the newPCB view - I did the read netlist and then Rebuild
> Board Connectivity. - it then crashed.
>
> See attached .tiff of error dialog box.
>
> Hope this helps
>
> Bob G
>
>
> On 02/22/2015 06:03 PM, Wayne Stambaugh wrote:
>>
>> Mark,
>>
>> I committed your patch in the product branch version r5447.  Thank you
>> for your contribution.
>>
>> On 2/21/2015 10:00 PM, Mark Roszko wrote:
>>>
>>> Fixes some cases where n-1 bytes was used as a size but snprintf
>>> protects against that internally. Also some hardcoded constant sizes
>>> changed to sizeof()
>>>
>>> And made a case where sprintf was used into snprintf as the path input
>>> as aUserPluginsPath could in theory be very stupid long if someone has
>>> a very stupid filesystem. Would be best if there was error handling if
>>> it exceeds ( snprintf will return greater than sizeof(buf) ) but I
>>> have no clue how that section needs cleanup.
>>
>> There is probably a python API call that would allow you to use a python
>> error to display to the user and return false from
>> pcbnewInitPythonScripting to prevent python from running with an invalid
>> user path.  Also, python might complain if the path isn't valid in which
>> case you might not have to do anything.
>>
>> Cheers,
>>
>> Wayne
>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>> _______________________________________________
>> 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
>
>
>
> _______________________________________________
> 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
>



-- 
Mark


References