gschem crashes on ctrl-x

Bug #900122 reported by nacorn
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gEDA
Fix Released
Critical
Unassigned

Bug Description

version 1.6.1.20100214

While adding a net, pressing CTRL-x always crashes gschem. Message on console:

ERROR:o_net.c:688:o_net_motion: assertion failed: (w_current->inside_action != 0)
Aborted

Tags: gschem
Peter TB Brett (peter-b)
tags: added: gschem
Revision history for this message
Peter TB Brett (peter-b) wrote :

I'm using the following steps to attempt to reproduce:

1. Start gschem
2. Press "A N" to begin placing a net
3. Press "Ctrl+X"

I have been unable to get gschem to crash using these steps for any of the following versions:

- 1.6.1
- 1.6.2
- stable branch head
- unstable branch head

Please confirm how you managed to reliably induce a crash.

Changed in geda:
status: New → Incomplete
Revision history for this message
Gareth Edwards (gareth-uk) wrote :

6 weeks have passed - should we close as invalid?

Revision history for this message
nacorn (acorn) wrote :

(Sorry for slow reply)

Still crashes. Here are repro steps:

1) press i (brings up component window)
2) select "4000-series logic" and "4000-1.sym"
3) place 2 "4000-1.sym" onto the schematic
4) press ESC to stop adding components
5) In the "Select Component..." window click "close"
6) place the mouse cursor over pin 6 of the first 4000-1.sym that you placed
7) type "AN" to start adding a net
8) move the mouse (the net you are adding follows the cursor)
9) Press CTRL-X --- the app crashes and (in the xterm where I ran it) I get the message:

