Discussion:
[Bitpim-devel] Seg. fault on OS X
Michael Casteel
2004-09-09 05:17:59 UTC
Permalink
Roger Binns just confirmed that, since I was running from source on
this, I need to post to the 'devel' list. Below is the posting I
erroneously sent to the 'user' list.

Further, I searched the 'devel' archives, finding mention of crashes on
importing .vcf files on OS X. Noticing that the two posts I saw showed
'PHOTO' data in the VCF, I got rid of the one address I had with PHOTO
data, but it did not eliminate the crash. So, I'm supplying here details
of how I see BitPim crash, reliably, when importing a number of address
book entries via VCF export from Apple Address Book. (I had one success
at importing ONE entry) My existing phone directory in BitPim is 200+
entries, which mostly need merging (a few changes), with one or two
additions.

I have been using CVS to get BitPim for my OS X 10.3.5 machine
(MacCVSClient X in fact) and just updated yesterday. The splash screen
says '0.7.18-official' when starting 'pythonw bp.py'.

I just installed the latest wxpython today, having noted that the recent
CVS updates wouldn't launch due to undefined names. Now BitPim launches.

I have a VX4400, with no reproducible problems reading from the phone. I
haven't written to the phone for a couple months, as I am trying to
merge my Mac Address Book updates with the BitPim-downloaded address
book on the phone so I can upload an update.

I have downloaded/replacing the current phone address book and it comes
up OK when BitPim launches. My terminal window lists a number of 'no
file for xxx' messages as BP comes up, but there doesn't appear to be a
problem there. 'xxx' is things like built-in ringer names, or 'wallpaper
yyy' for wallpapers. I haven't downloaded them, not interested.

I have exported my Mac OS X address book contents as a .vcf file, and am
able to get part way through an import into BP. Shortly after selecting
the .vcf file (all.vcf), a window fills with data, 'import vcard file',
which appears to list the contents of all.vcf in BP tabular form. At
this point the terminal window shows a number of messages of the form,

ignoring custom field ['X-ABSHOWAS']
ignoring custom field ['ITEM1.X-ABADR']
ignoring custom field ['ITEM1.X-ABADR']
ignoring custom field ['ITEM1.X-ABADR']
ignoring custom field ['ITEM1.X-ABADR']

as well as

vcard import: no map for key organisational unit
vcard import: no map for key title

But, everything APPEARS to be OK at this point.

Clicking OK puts up a larger window, 'your data is being imported...',
and BP goes away for a while, working hard. It eventually comes back and
fills the window with a table of names/numbers, but not until after
writing the following to the terminal window:

*** malloc[5032]: error for object 0x8897650: Incorrect checksum for
freed object - object was probably modified after being freed; break at
szone_error

(sometimes it fills the terminal window with messages like the above)

A few seconds after the 'your data is being imported...' window updates,
pythonw crashes, the windows disappear, and the terminal window shows
'Bus error' (sometimes 'Segmentation fault').

On the latest run (as I was composing this), it was 'Bus error' and the
Crash Log showed:

Host Name: titan.casteel.org
Date/Time: 2004-09-08 12:31:09 -0700
OS Version: 10.3.5 (Build 7M34)
Report Version: 2

Command: Python
Path:
/System/Library/Frameworks/Python.framework/Versions/2.3/Resources/
Python.app/Contents/MacOS/Python
Version: 2.3 (2.3)
PID: 5032
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000014

