Michael-

Thank you for catching that.  I'll incorporate your suggestion into the
patchset.

Best-
Seth

On Sun, Oct 29, 2017 at 3:06 AM, Michael Geselbracht <
mgeselbrac...@gmail.com> wrote:

> Hi,
>
> just tested your patches. I think it is an improvement over the current
> master.
> But with this patch eeschema crashes on opening some (hierarchical) sheets
> either by double-clicking or using the navigator.
>
> I have changed eeschema/schematic_undo_redo.cpp:182
> from
>
> if( commandToUndo->m_Status == UR_WIRE_IMAGE )
>
> to
>
> if( commandToUndo && commandToUndo->m_Status == UR_WIRE_IMAGE )
>
> and now it seems to work.
>
>  - Michael
>
>
> Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
> 0x00007fffe6faf7e4 in SCH_EDIT_FRAME::SaveCopyInUndoList (this=0x1eca430,
> aItemsList=..., aTypeCommand=UR_CHANGED, aAppend=true, aTransformPoint=...)
>     at /data/src/kicad-source-mirror/eeschema/schematic_undo_redo.cpp:182
> 182             if( commandToUndo->m_Status == UR_WIRE_IMAGE )
> (gdb) bt
> #0  0x00007fffe6faf7e4 in SCH_EDIT_FRAME::SaveCopyInUndoList
> (this=0x1eca430, aItemsList=..., aTypeCommand=UR_CHANGED, aAppend=true,
> aTransformPoint=...)
>     at /data/src/kicad-source-mirror/eeschema/schematic_undo_redo.cpp:182
> #1  0x00007fffe6d987a2 in SCH_EDIT_FRAME::SchematicCleanUp
> (this=0x1eca430, aAppend=true) at /data/src/kicad-source-mirror/
> eeschema/bus-wire-junction.cpp:536
> #2  0x00007fffe6eb0c0e in SCH_EDIT_FRAME::DisplayCurrentSheet
> (this=0x1eca430) at /data/src/kicad-source-mirror/
> eeschema/hierarch.cpp:302
> #3  0x00007fffe6f053fc in SCH_EDIT_FRAME::OnLeftDClick (this=0x1eca430,
> aDC=0x7fffffffcfe0, aPosition=...)
>     at /data/src/kicad-source-mirror/eeschema/onleftclick.cpp:410
> #4  0x00007fffe70c8e6f in EDA_DRAW_PANEL::OnMouseEvent (this=0x1edf140,
> event=...) at /data/src/kicad-source-mirror/common/draw_panel.cpp:1134
> #5  0x00007ffff67d11fe in wxAppConsoleBase::CallEventHandler(wxEvtHandler*,
> wxEventFunctor&, wxEvent&) const ()
>    from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #6  0x00007ffff69576e7 in 
> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase
> const&, wxEvtHandler*, wxEvent&) ()
>    from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #7  0x00007ffff69577db in wxEventHashTable::HandleEvent(wxEvent&,
> wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #8  0x00007ffff6957b8b in wxEvtHandler::TryHereOnly(wxEvent&) () from
> /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #9  0x00007ffff6957c13 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
> from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #10 0x00007ffff6957c75 in wxEvtHandler::ProcessEvent(wxEvent&) () from
> /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #11 0x00007ffff70ec77b in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
> () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
> #12 0x00007ffff69579e7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) ()
> from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #13 0x00007ffff6e984c6 in ?? () from /usr/lib/x86_64-linux-gnu/
> libwx_gtk2u_core-3.0.so.0
> #14 0x00007ffff4d1daec in ?? () from /usr/lib/x86_64-linux-gnu/
> libgtk-x11-2.0.so.0
> #15 0x00007ffff46f2fa5 in g_closure_invoke () from
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #16 0x00007ffff4704fc1 in ?? () from /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0
> #17 0x00007ffff470d7f9 in g_signal_emit_valist () from
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #18 0x00007ffff470e08f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0
> #19 0x00007ffff4e3593c in ?? () from /usr/lib/x86_64-linux-gnu/
> libgtk-x11-2.0.so.0
> #20 0x00007ffff4d1c284 in gtk_propagate_event () from
> /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
> #21 0x00007ffff4d1c63b in gtk_main_do_event () from
> /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
> #22 0x00007ffff4990c8c in ?? () from /usr/lib/x86_64-linux-gnu/
> libgdk-x11-2.0.so.0
> #23 0x00007ffff3fae197 in g_main_context_dispatch () from
> /lib/x86_64-linux-gnu/libglib-2.0.so.0
> ---Type <return> to continue, or q <return> to quit---q
> Quit
> (gdb) p *commandToUndo
> Cannot access memory at address 0x0
>
>
>
> Application: kicad
> Version: (2017-10-28 revision b416c3b4b)-seth, debug build
> Libraries:
>     wxWidgets 3.0.2
>     libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
> Platform: Linux 4.10.0-37-generic x86_64, 64 bit, Little endian, wxGTK
> Build Info:
>     wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
>     Boost: 1.58.0
>     Curl: 7.47.0
>     Compiler: GCC 5.4.0 with C++ ABI 1009
>
> Build settings:
>     USE_WX_GRAPHICS_CONTEXT=OFF
>     USE_WX_OVERLAY=OFF
>     KICAD_SCRIPTING=ON
>     KICAD_SCRIPTING_MODULES=ON
>     KICAD_SCRIPTING_WXPYTHON=ON
>     KICAD_SCRIPTING_ACTION_MENU=OFF
>     BUILD_GITHUB_PLUGIN=ON
>     KICAD_USE_OCE=ON
>     KICAD_SPICE=ON
>
>
>
> On 28.10.2017 02:09, Seth Hillbrand wrote:
>
> Hi All-
>
> Quick ping on this.  Master has moved on, so I've re-based the patch set
> to the current master, in case anyone is up for looking at it.  I also
> split out the largest patch into a couple of logical blocks, in hopes of
> making it easier to review.
>
> Lastly, I found and fixed a corner case where removing two segments on the
> same junction broke the undo/redo stack.
>
> Thanks!
> Seth
>
> On Mon, Oct 16, 2017 at 5:27 PM, Seth Hillbrand <seth.hillbr...@gmail.com>
> wrote:
>
>> Attached is a proposed patchset for automatically managing junctions​,
>> adding and deleting them as they are needed by the schematic.
>>
>> The patches touch a number of sections, so any reports of issues would be
>> greatly appreciated.  Notably, this introduces an "append" feature to
>> eeschema's undo save, which allows us to stack changes from different calls
>> into the undo list.  This removes the issue where "Delete Connection" would
>> break the undo stack.
>>
>> Schematic cleanup is moved from the SCH_SCREEN class into the
>> SCH_EDIT_FRAME class to provide access to the undo stack.
>>
>> Cleanup now checks for overlapping segments as well as duplicate
>> junctions and merge-able lines.
>>
>> Bugs reports addressed by this patchset:
>> https://bugs.launchpad.net/kicad/+bug/1563153
>> https://bugs.launchpad.net/kicad/+bug/593888
>> https://bugs.launchpad.net/kicad/+bug/1482111
>>
>> Any feedback would be greatly appreciated.
>>
>> -S​
>>
>>
>
>
> _______________________________________________
> 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

Reply via email to