segfault in pcbnew when changing canvas

Bug #1490786 reported by Cirilo Bernardo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Maciej Suminski

Bug Description

rev: 6138

A condition relating to the Ratsnest can cause pcbnew to segfault when switching from OpenGL to default canvas.
This one is a little tricky to reproduce; what I do is:
1. select the OpenGL canvas
2. select a component with at least 3 ratsnest lines (I cannot reproduce a segfault if a component has only 2 lines)
3. hover over the component and press 'M' to move, then 'R' to rotate, then move the component a small amount
4. press ctrl-z to undo, then F9 to switch to default canvas

I'll see if I can produce a small PCB file which can reproduce the problem easily.

Related branches

Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :
Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :
Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :
Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :
Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :

Something is not quite right with the ratsnest when switching between OpenGL and Default. The attached images show a case of what the screen looks like when switching from OpenGL to Default in a scenario where no segfault occurs. Some other strange behavior occurs when switching from Default to OpenGL - the ratsnest lines remain the same even though a component has moved. However, so far I can only produce a segfault switching from OpenGL to Default so these problems may be different but related issues.

To reproduce the bug using the attached PCB file:
1. switch to OpenGL
2. hover over CN1 and press 'M', then move CN1 so that the pads are just *above* the pads of CN2
3. press 'R' once to rotate then move CN1 so that the top pin is just *below* the center pin on CN2, then place the footprint
4. ctrl-z to undo
5. F9 and you should get a segfault

The segfault also occurs if I start out in Default instead of OpenGL at (1), then perform 2-3, then:
4. F11 for OpenGL (note that the original move was in Default)
5. ctrl-z to undo the move
6. F9 and segfault

For some reason I can't reproduce the fault without a Rotate operation, but this may only be a concidence.

Changed in kicad:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Maciej Sumiński (orsonmmz)
Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :

Hi Orson,

 I still have the same problem in rev 6145.

Changed in kicad:
status: Fix Committed → In Progress
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Hi CIrilo,

Apparently I had a few lucky shots and thought the problem is gone. Would you try 6147?

Regards,
Orson

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :

Thanks Orson - I can no longer trigger the segfault and the ratsnest lines remain synchronized between OpenGL and Default canvas.

Jon Neal (reportingsjr)
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.