[OSX] Any text size changes in pcbnew crashes program. Unable to edit text sizes in lib editor as well.

Bug #768706 reported by Shane Burrell
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Unassigned

Bug Description

This error occurs when hitting OK on the dialog and crashes the libeditor and/or pcbnew on any text size changes.

Revision history for this message
Jerry Jacobs (jerryjacobs-deactivatedaccount) wrote :

I can reproduce it, the thing is that it happens when you enter equal values without dots above 4? It has to do with some calculation of the width and height wish segfaults.

Application: PCBnew
Version: (2011-04-19 BZR 2975)-testing
Build: wxWidgets 2.9.2 (UTF-8,compiler with C++ ABI 1002,GCC 4.2.1,STL containers,compatible with 2.8)
Platform: Mac OS X (Darwin 10.7.0 i386), 32 bit, Little endian, wxMac

wxWidgets SVN 67521 universal:
./configure --enable-unicode=yes --enable-shared=no --enable-monolithic --with-opengl --with-expat=builtin --enable-universal_binary --enable-aui --disable-debug --with-osx_cocoa --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk/ --prefix=/opt/wxwidgets/67521

Changed in kicad:
assignee: nobody → Jerry Jacobs (jerryjacobs)
status: New → Confirmed
Revision history for this message
Jerry Jacobs (jerryjacobs-deactivatedaccount) wrote :
Download full text (3.9 KiB)

It still remains in PCBNew (rev 3082) and wxWidgets (rev 68903) and can't say what the real problem causes, because the backtrace is very long. Maybe Jean-Pierre or somebody else could have a look at it:

#0 0x00007fff88a57ce2 in __pthread_kill ()
#1 0x00007fff887a67d2 in pthread_kill ()
#2 0x00007fff88797a7a in abort ()
#3 0x00007fff868b97bc in abort_message ()
#4 0x00007fff868b6fdd in default_terminate ()
#5 0x00007fff8690787b in std::terminate ()
#6 0x0000000100383707 in PCB_EDIT_FRAME::Process_Special_Functions ()
#7 0x0000000100959cef in wxEvtHandler::ProcessEventIfMatchesId ()
#8 0x000000010095cf0b in wxEventHashTable::HandleEvent ()
#9 0x000000010095cf99 in wxEvtHandler::TryHereOnly ()
#10 0x000000010095c510 in wxEvtHandler::ProcessEvent ()
#11 0x000000010095cffa in wxEvtHandler::ProcessEventLocally ()
#12 0x000000010095c51f in wxEvtHandler::ProcessEvent ()
#13 0x0000000100aac81b in wxWindowBase::TryAfter ()
#14 0x000000010095c53c in wxEvtHandler::ProcessEvent ()
#15 0x0000000100acdcff in wxScrollHelperEvtHandler::ProcessEvent ()
#16 0x000000010095b66a in wxEvtHandler::SafelyProcessEvent ()
#17 0x0000000100aae430 in wxWindowBase::HandleWindowEvent ()
#18 0x0000000100a6d0bc in wxMenuBase::SendEvent ()
#19 0x000000010098dacf in wxMenu::HandleCommandProcess ()
#20 0x00007fff86f4711d in -[NSObject performSelector:withObject:] ()
#21 0x00007fff8bdec852 in -[NSApplication sendAction:to:from:] ()
#22 0x00007fff8bed934f in -[NSMenuItem _corePerformAction] ()
#23 0x00007fff8bed9086 in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] ()
#24 0x00007fff8c174e9c in -[NSMenu _internalPerformActionForItemAtIndex:] ()
#25 0x00007fff8c0073f1 in -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] ()
#26 0x00007fff8be530bf in NSSLMMenuEventHandler ()
#27 0x00007fff8cc948ec in DispatchEventToHandlers ()
#28 0x00007fff8cc93ef8 in SendEventToEventTargetInternal ()
#29 0x00007fff8ccaad03 in SendEventToEventTarget ()
#30 0x00007fff8ccf1249 in SendHICommandEvent ()
#31 0x00007fff8cdd80f1 in SendMenuCommandWithContextAndModifiers ()
#32 0x00007fff8ce1e5e1 in SendMenuItemSelectedEvent ()
#33 0x00007fff8ccea32d in FinishMenuSelection ()
#34 0x00007fff8ce16fed in PopUpMenuSelectCore ()
#35 0x00007fff8ce172ac in _HandlePopUpMenuSelection7 ()
#36 0x00007fff8c00a0bd in _NSSLMPopUpCarbonMenu3 ()
#37 0x00007fff8c3b102e in _NSPopUpCarbonMenu3 ()
#38 0x00007fff8c008222 in -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] ()
#39 0x00007fff8c1e5b41 in -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:] ()
#40 0x00000001009dd7e2 in wxMenuCocoaImpl::PopUp ()
#41 0x0000000100977b44 in wxWindow::DoPopupMenu ()
#42 0x0000000100aac8d7 in wxWindowBase::PopupMenu ()
#43 0x000000010010e808 in wxWindowBase::PopupMenu ()
#44 0x000000010073ab39 in EDA_DRAW_PANEL::OnRightClick ()
#45 0x0000000100736c75 in EDA_DRAW_PANEL::OnMouseEvent ()
#46 0x0000000100959cef in wxEvtHandler::ProcessEventIfMatchesId ()
#47 0x000000010095cf0b in wxEventHashTable::HandleEvent ()
#48 0x000000010095cf99 in wxEvtHandler::TryHereOnly ()
#49 0x000000010095cfd8 in wxEvtHandler::ProcessEventLocally ()
#50 0x000000...

