Changing grid origin in Footprint Editor causes crash

Bug #1836673 reported by ocb-hd-ccb on 2019-07-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Critical
Jeff Young

Bug Description

I am making footprints and when I hit hotkey "S" to set the grid origin it crashes all of kicad.

If you let me know how to provide additional information I would be happy to but I don't see a crash log or anything.

Application: KiCad
Version: (5.1.0-1269-ge4e2d1700), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.6.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Seth Hillbrand (sethh) wrote :

I believe that this was addressed by https://bugs.launchpad.net/kicad/+bug/1836626

Can you try with today's nightly and see if it still reproduces?

Changed in kicad:
status: New → Incomplete
ocb-hd-ccb (ocb-hd-ccb) wrote :

I am running "kicad-unified-20190714-070353-e4e2d1700-10_14.dmg" looks like the last few 10_14 builds have failed. When I see a new release I will update.

Where is the 'macos jenkins'?

tags: added: macos pcbnew
Jeff Young (jeyjey) wrote :

Yeah, my fix Seth linked to above should fix this.

Changed in kicad:
status: Incomplete → Fix Committed
ocb-hd-ccb (ocb-hd-ccb) wrote :

Thanks! I will give it a whirl as soon as the new macos 10-14 nightly is up. Its been a few days and I don’t know who to tell that they are not working.

Changed in kicad:
milestone: none → 6.0.0-rc1
ocb-hd-ccb (ocb-hd-ccb) wrote :

I don't know how to see which commit a particular build is on but the macOS 10-14 Nightly from today 20190717 did not fix the problem.

Application: KiCad
Version: (5.1.0-1308-g3539a2a18), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.6.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

ocb-hd-ccb (ocb-hd-ccb) wrote :

macOS 10-14 Nightly from today 20190718 did not fix the problem.

Seth Hillbrand (sethh) on 2019-07-18
Changed in kicad:
status: Fix Committed → New
Jeff Young (jeyjey) wrote :

Doesn't reproduce for me, and we're both on OSX. Do we know that the OSX nightlies are getting built?

Jeff Young (jeyjey) wrote :

