[Kicad-developers] Segmentation fault on rev. 4614

2014-01-08 Thread Барановский Константин
After successful build rev. 4614 - eeschema, pcbnew, gerbview, pl_editor 
doesn't run, in console I get 'Segmentation fault' and memory dump 
(attached). Other apps (kicad, cvpcb, bitmap2component, pcbcalculator) 
works fine.
I tried run apps in guest session (I thought problem in my config files) 
but errors are repeated.


Build options:
cmake -DMAINTAIN_PNGS=ON -DCMAKE_INSTALL_PREFIX=/usr ../

System:
Ubuntu 13.10 32bit
Linux Lenovo-G550 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:16:27 
UTC 2013 i686 i686 i686 GNU/Linux





eeschema-baranovskiykonstantin
Description: Binary data


gerbview-baranovskiykonstantin
Description: Binary data


pcbnew-baranovskiykonstantin
Description: Binary data


pl_editor-baranovskiykonstantin
Description: Binary data
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Segmentation fault on rev. 4614

2014-01-08 Thread Барановский Константин

Your patch resolved this problem. Thank you!

08.01.2014 14:37, Maciej Sumiński пишет:

Hi,

Thank you for the report. Please try the attached patch and let us 
know if it solves the problem.


Regards,
Orson

On 01/08/2014 12:05 PM, Барановский Константин wrote:

After successful build rev. 4614 - eeschema, pcbnew, gerbview, pl_editor
doesn't run, in console I get 'Segmentation fault' and memory dump
(attached). Other apps (kicad, cvpcb, bitmap2component, pcbcalculator)
works fine.
I tried run apps in guest session (I thought problem in my config files)
but errors are repeated.

Build options:
cmake -DMAINTAIN_PNGS=ON -DCMAKE_INSTALL_PREFIX=/usr ../

System:
Ubuntu 13.10 32bit
Linux Lenovo-G550 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:16:27
UTC 2013 i686 i686 i686 GNU/Linux




___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp






___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] Net names and net codes

2014-01-08 Thread Maciej Sumiński
I am wondering if there are any special reasons to keep net names and 
net codes separated. This gives programmer a chance to set a net code 
that is actually not related to the appropriate net name. One is even 
able to set a net name that does not exist using D_PAD::SetNetname() for 
a single pad or a group of pads.

I have seen that in many places there are pairs of functions:
item-SetNet( .. );
item-SetNetname( .. );
but if I recall correctly, that is not always the case.

Also, net names are kept (and directly available) only for some specific 
classes (D_PAD, ZONE_CONTAINER, they are delivered via different 
functions - respectively GetNetname() and GetNetName()) but not all 
BOARD_CONNECTED_ITEMs (TRACK and its derivatives does not contain this 
information). For classes that miss net name, there can be used 
NETINFO_ITEM, which stores both net code and net name. Again, question 
arises - is it done on purpose?


Another thing that I observed is that net codes may be subject to change 
during edition of a board (I guess it happens when you remove all pads 
that belong to a single net). As I understand, it is to keep net codes 
consecutive, but it also disallows to reliably index items using their 
net codes. Is the only right way to index items by nets is to use their 
net names?


As I am not as familiar with the KiCad's core as you are, then I would 
like to ask what do you think of:
- removing m_Netname  m_ShortNetname fields from D_PAD and m_Netname 
from ZONE_CONTAINER


- use net codes to refer to a specific NETINFO_ITEMs, that actually 
store useful informations for nets


- adding something similar to (it actually exists in the code as 
ZONE_CONTAINER::SetNetNameFromNetCode()):

wxString BOARD_CONNECTED_ITEM::GetNetname() const
{
BOARD* board = GetBoard();
if( board == NULL )
return wxString(  );

NETINFO_ITEM* netinfo = board-FindNet( m_NetCode );
if( netinfo == NULL )
return wxString(  );

return netinfo-GetNetname();
}


wxString BOARD_CONNECTED_ITEM::GetShortNetname() const
{
BOARD* board = GetBoard();
if( board == NULL )
return wxString(  );

NETINFO_ITEM* netinfo = board-FindNet( m_NetCode );
if( netinfo == NULL )
return wxString(  );

return netinfo-GetShortNetname();
}

or improve it to make it faster, if it is necessary.

Regards,
Orson

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp