← Back to team overview

kicad-developers team mailing list archive

Re: [Patch] pcbnew clipboard support

 

I have made almost no changes as of yet. Just trying to figure out what causes the crash.

I noticed in pcbnew/tools/edit_tool.cpp cutToClipboard that the method does not cause a crash If i only run on of the two method calls in it. Doesnt matter which one I remove, I also noticed that the crash is due to a CN_ANCHOR not being valid.

#4 0x00007fffe5cd1ab3 in CN_ANCHOR::Parent (this=0x5555588178a0) at /home/krille/projects/kicad/pcbnew/connectivity_algo.cpp:924
924	    assert( m_item->Valid() );
(gdb) p *m_item
$1 = {<INTRUSIVE_LIST<CN_ITEM>> = {m_count = 1484021408, m_prev = 0x670000006e, m_next = 0x2200000020, m_root = 0x6c00000025}, _vptr.CN_ITEM = 0x55555753f9c0, m_parent = 0x2200000073, m_connected = std::vector of length -40802189302, capacity 1610612745 = {<error reading variable>


On 09/18/2017 09:44 PM, Tomasz Wlostowski wrote:
On 18.09.2017 21:18, Kristoffer Ödmark wrote:
I cannot reproduce the crash on copying, I can however crash it on the
Cut functionality, I am at a total loss as to why though.

I noticed that the crash does not happen if one hides the board
ratsnest, but it will later crash when trying to re-enable the ratsnest.

Can someone maybe help shed some light on this?
Push the latest code, if it's ratsnest-related, I might have a look.

Tom

On 09/18/2017 01:35 PM, Tomasz Wlostowski wrote:
On 18.09.2017 12:57, Kristoffer Ödmark wrote:
Hmm, I cannot manage to reproduce the crash.

The things you are testing on, is the components pasted in using an
earlier version?

Hi Kristoffer,

Open the attached board, select P19 (connector on the right side) and
press Ctrl-C. A segfault will occur (at least on my machine) - release
x86_64 build.

PS. Why all the zones are refilled after pasting something? Is this
intentional?

Tom





Follow ups

References