Thread 0 Crashed:
0 libSystem.B.dylib 0x900015c8 szone_free + 0x528
1 com.apple.CoreFoundation 0x90190db8 CFRelease + 0x220
2 com.apple.CoreGraphics 0x9361b040 add_bitmaps_to_cache +
0x278
3 com.apple.CoreGraphics 0x93602fc8 CGFontUnlockBitmaps +
0x44
4 libRIP.A.dylib 0x91b83a04 ripc_DrawGlyphs + 0x770
5 com.apple.CoreGraphics 0x935fa330 drawGlyphs + 0x94
6 com.apple.CoreGraphics 0x935fb5a0
CGContextShowGlyphsWithAdvances + 0xd0
7 com.apple.QD 0x91568f2c
RenderGlyphRecordArrayWithCG + 0x650
8 com.apple.QD 0x91565760
ATSUDrawGlyphs(ATSGlyphVector*, unsigned long, unsigned long,
FixedPoint*, CGContext*) + 0x58
9 com.apple.QD 0x915656dc
TTextLineLayout::DrawText(unsigned long, unsigned long, long, long) +
0x298
10 com.apple.QD 0x91565418 ATSUDrawText + 0x98
11 com.apple.HIToolbox 0x927ded60
TATSUTextLayout::DrawBox(_HIThemeTextInfo*, CGRect const&, CGContext*) +
0x278
12 com.apple.HIToolbox 0x927dee94
DataEngine::DrawThemeTextBox(__CFString const*, CGRect const*,
_HIThemeTextInfo*, CGContext*) + 0xa4
13 com.apple.HIToolbox 0x927e442c HIThemeDrawTextBox +
0x100
14 com.apple.HIToolbox 0x927f8250 _DrawThemeTextBox + 0x22c
15 libwx_macd-2.5.2.dylib 0x026ff06c wxDC::DoDrawText(wxString
const&, int, int) + 0x3f8
16 libwx_macd-2.5.2.dylib 0x02830884
wxHtmlWordCell::Draw(wxDC&, int, int, int, int, wxHtmlRenderingInfo&) +
0x404
17 libwx_macd-2.5.2.dylib 0x02831a78
wxHtmlContainerCell::Draw(wxDC&, int, int, int, int,
wxHtmlRenderingInfo&) + 0x2fc
18 libwx_macd-2.5.2.dylib 0x02831a78
wxHtmlContainerCell::Draw(wxDC&, int, int, int, int,
wxHtmlRenderingInfo&) + 0x2fc
19 libwx_macd-2.5.2.dylib 0x0283f38c
wxHtmlDCRenderer::Render(int, int, int, int, int, int*, int) + 0x1cc
20 _html.so 0x0451e7d8
_wrap_HtmlDCRenderer_Render + 0x530 (wxPython.h:48)
21 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
22 org.python.Python.framework 0x95fa9df0 PyEval_GetFuncDesc +
0xb24
23 org.python.Python.framework 0x95fa6d44 PyEval_EvalCode + 0x2640
24 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
25 org.python.Python.framework 0x95fa97dc PyEval_GetFuncDesc +
0x510
26 org.python.Python.framework 0x95fa9580 PyEval_GetFuncDesc +
0x2b4
27 org.python.Python.framework 0x95fa6c64 PyEval_EvalCode + 0x2560
28 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
29 org.python.Python.framework 0x95fa97dc PyEval_GetFuncDesc +
0x510
30 org.python.Python.framework 0x95fa9580 PyEval_GetFuncDesc +
0x2b4
31 org.python.Python.framework 0x95fa6c64 PyEval_EvalCode + 0x2560
32 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
33 org.python.Python.framework 0x95f5f354 PyFunction_SetClosure +
0xd6c
34 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
35 org.python.Python.framework 0x95f529e8 PyMethod_New + 0xbf0
36 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
37 org.python.Python.framework 0x95fa91ec
PyEval_CallObjectWithKeywords + 0x100
38 _core_.so 0x013df15c
wxPyCallbackHelper::callCallbackObj(_object*) const + 0x24
(helpers.cpp:1728)
39 _core_.so 0x013df224
wxPyCBH_callCallback(wxPyCallbackHelper const&, _object*) + 0x18
(helpers.cpp:1710)
40 _grid.so 0x04b01998 0x4ab0000 + 0x51998
41 libwx_macd-2.5.2.dylib 0x027fe924 wxGrid::DrawCell(wxDC&,
wxGridCellCoords const&) + 0x140
42 libwx_macd-2.5.2.dylib 0x027fe55c
wxGrid::DrawGridCellArea(wxDC&, wxGridCellCoordsArray const&) + 0x530
43 libwx_macd-2.5.2.dylib 0x027f6900
wxGridWindow::OnPaint(wxPaintEvent&) + 0xb4
44 libwx_macd-2.5.2.dylib 0x026cf444
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) + 0x9c
45 libwx_macd-2.5.2.dylib 0x026ceb48
wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 0xdc
46 libwx_macd-2.5.2.dylib 0x026cf624
wxEvtHandler::ProcessEvent(wxEvent&) + 0xfc
47 libwx_macd-2.5.2.dylib 0x02736804
wxWindow::MacDoRedraw(void*, long) + 0x27c
48 libwx_macd-2.5.2.dylib 0x027309dc
wxMacWindowControlEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 0x1c4
49 libwx_macd-2.5.2.dylib 0x02731274
wxMacWindowEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*,
void*) + 0x80
50 com.apple.HIToolbox 0x927d1fc8 DispatchEventToHandlers +
0x150
51 com.apple.HIToolbox 0x927d223c
SendEventToEventTargetInternal + 0x174
52 com.apple.HIToolbox 0x927d66bc
SendEventToEventTargetWithOptions + 0x28
53 com.apple.HIToolbox 0x927ddd5c
SendControlDefDraw(HIView*, short, OpaqueGrafPtr*, OpaqueRgnHandle*,
CGContext*) + 0x120
54 com.apple.HIToolbox 0x927d7e7c
HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*,
CGContext*) + 0x20c
55 com.apple.HIToolbox 0x927d7f84
HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*,
CGContext*) + 0x314
56 com.apple.HIToolbox 0x927d7f84
HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*,
CGContext*) + 0x314
57 com.apple.HIToolbox 0x927d7f84
HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*,
CGContext*) + 0x314
58 com.apple.HIToolbox 0x927d7f84
HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*,
CGContext*) + 0x314
59 com.apple.HIToolbox 0x927dcb84 HIView::Draw(short,
OpaqueGrafPtr*, OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) +
0x284
60 com.apple.HIToolbox 0x9280aa98 _HIViewRender + 0x6c
61 com.apple.HIToolbox 0x927d1a98 _FlushWindow + 0xfc
62 com.apple.HIToolbox 0x927d2af8 FlushAllWindows + 0x24
63 com.apple.HIToolbox 0x927d3f38
FlushAllBuffers(__CFRunLoopObserver*, CFRunLoopActivity, void*) + 0x34
64 com.apple.CoreFoundation 0x90191d30 __CFRunLoopDoObservers +
0x194
65 com.apple.CoreFoundation 0x90195f04 CFRunLoopRunSpecific +
0x130
66 com.apple.HIToolbox 0x927d5f88 RunCurrentEventLoopInMode
+ 0xac
67 com.apple.HIToolbox 0x927dc668 ReceiveNextEventCommon +
0xf4
68 com.apple.HIToolbox 0x9284d7fc ReceiveNextEventInMode +
0x48
69 libwx_macd-2.5.2.dylib 0x026ea7a4 wxApp::MacDoOneEvent() +
0x4c
70 libwx_macd-2.5.2.dylib 0x02703d94 wxDialog::DoShowModal() +
0x90
71 libwx_macd-2.5.2.dylib 0x02703cd0 wxDialog::Show(bool) +
0x7c
72 libwx_macd-2.5.2.dylib 0x02703e0c wxDialog::ShowModal() +
0x50
73 _windows_.so 0x02cdf284 _wrap_Dialog_ShowModal +
0x100 (wxPython.h:48)
74 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
75 org.python.Python.framework 0x95fa9df0 PyEval_GetFuncDesc +
0xb24
76 org.python.Python.framework 0x95fa6d44 PyEval_EvalCode + 0x2640
77 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
78 org.python.Python.framework 0x95fa97dc PyEval_GetFuncDesc +
0x510
79 org.python.Python.framework 0x95fa9580 PyEval_GetFuncDesc +
0x2b4
80 org.python.Python.framework 0x95fa6c64 PyEval_EvalCode + 0x2560
81 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
82 org.python.Python.framework 0x95fa97dc PyEval_GetFuncDesc +
0x510
83 org.python.Python.framework 0x95fa9580 PyEval_GetFuncDesc +
0x2b4
84 org.python.Python.framework 0x95fa6c64 PyEval_EvalCode + 0x2560
85 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
86 org.python.Python.framework 0x95f5f354 PyFunction_SetClosure +
0xd6c
87 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
88 org.python.Python.framework 0x95fa9df0 PyEval_GetFuncDesc +
0xb24
89 org.python.Python.framework 0x95fa6d44 PyEval_EvalCode + 0x2640
90 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
91 org.python.Python.framework 0x95f5f354 PyFunction_SetClosure +
0xd6c
92 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
93 org.python.Python.framework 0x95f529e8 PyMethod_New + 0xbf0
94 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
95 org.python.Python.framework 0x95f51da8 _PyInstance_Lookup +
0x3810
96 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
97 org.python.Python.framework 0x95fa91ec
PyEval_CallObjectWithKeywords + 0x100
98 _core_.so 0x013ded84
wxPyCallback::EventThunker(wxEvent&) + 0x198 (helpers.cpp:1540)
99 libwx_macd-2.5.2.dylib 0x026cf444
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) + 0x9c
100 libwx_macd-2.5.2.dylib 0x026cf9f4
wxEvtHandler::SearchDynamicEventTable(wxEvent&) + 0xa0
101 libwx_macd-2.5.2.dylib 0x026cf5f8
wxEvtHandler::ProcessEvent(wxEvent&) + 0xd0
102 libwx_macd-2.5.2.dylib 0x0279a34c
wxMenuBase::SendEvent(int, int) + 0x90
103 libwx_macd-2.5.2.dylib 0x026e974c
wxMacAppCommandEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*,
void*) + 0x178
104 libwx_macd-2.5.2.dylib 0x026e98fc
wxMacAppEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)
+ 0xbc
105 com.apple.HIToolbox 0x927d1fc8 DispatchEventToHandlers +
0x150
106 com.apple.HIToolbox 0x927d223c
SendEventToEventTargetInternal + 0x174
107 com.apple.HIToolbox 0x927e46e4 SendEventToEventTarget +
0x28
108 com.apple.HIToolbox 0x927f96dc
SendHICommandEvent(unsigned long, HICommand const*, unsigned long,
unsigned long, unsigned char, OpaqueEventTargetRef*,
OpaqueEventTargetRef*, OpaqueEventRef**) + 0x170
109 com.apple.HIToolbox 0x9289189c SendMenuItemSelectedEvent
+ 0x88
110 com.apple.HIToolbox 0x92893478
FinishMenuSelection(MenuData*, MenuResult*, MenuResult*, unsigned long,
unsigned long, unsigned long) + 0x80
111 com.apple.HIToolbox 0x9285d78c MenuSelectCore(Point,
double, unsigned long, OpaqueMenuRef**, unsigned short*) + 0x164
112 com.apple.HIToolbox 0x92883b8c MenuSelect + 0x60
113 libwx_macd-2.5.2.dylib 0x0272ddfc
wxMacTopLevelMouseEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 0x2f8
114 libwx_macd-2.5.2.dylib 0x026e9938
wxMacAppEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)
+ 0xf8
115 com.apple.HIToolbox 0x927d1fc8 DispatchEventToHandlers +
0x150
116 com.apple.HIToolbox 0x927d223c
SendEventToEventTargetInternal + 0x174
117 com.apple.HIToolbox 0x927e46e4 SendEventToEventTarget +
0x28
118 com.apple.HIToolbox 0x92913560
HandleMouseEvent(OpaqueEventRef*) + 0x184
119 com.apple.HIToolbox 0x927e2c84
ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 0x1e8
120 com.apple.HIToolbox 0x927d2084 DispatchEventToHandlers +
0x20c
121 com.apple.HIToolbox 0x927d223c
SendEventToEventTargetInternal + 0x174
122 com.apple.HIToolbox 0x927e46e4 SendEventToEventTarget +
0x28
123 libwx_macd-2.5.2.dylib 0x026ea85c
wxApp::MacHandleOneEvent(void*) + 0x2c
124 libwx_macd-2.5.2.dylib 0x026ea7f4 wxApp::MacDoOneEvent() +
0x9c
125 libwx_macd-2.5.2.dylib 0x026ea3bc wxApp::MainLoop() + 0x24
126 _core_.so 0x013daf44 wxPyApp::MainLoop() +
0x54 (helpers.cpp:140)
127 _core_.so 0x0141a2cc _wrap_PyApp_MainLoop +
0x98 (_core_wrap.cpp:20009)
128 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
129 org.python.Python.framework 0x95fa9df0 PyEval_GetFuncDesc +
0xb24
130 org.python.Python.framework 0x95fa6d44 PyEval_EvalCode + 0x2640
131 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
132 org.python.Python.framework 0x95f5f354 PyFunction_SetClosure +
0xd6c
133 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
134 org.python.Python.framework 0x95f529e8 PyMethod_New + 0xbf0
135 org.python.Python.framework 0x95f4a8d0 PyObject_Call + 0x30
136 org.python.Python.framework 0x95fa9ba8 PyEval_GetFuncDesc +
0x8dc
137 org.python.Python.framework 0x95fa9598 PyEval_GetFuncDesc +
0x2cc
138 org.python.Python.framework 0x95fa6c64 PyEval_EvalCode + 0x2560
139 org.python.Python.framework 0x95fa9728 PyEval_GetFuncDesc +
0x45c
140 org.python.Python.framework 0x95fa9580 PyEval_GetFuncDesc +
0x2b4
141 org.python.Python.framework 0x95fa6c64 PyEval_EvalCode + 0x2560
142 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
143 org.python.Python.framework 0x95fa97dc PyEval_GetFuncDesc +
0x510
144 org.python.Python.framework 0x95fa9580 PyEval_GetFuncDesc +
0x2b4
145 org.python.Python.framework 0x95fa6c64 PyEval_EvalCode + 0x2560
146 org.python.Python.framework 0x95fa7e30 PyEval_EvalCodeEx + 0x850
147 org.python.Python.framework 0x95fa4734 PyEval_EvalCode + 0x30
148 org.python.Python.framework 0x95fc85f0 PyRun_FileExFlags + 0xe4
149 org.python.Python.framework 0x95fc7668 PyRun_SimpleFileExFlags +
0x1bc
150 org.python.Python.framework 0x95fd1ec0 Py_Main + 0x7cc
151 org.python.python 0x00003c78 0x1000 + 0x2c78
152 org.python.python 0x00003aec 0x1000 + 0x2aec
--
Mike Casteel
***@casteel.org Seattle, WA
Roger Binns
2004-09-09 05:30:03 UTC
Permalink
Post by Michael Casteel
Further, I searched the 'devel' archives, finding mention of crashes
on importing .vcf files on OS X.
The stack trace you have is from the dialog that shows the results
of merging the import data with the existing data. It uses a
grid widget (which is conceptually like a spreadsheet) and each
cell is drawn using HTML. That can be seen in the stack trace.