Read more...

Changed in kicad:
importance: Undecided → Critical
Revision history for this message
Jerry Jacobs (jerryjacobs-deactivatedaccount) wrote :

Seems to work for me with revision 3351 and wxWidgets 70259 (with wxOverlay patch).

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

I think this bug revived, or may be it's MacOSX specific, I can reproduce it also, if you draw a circle in silkscreen, then change the width, it will crash right after that.

libc++abi.dylib: terminate called without an active exception

Program received signal SIGABRT, Aborted.
0x00007fff8733e212 in __pthread_kill ()
(gdb) backtace
Undefined command: "backtace". Try "help".
(gdb) backtrace
#0 0x00007fff8733e212 in __pthread_kill ()
#1 0x00007fff8a15bb54 in pthread_kill ()
#2 0x00007fff8a19fdce in abort ()
#3 0x00007fff92ecb9eb in abort_message ()
#4 0x00007fff92ec93a8 in default_terminate ()
#5 0x00007fff893bc527 in std::terminate ()
#6 0x00000001001c5860 in PCB_EDIT_FRAME::Process_Special_Functions ()
#7 0x0000000100c9db15 in wxEvtHandler::ProcessEventIfMatchesId ()
#8 0x0000000100ca10eb in wxEventHashTable::HandleEvent ()
#9 0x0000000100ca1179 in wxEvtHandler::TryHereOnly ()
#10 0x0000000100ca06e5 in wxEvtHandler::ProcessEvent ()
#11 0x00000001006622ef in EDA_BASE_FRAME::ProcessEvent ()
#12 0x0000000100ca11da in wxEvtHandler::ProcessEventLocally ()
#13 0x0000000100ca06f4 in wxEvtHandler::ProcessEvent ()
#14 0x00000001001f3711 in PCB_EDIT_FRAME::OnHotkeyEditItem ()
#15 0x00000001001f29fd in PCB_EDIT_FRAME::OnHotKey ()
#16 0x000000010003e06c in PCB_EDIT_FRAME::GeneralControl ()
#17 0x000000010068138b in EDA_DRAW_PANEL::OnKeyEvent ()
#18 0x0000000100c9db15 in wxEvtHandler::ProcessEventIfMatchesId ()
#19 0x0000000100ca10eb in wxEventHashTable::HandleEvent ()
#20 0x0000000100ca1179 in wxEvtHandler::TryHereOnly ()
#21 0x0000000100ca11b8 in wxEvtHandler::ProcessEventLocally ()
#22 0x0000000100ca06f4 in wxEvtHandler::ProcessEvent ()
#23 0x0000000100e796af in wxScrollHelperEvtHandler::ProcessEvent ()
#24 0x0000000100c9f83c in wxEvtHandler::SafelyProcessEvent ()
#25 0x0000000100e39970 in wxWindowBase::HandleWindowEvent ()
#26 0x0000000100cc9f58 in wxWindow::OSXHandleKeyEvent ()
#27 0x0000000100d6a6d1 in wxWidgetCocoaImpl::DoHandleCharEvent ()
#28 0x0000000100d68cd4 in wxWidgetCocoaImpl::insertText ()
#29 0x00007fff88654606 in -[NSKeyBindingManager(NSKeyBindingManager_MultiClients) flushTextForClient:] ()
#30 0x00007fff88203f05 in -[NSView interpretKeyEvents:] ()
#31 0x0000000100d6aa59 in wxWidgetCocoaImpl::DoHandleKeyEvent ()
#32 0x0000000100d68c5b in wxWidgetCocoaImpl::keyEvent ()
#33 0x00007fff8836c020 in -[NSWindow sendEvent:] ()
#34 0x0000000100d5c226 in -[wxNSWindow sendEvent:] ()
#35 0x00007fff88367644 in -[NSApplication sendEvent:] ()
#36 0x00007fff8827d21a in -[NSApplication run] ()
#37 0x0000000100d53a68 in wxGUIEventLoop::DoRun ()
#38 0x0000000100c85ccf in wxCFEventLoop::Run ()
#39 0x0000000100bdb014 in wxAppConsoleBase::MainLoop ()
#40 0x0000000100cfe0db in wxApp::OnRun ()
#41 0x0000000100c2ad36 in wxEntry ()
#42 0x000000010025a494 in main ()
(gdb) c
Continuing.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb)

It seems like the same backtrace.

Revision history for this message
Andrew Plumb (andrew-plumb) wrote :

I was able to stop my build from crashing on a pcbnew text resize/visibility change by disabling the "m_currentText->Draw()" calls in pcbnew/dialogs/dialog_edit_module_text.cpp in the "void DialogEditModuleText::OnOkClick( wxCommandEvent& event )" procedure. See https://bugs.launchpad.net/kicad/+bug/1230090

Hopefully someone more familiar with the code-base might be able implement a more elegant+permanent fix.

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.