(gschem:11262): GLib-GObject-WARNING **: IA__g_object_set_valist: construct property "type" for object `Log' can't be set after construction
**
ERROR:o_net.c:688:o_net_motion: assertion failed: (w_current->inside_action != 0)
Aborted

Revision history for this message
Gareth Edwards (gareth-uk) wrote :

I've managed to reproduce this in 1.6.1, 1.6.2 and stable-1.8. The key here is the selection state of the components - if both components are unselected before the net is routed, everything is OK, but if any component is selected before beginning the net add is started - BOOM. Moving to confirmed.

Thanks for the report and the persistence!

Changed in geda:
status: Incomplete → Confirmed
Revision history for this message
Gareth Edwards (gareth-uk) wrote :

Simpler reproduction of issue:

- add a component with at least one pin.
- select the component.
- hover over the pin, the press A N to start the net.
- move away, then press ctrl-x

Changed in geda:
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Peter TB Brett (peter-b) wrote :

Okay, I'm looking at this... the assertion happens because w_current->inside_action gets cleared by something to do with pressing Ctrl+X. I'm not even sure why that assertion is there, TBH, because the function doesn't seem to do anything that requires inside_action to be non-zero... but we probably should try and fix this anyway.

I really wish we had state-dependent keybindings -- I suspect there are a lot of nasty surprises like this one tucked away because no-one checks (no-one *can* possibly check) every possible combination of different actions taken in different editing states...

Revision history for this message
Peter TB Brett (peter-b) wrote :

Bumping importance to "critical" because, well, we should aim not to crash at all.

Changed in geda:
importance: Medium → Critical
Revision history for this message
Noel Maersk (veox) wrote :

This happens if any object is selected - component, net, bus, or text. It also happens when laying a bus, with

ERROR:o_bus.c:226:o_bus_motion: assertion failed: (w_current->inside_action != 0)

Since this happens only when something is selected, could it be there is related code is selection functionality? Would deselecting an object when laying a net/bus be a proper fix?

Revision history for this message
Noel Maersk (veox) wrote :

If an object is locked, then a menu is presented asking if the object is truly to be deleted. So I suppose the code that unsets w_current->inside_action is o_delete_selected() in o_delete.c.

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

Bug was fixed by a commit
git master commit d94b0c9a561e6e541ad7447a9215395b3dafccd7
http://git.geda-project.org/geda-gaf/commit/?id=d94b0c9a561e6e541ad7447a9215395b3dafccd7

commit d94b0c9a561e6e541ad7447a9215395b3dafccd7
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Don't change the inside_action variable by Ctrl-X.

    The logic of o_delete_selected() is changed in order to prevent double
    free of the object selection list if the function is used for cutting
    the selection to a buffer while some action is performed.

    Closes-bug: lp-900122

Changed in geda:
status: Triaged → Fix Committed
Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 6e840360d6ec5ca1083c910f614807e2bdccf3c7
http://git.geda-project.org/geda-gaf/commit/?id=6e840360d6ec5ca1083c910f614807e2bdccf3c7

commit 6e840360d6ec5ca1083c910f614807e2bdccf3c7
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced PATHMODE.

    All path states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate path functions.

    Although gschem did not crash on Ctrl-x for paths, that was
    because the code for paths did not always use corresponding
    assertions for checking w_current->inside_actions as did the code
    for other primitives. This patch adds both the assertions and the
    code to fix such crashes for paths.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 51615c8893b78818b54769cccb094e01a7ddcf47
http://git.geda-project.org/geda-gaf/commit/?id=51615c8893b78818b54769cccb094e01a7ddcf47

commit 51615c8893b78818b54769cccb094e01a7ddcf47
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced NETMODE.

    All net states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate net functions.

    This patch also fixes crashes on Ctrl-x for nets.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 583783e3f23b58f1b2bae44249668e2bcc084721
http://git.geda-project.org/geda-gaf/commit/?id=583783e3f23b58f1b2bae44249668e2bcc084721

commit 583783e3f23b58f1b2bae44249668e2bcc084721
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced PINMODE.

    All pin states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate pin functions.

    This patch also fixes crashes on Ctrl-x for pins.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 6e93499fb529f61cb4e808728c8eabfcd37b1f54
http://git.geda-project.org/geda-gaf/commit/?id=6e93499fb529f61cb4e808728c8eabfcd37b1f54

commit 6e93499fb529f61cb4e808728c8eabfcd37b1f54
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced PICTUREMODE.

    All picture states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate picture functions.

    This patch also fixes crashes on Ctrl-x for pictures.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 30f9337d23985149ece969d4a922a7cecb771997
http://git.geda-project.org/geda-gaf/commit/?id=30f9337d23985149ece969d4a922a7cecb771997

commit 30f9337d23985149ece969d4a922a7cecb771997
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced LINEMODE.

    All line states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate line functions.

    This patch also fixes crashes on Ctrl-x for lines.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit f2445e35402c61c8d60dfca049b60291354b71ed
http://git.geda-project.org/geda-gaf/commit/?id=f2445e35402c61c8d60dfca049b60291354b71ed

commit f2445e35402c61c8d60dfca049b60291354b71ed
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced CIRCLEMODE.

    All circle states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate circle functions.

    This patch also fixes crashes on Ctrl-x for circles.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 52a492e0d2f25c6c187ad6ed6d66ebb113014584
http://git.geda-project.org/geda-gaf/commit/?id=52a492e0d2f25c6c187ad6ed6d66ebb113014584

commit 52a492e0d2f25c6c187ad6ed6d66ebb113014584
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced BUSMODE.

    All bus states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate bus functions.

    This patch also fixes crashes on Ctrl-x for buses.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 1abc9cc93ac8a3a8096ea7cb31755609db7d36e2
http://git.geda-project.org/geda-gaf/commit/?id=1abc9cc93ac8a3a8096ea7cb31755609db7d36e2

commit 1abc9cc93ac8a3a8096ea7cb31755609db7d36e2
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced BOXMODE.

    All box states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate box functions.

    This patch also fixes crashes on Ctrl-x for boxes.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 21de1374a2b07e87b6cdb5c45068514a7ef7e56c
http://git.geda-project.org/geda-gaf/commit/?id=21de1374a2b07e87b6cdb5c45068514a7ef7e56c

commit 21de1374a2b07e87b6cdb5c45068514a7ef7e56c
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Introduced ARCMODE.

    All arc states have been replaced with that mode in combination
    with the inside_action variable. Setting and resetting of this
    variable have been moved into appropriate arc functions.

    This patch also fixes crashes on Ctrl-x for arcs.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit a7fe62e16425ba20b73d9793d249b4d76c26c447
http://git.geda-project.org/geda-gaf/commit/?id=a7fe62e16425ba20b73d9793d249b4d76c26c447

commit a7fe62e16425ba20b73d9793d249b4d76c26c447
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    gschem: Fix gschem crashes when <Ctrl-x> is hit in MOVEMODE.

    Affects-bug: lp-900122

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 0ab34b0ed71d09b7b7d7f5e874027f48ab22190d
http://git.geda-project.org/geda-gaf/commit/?id=0ab34b0ed71d09b7b7d7f5e874027f48ab22190d

commit 0ab34b0ed71d09b7b7d7f5e874027f48ab22190d
Author: Vladimir Zhbanov <email address hidden>
Commit: Vladimir Zhbanov <email address hidden>

    Revert "gschem: Don't change the inside_action variable by Ctrl-X."

    This reverts commit d94b0c9a561e6e541ad7447a9215395b3dafccd7 which
    incorrectly fixes gschem behaviour.

    Affects-bug: lp-900122

Changed in geda:
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.