There's a third number in the nightly link that I had hoped would be a git hash, but `git show` tells me it's unrecognized. Is there a way to tell the git hash without downloading it? (I'm on a plane with crap wifi....)

ocb-hd-ccb (ocb-hd-ccb) wrote :

Jeff there was a nightly with todays date so I assume that was a fresh build. That is the version I just tried.

ocb-hd-ccb (ocb-hd-ccb) wrote :

Jeff does this help:

Application: KiCad
Version: (5.1.0-1318-gb5cc49614), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.6.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Jeff Young (jeyjey) wrote :

It should (the number after the 'g' in the version string I thought was a git hash), but git is still telling me it's unrecognized.

@Seth, is that supposed to be a git hash? Should `git show b5cc49614` show me the commit, or am I doing something wrong?

Seth Hillbrand (sethh) wrote :

Unfortunately, based on how the Mac nightlies are built, there are always additional commits on top of the base commit to handle mac-specific stuff (if memory serves) So the hash won't match up. but the commit number will match within a few commits. -1318 is close to the current head.

That said, I just tried it here and no crash. @ocb - Can you attach the crash report from Console?

Application: ModEdit
Version: (5.1.0-1318-gad711ad80), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.2.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

ocb-hd-ccb (ocb-hd-ccb) wrote :
Download full text (4.1 KiB)

I don't know if this is what you want but I found this:

```
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
Assertion failed: (!m_clickHandler), function SetClickHandler, file /vagrant/build/kicad/src/kicad/pcbnew/tools/pcbnew_picker_tool.h, line 76.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff756512c6 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff7570cbf1 pthread_kill + 284
2 libsystem_c.dylib 0x00007fff755bb6a6 abort + 127
3 libsystem_c.dylib 0x00007fff7558420d __assert_rtn + 324
4 _pcbnew.kiface 0x0000000110361037 PCBNEW_PICKER_TOOL::SetClickHandler(std::__1::function<bool (VECTOR2<double> const&)>) + 87
5 _pcbnew.kiface 0x00000001103e9329 PCBNEW_CONTROL::GridSetOrigin(TOOL_EVENT const&) + 409
6 _pcbnew.kiface 0x00000001103fa705 int std::__1::__invoke_void_return_wrapper<int>::__call<std::__1::__bind<int (PCBNEW_CONTROL::*&)(TOOL_EVENT const&), PCBNEW_CONTROL*, std::__1::placeholders::__ph<1> const&>&, TOOL_EVENT const&>(std::__1::__bind<int (PCBNEW_CONTROL::*&)(TOOL_EVENT const&), PCBNEW_CONTROL*, std::__1::placeholders::__ph<1> const&>&&&, TOOL_EVENT const&&&) + 645
7 _pcbnew.kiface 0x00000001103fa3c9 std::__1::__function::__func<std::__1::__bind<int (PCBNEW_CONTROL::*&)(TOOL_EVENT const&), PCBNEW_CONTROL*, std::__1::placeholders::__ph<1> const&>, std::__1::allocator<std::__1::__bind<int (PCBNEW_CONTROL::*&)(TOOL_EVENT const&), PCBNEW_CONTROL*, std::__1::placeholders::__ph<1> const&> >, int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) + 57
8 _pcbnew.kiface 0x0000000110ffad1e std::__1::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const + 142
9 _pcbnew.kiface 0x0000000110ffac6d COROUTINE<int, TOOL_EVENT const&>::callerStub(long) + 109
10 _pcbnew.kiface 0x0000000110f4202a make_fcontext + 42
11 ??? 0x00007ffeea254310 0 + 140732826731280

Thread 1:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff7565261a __select + 10
1 com.apple.CoreFoundation 0x00007fff49616572 __CFSocketManager + 635
2 libsystem_pthread.dylib 0x00007fff7570a2eb _pthread_body + 126
3 libsystem_pthread.dylib 0x00007fff7570d249 _pthread_start + 66
4 libsystem_pthread.dylib 0x00007fff7570940d thread_start + 13

Thread 2:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff7564b22a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff7564b76c mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff495e8bee __CFRunLoopServiceMachPort + 328
3 com.apple.CoreFoundation 0x00007fff495e815c __CFRunLoopRun + 1612
4 com.apple.CoreFoundation 0x00007fff495e78be CFRunLoopRunSpecific + 455
5 com.apple.AppKit 0x00007fff46c756a6 _NSEventThread + 175
6 libsystem_pthread.dylib 0x00007...

Read more...

Jeff Young (jeyjey) wrote :

Definitely helps, but that /really/ makes it look like the bug that was fixed (it's firing the same assert that the clickHandler is already set because we re-entered the picker tool).

Jeff Young (jeyjey) wrote :

Hmm, @ocb-hd-ccb, did you happen to have either the net highlight tool, anchor tool, grid origin tool, or delete tool active when you hit 'S'? That will also provoke the re-entrancy bug, although in a much more straight-forward way.

Changed in kicad:
status: New → In Progress
assignee: nobody → Jeff Young (jeyjey)
ocb-hd-ccb (ocb-hd-ccb) wrote :

@Jeff I have been opening the first battery footprint in my tests and as soon as its open I just hit 's' then 's' again and it crashes. The standard mouse arrow tool is what is selected.

I just found another way to crash it. If you open footprint editor and without selecting a footprint if you click on the "add a pad" tool it crashes.

https://imgur.com/a/Ag2SvSD

I will check the crash log of the "add a pad" tool and see if it is the same error. If it is a different crash I will submit a new bug.

ocb-hd-ccb (ocb-hd-ccb) wrote :

 There is a nightly up from today that I am downloading currently. I will post the results tonight if it fixes any of my issues.

Seth Hillbrand (sethh) wrote :

That triggers it on linux as well.

The double-press was the ticket.
Application: KiCad
Version: (5.1.0-1319-g9fae30162), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-5-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: GCC 8.3.0 with C++ ABI 1013

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Changed in kicad:
importance: Undecided → Critical
Jeff Young (jeyjey) wrote :

The Pad Tool thing is a different bug, but I already linked the fix to this one, so no need for a new bug for it.

KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 02eb1d2c62bdd723dfc1ad69614effd056c4f55b
https://git.launchpad.net/kicad/patch/?id=02eb1d2c62bdd723dfc1ad69614effd056c4f55b

Changed in kicad:
status: In Progress → Fix Committed
ocb-hd-ccb (ocb-hd-ccb) wrote :

Testing this in the latest nightlies is a success. I don't have the grid origin bug or the pad on empty bug.

👍

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers