← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew crashes when opening general options

 

--4-1016925059-3436809320=:5 Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Following up: I fixed the bug by commenting out the SetFont call in
WinEDA_PcbGeneralOptionsFrame::Create. Here's
<http://f1.grp.yahoofs.com/v1/8LNwRf-qRHiBdOd202yzB6W9ggER0O_y2qGbVRvZIk\
zvcHMvlXicigjII4juvAun3bJs9VxWpqSZDgKT1q3F0cYPrkr6JW7J/macosx_crash_and_\
build_fixes.diff> the patch, along with makefile fixes for building on
macosx.

Enjoy!

--- In kicad-devel@xxxxxxxxxxxxxxx, "dilomenac" <dilomenac@...> wrote:
>
> Clicking the general options menu item in the preferences menu causes
a repeatable
> crash. As far as I know, all other menus and menu items work. It looks
to be either a bad
> pointer being passed to wxWidgets from
WinEDA_PcbGeneralOptionsFrame::Create, or a
> bug in wxWidgets itself. Here's an excerpt of the crash dump:
>
> Date/Time: 2006-12-01 14:16:55.281 -0500
> OS Version: 10.4.8 (Build 8L2127)
> Report Version: 4
>
> Command: pcbnew
> Path: /usr/local/kicad/macosx/pcbnew
> Parent: kicad [16809]
>
> Version: 1.0d0 (1.0d0)
>
> PID: 16816
> Thread: 0
>
> Exception: EXC_BAD_ACCESS (0x0001)
> Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
>
> Thread 0 Crashed:
> 0 pcbnew 0x001b3731 wxWindow::MacUpdateControlFont() +
17
> 1 pcbnew 0x001b3806 wxWindow::SetFont(wxFont const&) +
36
> 2 pcbnew 0x0007cece
WinEDA_PcbGeneralOptionsFrame::Create(wxWindow*,
> int, wxString const&, wxPoint const&, wxSize const&, long) + 40
> 3 pcbnew 0x0007d13c
>
WinEDA_PcbGeneralOptionsFrame::WinEDA_PcbGeneralOptionsFrame[in-charge]
> (WinEDA_PcbFrame*, wxDC*, int, wxString const&, wxPoint const&, wxSize
const&, long) +
> 196
> 4 pcbnew 0x0008747d
WinEDA_PcbFrame::InstallPcbOptionsFrame(wxPoint
> const&, wxDC*, int) + 741
> 5 pcbnew 0x000589b3
WinEDA_PcbFrame::Process_Config(wxCommandEvent&)
> + 483
> 6 pcbnew 0x0017c90b
wxEvtHandler::ProcessEventIfMatches
> (wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) + 111
> 7 pcbnew 0x0017caa3
wxEventHashTable::HandleEvent(wxEvent&,
> wxEvtHandler*) + 103
> 8 pcbnew 0x0017cf2a
wxEvtHandler::ProcessEvent(wxEvent&) + 186
> 9 pcbnew 0x0017b299 wxMenuBase::SendEvent(int, int) +
217
> 10 pcbnew 0x002123f8
wxMacAppEventHandler(OpaqueEventHandlerCallRef*,
> OpaqueEventRef*, void*) + 1444
> 11 com.apple.HIToolbox 0x92dc886b
DispatchEventToHandlers(EventTargetRec*,
> OpaqueEventRef*, HandlerCallRec*) + 1093
> 12 com.apple.HIToolbox 0x92dc7f10
SendEventToEventTargetInternal(OpaqueEventRef*,
> OpaqueEventTargetRef*, HandlerCallRec*) + 304
> 13 com.apple.HIToolbox 0x92dcf1f0 SendEventToEventTarget + 56
> 14 com.apple.HIToolbox 0x92e4faf1 SendHICommandEvent(unsigned long,
HICommand
> const*, unsigned long, unsigned long, unsigned char,
OpaqueEventTargetRef*,
> OpaqueEventTargetRef*, OpaqueEventRef**) + 405
> 15 com.apple.HIToolbox 0x92e8375a
ProcessHICommandWithContextAndModifiers + 60
> 16 com.apple.HIToolbox 0x92e83704 SendMenuItemSelectedEvent + 128
> 17 com.apple.HIToolbox 0x92e8361c FinishMenuSelection(MenuData*,
MenuData*,
> MenuResult*, MenuResult*, unsigned long, unsigned long, unsigned long,
unsigned char)
> + 122
> 18 com.apple.HIToolbox 0x92e68485 MenuSelectCore(MenuData*, Point,
double,
> unsigned long, OpaqueMenuRef**, unsigned short*) + 515
> 19 com.apple.HIToolbox 0x92e67f26 MenuSelect + 100
> 20 pcbnew 0x001c766a wxMacTopLevelMouseEventHandler
> (OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 2468
> 21 pcbnew 0x0021244a
wxMacAppEventHandler(OpaqueEventHandlerCallRef*,
> OpaqueEventRef*, void*) + 1526
> 22 com.apple.HIToolbox 0x92dc886b
DispatchEventToHandlers(EventTargetRec*,
> OpaqueEventRef*, HandlerCallRec*) + 1093
> 23 com.apple.HIToolbox 0x92dc7f10
SendEventToEventTargetInternal(OpaqueEventRef*,
> OpaqueEventTargetRef*, HandlerCallRec*) + 304
> 24 com.apple.HIToolbox 0x92dcf1f0 SendEventToEventTarget + 56
> 25 com.apple.HIToolbox 0x92dcfc0d ToolboxEventDispatcherHandler
> (OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 2587
> 26 com.apple.HIToolbox 0x92dc8c22
DispatchEventToHandlers(EventTargetRec*,
> OpaqueEventRef*, HandlerCallRec*) + 2044
> 27 com.apple.HIToolbox 0x92dc7f10
SendEventToEventTargetInternal(OpaqueEventRef*,
> OpaqueEventTargetRef*, HandlerCallRec*) + 304
> 28 com.apple.HIToolbox 0x92dcf1f0 SendEventToEventTarget + 56
> 29 pcbnew 0x0020fe9c wxApp::MacHandleOneEvent(void*) +
34
> 30 pcbnew 0x0020ff3e wxApp::MacDoOneEvent() + 108
> 31 pcbnew 0x0020ffcc wxApp::MainLoop() + 22
> 32 pcbnew 0x00164346 wxEntry(int&, wchar_t**) + 86
> 33 pcbnew 0x00002cd2 main + 24
> 34 pcbnew 0x000025de _start + 216
> 35 pcbnew 0x00002505 start + 41
>

--4-1016925059-3436809320=:5 Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Following up: I fixed the bug by commenting out the SetFont call in WinEDA_=
PcbGeneralOptionsFrame::Create. <a href=3D"http://f1.grp.yahoofs.com/v1/8LN=
wRf-qRHiBdOd202yzB6W9ggER0O_y2qGbVRvZIkzvcHMvlXicigjII4juvAun3bJs9VxWpqSZDg=
KT1q3F0cYPrkr6JW7J/macosx_crash_and_build_fixes.diff">Here's</a> the patch,=
along with makefile fixes for building on macosx.<br><br>Enjoy!<br><br>---=
In kicad-devel@xxxxxxxxxxxxxxx, &quot;dilomenac&quot; &lt;dilomenac@...&gt=
; wrote:<br>&gt;<br>&gt; Clicking the general options menu item in the pref=
erences menu causes a repeatable <br>&gt; crash. As far as I know, all othe=
r menus and menu items work. It looks to be either a bad <br>&gt; pointer b=
eing passed to wxWidgets from WinEDA_PcbGeneralOptionsFrame::Create, or a <=
br>&gt; bug in wxWidgets itself. Here's an excerpt of the crash dump:<br>&g=
t; <br>&gt; Date/Time: 2006-12-01 14:16:55.281 -0500<br>&gt; OS Versio=
n: 10.4.8 (Build 8L2127)<br>&gt; Report Version: 4<br>&gt; <br>&gt; Com=
mand: pcbnew<br>&gt; Path: /usr/local/kicad/macosx/pcbnew<br>&gt; Parent=
: kicad [16809]<br>&gt; <br>&gt; Version: 1.0d0 (1.0d0)<br>&gt; <br>&gt; P=
ID: 16816<br>&gt; Thread: 0<br>&gt; <br>&gt; Exception: EXC_BAD_ACCESS =
(0x0001)<br>&gt; Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000=
<br>&gt; <br>&gt; Thread 0 Crashed:<br>&gt; 0 pcbnew 0x001b=
3731 wxWindow::MacUpdateControlFont() + 17<br>&gt; 1 pcbnew =
0x001b3806 wxWindow::SetFont(wxFont const&amp;) + 36<br>&gt; 2 pcbnew =
0x0007cece WinEDA_PcbGeneralOptionsFrame::Create(wxWindow*, <br=
>&gt; int, wxString const&amp;, wxPoint const&amp;, wxSize const&amp;, long=
) + 40<br>&gt; 3 pcbnew 0x0007d13c <br>&gt; WinEDA_PcbGener=
alOptionsFrame::WinEDA_PcbGeneralOptionsFrame[in-charge]<br>&gt; (WinEDA_Pc=
bFrame*, wxDC*, int, wxString const&amp;, wxPoint const&amp;, wxSize const&=
amp;, long) + <br>&gt; 196<br>&gt; 4 pcbnew 0x0008747d WinE=
DA_PcbFrame::InstallPcbOptionsFrame(wxPoint <br>&gt; const&amp;, wxDC*, int=
) + 741<br>&gt; 5 pcbnew 0x000589b3 WinEDA_PcbFrame::Proces=
s_Config(wxCommandEvent&amp;) <br>&gt; + 483<br>&gt; 6 pcbnew =
0x0017c90b wxEvtHandler::ProcessEventIfMatches<br>&gt; (wxEventTableEntr=
yBase const&amp;, wxEvtHandler*, wxEvent&amp;) + 111<br>&gt; 7 pcbnew =
0x0017caa3 wxEventHashTable::HandleEvent(wxEvent&amp;, <br>&gt; =
wxEvtHandler*) + 103<br>&gt; 8 pcbnew 0x0017cf2a wxEvtHandl=
er::ProcessEvent(wxEvent&amp;) + 186<br>&gt; 9 pcbnew 0x001=
7b299 wxMenuBase::SendEvent(int, int) + 217<br>&gt; 10 pcbnew =
0x002123f8 wxMacAppEventHandler(OpaqueEventHandlerCallRef*, <br>&gt; Opaq=
ueEventRef*, void*) + 1444<br>&gt; 11 com.apple.HIToolbox 0x92dc886b Disp=
atchEventToHandlers(EventTargetRec*, <br>&gt; OpaqueEventRef*, HandlerCallR=
ec*) + 1093<br>&gt; 12 com.apple.HIToolbox 0x92dc7f10 SendEventToEventTar=
getInternal(OpaqueEventRef*, <br>&gt; OpaqueEventTargetRef*, HandlerCallRec=
*) + 304<br>&gt; 13 com.apple.HIToolbox 0x92dcf1f0 SendEventToEventTarget=
+ 56<br>&gt; 14 com.apple.HIToolbox 0x92e4faf1 SendHICommandEvent(unsign=
ed long, HICommand <br>&gt; const*, unsigned long, unsigned long, unsigned =
char, OpaqueEventTargetRef*, <br>&gt; OpaqueEventTargetRef*, OpaqueEventRef=
**) + 405<br>&gt; 15 com.apple.HIToolbox 0x92e8375a ProcessHICommandWithC=
ontextAndModifiers + 60<br>&gt; 16 com.apple.HIToolbox 0x92e83704 SendMen=
uItemSelectedEvent + 128<br>&gt; 17 com.apple.HIToolbox 0x92e8361c Finish=
MenuSelection(MenuData*, MenuData*, <br>&gt; MenuResult*, MenuResult*, unsi=
gned long, unsigned long, unsigned long, unsigned char) <br>&gt; + 122<br>&=
gt; 18 com.apple.HIToolbox 0x92e68485 MenuSelectCore(MenuData*, Point, do=
uble, <br>&gt; unsigned long, OpaqueMenuRef**, unsigned short*) + 515<br>&g=
t; 19 com.apple.HIToolbox 0x92e67f26 MenuSelect + 100<br>&gt; 20 pcbnew =
0x001c766a wxMacTopLevelMouseEventHandler<br>&gt; (OpaqueEven=
tHandlerCallRef*, OpaqueEventRef*, void*) + 2468<br>&gt; 21 pcbnew =
0x0021244a wxMacAppEventHandler(OpaqueEventHandlerCallRef*, <br>&gt;=
OpaqueEventRef*, void*) + 1526<br>&gt; 22 com.apple.HIToolbox 0x92dc886b=
DispatchEventToHandlers(EventTargetRec*, <br>&gt; OpaqueEventRef*, Handler=
CallRec*) + 1093<br>&gt; 23 com.apple.HIToolbox 0x92dc7f10 SendEventToEve=
ntTargetInternal(OpaqueEventRef*, <br>&gt; OpaqueEventTargetRef*, HandlerCa=
llRec*) + 304<br>&gt; 24 com.apple.HIToolbox 0x92dcf1f0 SendEventToEventT=
arget + 56<br>&gt; 25 com.apple.HIToolbox 0x92dcfc0d ToolboxEventDispatch=
erHandler<br>&gt; (OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 25=
87<br>&gt; 26 com.apple.HIToolbox 0x92dc8c22 DispatchEventToHandlers(Even=
tTargetRec*, <br>&gt; OpaqueEventRef*, HandlerCallRec*) + 2044<br>&gt; 27 =
com.apple.HIToolbox 0x92dc7f10 SendEventToEventTargetInternal(OpaqueEventR=
ef*, <br>&gt; OpaqueEventTargetRef*, HandlerCallRec*) + 304<br>&gt; 28 com=
.apple.HIToolbox 0x92dcf1f0 SendEventToEventTarget + 56<br>&gt; 29 pcbnew=
0x0020fe9c wxApp::MacHandleOneEvent(void*) + 34<br>&gt; 30 =
pcbnew 0x0020ff3e wxApp::MacDoOneEvent() + 108<br>&gt; 31 pc=
bnew 0x0020ffcc wxApp::MainLoop() + 22<br>&gt; 32 pcbnew =
0x00164346 wxEntry(int&amp;, wchar_t**) + 86<br>&gt; 33 pcbnew =
0x00002cd2 main + 24<br>&gt; 34 pcbnew 0x00002=
5de _start + 216<br>&gt; 35 pcbnew 0x00002505 start + 41<br>=
&gt;<br>
 --4-1016925059-3436809320=:5-- 




References