Please email me the index.idx file from your ~/.bitpim-files/phonebook
directory as well as the vcards you are importing. You can remove
content if you want providing the problem still happens.

This is a bug of some form within wxPython.
Post by Michael Casteel
Noticing that the two posts I saw
showed 'PHOTO' data in the VCF, I got rid of the one address I had
with PHOTO data, but it did not eliminate the crash.
Photo fields are currently ignored which is why it makes no difference.
Post by Michael Casteel
I have been using CVS to get BitPim for my OS X 10.3.5 machine
(MacCVSClient X in fact) and just updated yesterday. The splash screen
says '0.7.18-official' when starting 'pythonw bp.py'.
Make sure you are running the correct/latest versions of all the
libraries etc.

Alternatively also checkout to see if you get this issue with
0.7.17 official release as that definitely has the correct
version of everything.
Post by Michael Casteel
I just installed the latest wxpython today, having noted that the
recent CVS updates wouldn't launch due to undefined names. Now BitPim
launches.
That is the other reason you need to follow this list if you
are running from source. You will know about library and version
changes. You certainly shouldn't be in a mode of only paying
attention if something breaks badly.
Post by Michael Casteel
comes up OK when BitPim launches. My terminal window lists a number
of 'no file for xxx' messages as BP comes up, but there doesn't
appear to be a problem there. 'xxx' is things like built-in ringer
names, or 'wallpaper yyy' for wallpapers. I haven't downloaded them,
not interested.
Yup. Note that the distributed releases don't print anything at
all. That kind of stuff is more of a reminder for the developers
to look out for things.
Post by Michael Casteel
ignoring custom field ['X-ABSHOWAS']
ignoring custom field ['ITEM1.X-ABADR']
ignoring custom field ['ITEM1.X-ABADR']
ignoring custom field ['ITEM1.X-ABADR']
ignoring custom field ['ITEM1.X-ABADR']
as well as
vcard import: no map for key organisational unit
vcard import: no map for key title
But, everything APPEARS to be OK at this point.
Yes, that is just what it says. Custom fields are ignored and
there is currently no code to handle organisational unit or
title.

Roger

Loading...