Discussion:
[Bitpim-devel] Seg. fault on OS X: same in 0.7.16
Michael Casteel
2004-09-09 19:25:24 UTC
Permalink
Having experienced this problem running the latest CVS version, I just
tried a full Mac OS X 10.3.5 address book import into my BitPim
phonebook (downloaded from my VX4400) using the prepackaged 0.7.16 from
sourceforge and had no success. The import preview window updated
listing the first part of the import, but after a few seconds, the
program crashed and the windows disappeared.

The console log said (same message as seen in the terminal with the CVS
version):

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

with this crash log snippet:

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

Thread 0 Crashed:
0 <<00000000>> 0x00000100 0 + 0x100
1 com.apple.HIToolbox 0x927f8f44 ThemeFontCreate(unsigned
short, float) + 0x20
2 com.apple.HIToolbox 0x927f5d04
DataEngine::GetThemeFontInfo(unsigned short, unsigned long,
TThemeDrawState const&, FontInfo*, Rect*, unsigned char*) + 0x34
3 com.apple.HIToolbox 0x927f815c _DrawThemeTextBox + 0x138
4 libwx_mac-2.4.0.dylib 0x025aa5e4 wxDC::DoDrawText(wxString
const&, int, int) + 0x4f0
5 libwx_mac-2.4.0.dylib 0x0271fd88
wxHtmlContainerCell::Draw(wxDC&, int, int, int, int) + 0x2e4
Roger Binns
2004-09-10 03:48:14 UTC
Permalink
0x138 4 libwx_mac-2.4.0.dylib 0x025aa5e4
You should spot a clue to your problem in that line :-)

Roger
Michael Casteel
2004-09-10 23:35:22 UTC
Permalink
Post by Roger Binns
0x138 4 libwx_mac-2.4.0.dylib 0x025aa5e4
You should spot a clue to your problem in that line :-)
Ah! If libwx 2.4.0 is broken, that would explain the crash in 0.7.16.

However, when I ran 0.7.18 from the CVS source, those crash logs
indicate that it was using the latest libwx, 2.5.2.8, and the crashes
exhibited the very same symptoms.

Perhaps libwx 2.5.2 is still broken in the same way that 2.4.0 was?
--
Mike Casteel
***@casteel.org Seattle, WA
Roger Binns
2004-09-12 23:45:26 UTC
Permalink
Post by Michael Casteel
Ah! If libwx 2.4.0 is broken, that would explain the crash in 0.7.16.
However, when I ran 0.7.18 from the CVS source, those crash logs
indicate that it was using the latest libwx, 2.5.2.8, and the crashes
exhibited the very same symptoms.
Perhaps libwx 2.5.2 is still broken in the same way that 2.4.0 was?
My mistake. I thought the log you were quoting was for .18 and
using wx 2.4 at the same time.

You should put a print statement in phonebook.ImportCellRenderer.Draw
to see what the actual text is that is causing the problem. Note
that it may also be the rect parameter or indeed any of the others
not making sense.

Roger
Michael Casteel
2004-09-14 05:14:22 UTC
Permalink
Post by Roger Binns
You should put a print statement in phonebook.ImportCellRenderer.Draw
to see what the actual text is that is causing the problem. Note that
it may also be the rect parameter or indeed any of the others not
making sense.
I put in some prints but saw nothing very enlightening from run to run.
In general, these prints showed that the entire window contents (more or
less) of import candidates is rendered twice (bottom-up), and THEN there
are a series of malloc[1166] errors, AFTER the last call to Draw. These
are all complaining about the same 'object', with the following error:

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

I wonder if this is a Python error, or wxPython?

SOMETIMES, there is one malloc error after the last Draw of the last
(top) line in the first rendering pass, before starting the second
rendering pass. When this happens, what was the first line rendered in
the initial pass does NOT get rendered--the second rendering pass starts
with the second line.

I then set the environment variable MallocHelp, read about
MallocScribble, and set MallocScribble.

When MallocScribble is set, everything seems to run OK, there are no
malloc errors displayed, and I can merge the whole import and save it!
This was verified in three separate tests to date.

MallocScribble seems to fix the problem?!? This warrants further
investigation. Any ideas are welcome.
--
Mike Casteel
***@casteel.org Seattle, WA
Loading...