Discussion:
[Bitpim-devel] wxpython 2.5
Roger Binns
2004-08-24 05:13:20 UTC
Permalink
It took me 3 hours to change all the code and for
things to work.

Unfortunately some bug in the html code inside
the wxPython library got hit and core dumps
the process. It will take me a little while
to narrow that down.

Roger
Steven Palm
2004-08-24 05:44:01 UTC
Permalink
Unfortunately some bug in the html code inside the wxPython library
got hit and core dumps the process. It will take me a little while to
narrow that down.
Just a cursory examination on the Mac....

The wallpaper and ringer views are not using the some custom views
they were previously. Maybe this is intentional? At any rate, the
images in the wallpaper view do not show up, nor the icons in the
ringer view. I just get a list on the left, and a blank window on the
right. Selecting items changes nothing in the right view. There appears
to be a "dot" in the bar at the top of the window area, like a sizer
control, but I cannot grab it to size down a top frame if it's there.

In the phonebook view, if I click on a name that has an image attached
I get a segfault, and this:

handling url bpuserimage:pic00.jpg;width=64;height=64
/usr/local/src/bitpim/bitpim/wallpaper.py:384: DeprecationWarning:
wx.MaskColour is deprecated, use `wx.Mask` instead.
mask=wx.MaskColour(bitmap, transparent)

And a dump on the thread, in case it illuminates anything...

Thread 0 Crashed:
0 libSystem.B.dylib 0x9000bc94 strstr + 0x34
1 libwx_mac-2.5.2.dylib 0x02648230 wxString::Matches(char
const*) const + 0xe4
2 libwx_mac-2.5.2.dylib 0x027b7da0
_ZN15wxHtmlImageCellC4EP8wxWindowP8wxFSFileiidiRK8wxString + 0xf4
3 libwx_mac-2.5.2.dylib 0x0288c7e0 0x25fe000 + 0x28e7e0
4 libwx_mac-2.5.2.dylib 0x027a9ed4
wxHtmlParser::AddTag(wxHtmlTag const&) + 0xec
5 libwx_mac-2.5.2.dylib 0x027a9dc0
wxHtmlParser::DoParsing(int, int) + 0x224
6 libwx_mac-2.5.2.dylib 0x027a9f00
wxHtmlParser::AddTag(wxHtmlTag const&) + 0x118
7 libwx_mac-2.5.2.dylib 0x027a9dc0
wxHtmlParser::DoParsing(int, int) + 0x224
8 libwx_mac-2.5.2.dylib 0x027a9f00
wxHtmlParser::AddTag(wxHtmlTag const&) + 0x118
9 libwx_mac-2.5.2.dylib 0x027a9dc0
wxHtmlParser::DoParsing(int, int) + 0x224
10 libwx_mac-2.5.2.dylib 0x0289148c 0x25fe000 + 0x29348c
11 libwx_mac-2.5.2.dylib 0x027a9ed4
wxHtmlParser::AddTag(wxHtmlTag const&) + 0xec
12 libwx_mac-2.5.2.dylib 0x027a9dc0
wxHtmlParser::DoParsing(int, int) + 0x224
13 libwx_mac-2.5.2.dylib 0x027a9f00
wxHtmlParser::AddTag(wxHtmlTag const&) + 0x118
14 libwx_mac-2.5.2.dylib 0x027a9dc0
wxHtmlParser::DoParsing(int, int) + 0x224
15 libwx_mac-2.5.2.dylib 0x027a9f00
wxHtmlParser::AddTag(wxHtmlTag const&) + 0x118
16 libwx_mac-2.5.2.dylib 0x027a9dc0
wxHtmlParser::DoParsing(int, int) + 0x224
17 libwx_mac-2.5.2.dylib 0x027a95b8
wxHtmlParser::Parse(wxString const&) + 0x2c
18 libwx_mac-2.5.2.dylib 0x027ae7dc
wxHtmlWindow::SetPage(wxString const&) + 0x388
19 _html.so 0x0452ed94 _wrap_HtmlWindow_SetPage
+ 0x160 (wxPython.h:48)
20 <<00000000>> 0x95f4a8d0 0 + 0x95f4a8d0
21 <<00000000>> 0x95fa9df0 0 + 0x95fa9df0
22 <<00000000>> 0x95fa6d44 0 + 0x95fa6d44
23 <<00000000>> 0x95fa7e30 0 + 0x95fa7e30
24 <<00000000>> 0x95f5f354 0 + 0x95f5f354
25 <<00000000>> 0x95f4a8d0 0 + 0x95f4a8d0
26 <<00000000>> 0x95f529e8 0 + 0x95f529e8
27 <<00000000>> 0x95f4a8d0 0 + 0x95f4a8d0
28 <<00000000>> 0x95fa9ba8 0 + 0x95fa9ba8
29 <<00000000>> 0x95fa9598 0 + 0x95fa9598
30 <<00000000>> 0x95fa6c64 0 + 0x95fa6c64
31 <<00000000>> 0x95fa9728 0 + 0x95fa9728
32 <<00000000>> 0x95fa9580 0 + 0x95fa9580
33 <<00000000>> 0x95fa6c64 0 + 0x95fa6c64
34 <<00000000>> 0x95fa9728 0 + 0x95fa9728
35 <<00000000>> 0x95fa9580 0 + 0x95fa9580
36 <<00000000>> 0x95fa6c64 0 + 0x95fa6c64
37 <<00000000>> 0x95fa9728 0 + 0x95fa9728
38 <<00000000>> 0x95fa9580 0 + 0x95fa9580
39 <<00000000>> 0x95fa6c64 0 + 0x95fa6c64
40 <<00000000>> 0x95fa7e30 0 + 0x95fa7e30
41 <<00000000>> 0x95f5f354 0 + 0x95f5f354
42 <<00000000>> 0x95f4a8d0 0 + 0x95f4a8d0
43 <<00000000>> 0x95f529e8 0 + 0x95f529e8
44 <<00000000>> 0x95f4a8d0 0 + 0x95f4a8d0
45 <<00000000>> 0x95fa91ec 0 + 0x95fa91ec
46 _core_.so 0x013d61a4
wxPyCallback::EventThunker(wxEvent&) + 0x198 (helpers.cpp:1531)
47 libwx_mac-2.5.2.dylib 0x0265e1a8
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) + 0x9c
48 libwx_mac-2.5.2.dylib 0x0265e6f4
wxEvtHandler::SearchDynamicEventTable(wxEvent&) + 0x6c
49 libwx_mac-2.5.2.dylib 0x0265e32c
wxEvtHandler::ProcessEvent(wxEvent&) + 0xa0
50 libwx_mac-2.5.2.dylib 0x0273711c
wxWindowBase::TryParent(wxEvent&) + 0x60
51 libwx_mac-2.5.2.dylib 0x0273711c
wxWindowBase::TryParent(wxEvent&) + 0x60
52 libwx_mac-2.5.2.dylib 0x0265e384
wxEvtHandler::ProcessEvent(wxEvent&) + 0xf8
53 libwx_mac-2.5.2.dylib 0x0274eed4
wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) + 0x30
54 libwx_mac-2.5.2.dylib 0x02775fa0 wxGrid::SendEvent(int,
int, int) + 0x1b4
55 libwx_mac-2.5.2.dylib 0x027768e0
wxGrid::SetCurrentCell(wxGridCellCoords const&) + 0x34
56 libwx_mac-2.5.2.dylib 0x02774c08
wxGrid::ProcessGridCellMouseEvent(wxMouseEvent&) + 0x744
57 libwx_mac-2.5.2.dylib 0x0265e1a8
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) + 0x9c
58 libwx_mac-2.5.2.dylib 0x0265d948
wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 0xa0
59 libwx_mac-2.5.2.dylib 0x0265e358
wxEvtHandler::ProcessEvent(wxEvent&) + 0xcc
60 libwx_mac-2.5.2.dylib 0x026b71e0
wxMacTopLevelMouseEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 0x464
61 libwx_mac-2.5.2.dylib 0x026b7e28
wxMacTopLevelEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*,
void*) + 0xc4
62 <<00000000>> 0x927d1fc8 0 + 0x927d1fc8
63 <<00000000>> 0x927d223c 0 + 0x927d223c
64 <<00000000>> 0x927e46e4 0 + 0x927e46e4
65 <<00000000>> 0x927f2d64 0 + 0x927f2d64
66 <<00000000>> 0x9291354c 0 + 0x9291354c
67 <<00000000>> 0x927e2c84 0 + 0x927e2c84
68 <<00000000>> 0x927d2084 0 + 0x927d2084
69 <<00000000>> 0x927d223c 0 + 0x927d223c
70 <<00000000>> 0x927e46e4 0 + 0x927e46e4
71 libwx_mac-2.5.2.dylib 0x02678188
wxApp::MacHandleOneEvent(void*) + 0x2c
72 libwx_mac-2.5.2.dylib 0x02678120 wxApp::MacDoOneEvent() +
0x9c
73 libwx_mac-2.5.2.dylib 0x02677d64 wxApp::MainLoop() + 0x24
74 _core_.so 0x013d0ac4 wxPyApp::MainLoop() +
0x54 (helpers.cpp:140)
75 _core_.so 0x01410dac _wrap_PyApp_MainLoop +
0x98 (_core_wrap.cpp:19975)
76 <<00000000>> 0x95f4a8d0 0 + 0x95f4a8d0
77 <<00000000>> 0x95fa9df0 0 + 0x95fa9df0
78 <<00000000>> 0x95fa6d44 0 + 0x95fa6d44
79 <<00000000>> 0x95fa7e30 0 + 0x95fa7e30
80 <<00000000>> 0x95f5f354 0 + 0x95f5f354
81 <<00000000>> 0x95f4a8d0 0 + 0x95f4a8d0
82 <<00000000>> 0x95f529e8 0 + 0x95f529e8
83 <<00000000>> 0x95f4a8d0 0 + 0x95f4a8d0
84 <<00000000>> 0x95fa9ba8 0 + 0x95fa9ba8
85 <<00000000>> 0x95fa9598 0 + 0x95fa9598
86 <<00000000>> 0x95fa6c64 0 + 0x95fa6c64
87 <<00000000>> 0x95fa9728 0 + 0x95fa9728
88 <<00000000>> 0x95fa9580 0 + 0x95fa9580
89 <<00000000>> 0x95fa6c64 0 + 0x95fa6c64
90 <<00000000>> 0x95fa7e30 0 + 0x95fa7e30
91 <<00000000>> 0x95fa97dc 0 + 0x95fa97dc
92 <<00000000>> 0x95fa9580 0 + 0x95fa9580
93 <<00000000>> 0x95fa6c64 0 + 0x95fa6c64
94 <<00000000>> 0x95fa7e30 0 + 0x95fa7e30
95 <<00000000>> 0x95fa4734 0 + 0x95fa4734
96 <<00000000>> 0x95fc85f0 0 + 0x95fc85f0
97 <<00000000>> 0x95fc7668 0 + 0x95fc7668
98 <<00000000>> 0x95fd1ec0 0 + 0x95fd1ec0
99 org.python.python 0x00003c78 0x1000 + 0x2c78
100 org.python.python 0x00003aec 0x1000 + 0x2aec

I left my data cable at work, so I cannot test anything with the phone
just yet, I'll do that tomorrow.
Roger Binns
2004-08-24 06:09:03 UTC
Permalink
Post by Steven Palm
The wallpaper and ringer views are not using the some custom views
they were previously.
I changed it to a 3 pane view quite a while ago.
Post by Steven Palm
Selecting items changes nothing in the right view.
On Windows and Linux that wipes out the whole process.
Post by Steven Palm
In the phonebook view, if I click on a name that has an image attached
handling url bpuserimage:pic00.jpg;width=64;height=64
wx.MaskColour is deprecated, use `wx.Mask` instead.
mask=wx.MaskColour(bitmap, transparent)
That is all used by the HTML code to display an image. It is the
same symptom everywhere. Your stack trace is identical to the one
I get on Linux.

Unfortunately I can't get the local variables which would be the
greatest help. I also don't get the deprecation message you
get above.

Roger
Steven Palm
2004-08-24 14:46:16 UTC
Permalink
Post by Roger Binns
Post by Steven Palm
The wallpaper and ringer views are not using the some custom views
they were previously.
I changed it to a 3 pane view quite a while ago.
That's the problem, they are no longer 3-pane views... It appears that
they might want to be, but the top pane is not visible and cannot be
resized on the Mac:
Roger Binns
2004-08-25 02:29:46 UTC
Permalink
Post by Steven Palm
That's the problem, they are no longer 3-pane views... It appears
that they might want to be, but the top pane is not visible and
There shold be sliders that you can move. What if you make the whole
window larger?

It should look like this:

Loading Image...

The other problem with the wxPython 2.5 migration is a bug in
wxPython. I think I can work around it by using a C module
to fiddle the reference counts.

Roger
Steven Palm
2004-08-25 03:02:14 UTC
Permalink
Post by Roger Binns
Post by Steven Palm
That's the problem, they are no longer 3-pane views... It appears
that they might want to be, but the top pane is not visible and
There shold be sliders that you can move. What if you make the whole
window larger?
Sorry to be short, but yes, I know what it should look like... :-) It
looked like that in the prior versions. I was simply trying to point
out that it doesn't look that any longer with wx25, regardless of
window size (full screen, very small, whatever).

I found that by changing the splitter view styles in bpmedia.py
(removing wx.SP_3D) causes them to work again.

I put in a conditional for Mac there, if you'd rather deal with it
differently be my guest. ;-)

Steve
Roger Binns
2004-08-25 05:18:48 UTC
Permalink
Post by Steven Palm
I found that by changing the splitter view styles in bpmedia.py
(removing wx.SP_3D) causes them to work again.
I put in a conditional for Mac there, if you'd rather deal with it
differently be my guest. ;-)
That is fine by me. wx 2.5 does look different on Windows and
Mac as well. I think various styles like 3d that made things
look nice on wx 2.4 make it look worse on 2.5.

You may want to report this issue on the wxPython lists.

Roger
Roger Binns
2004-08-25 08:05:12 UTC
Permalink
All the code should now run fine. There may be some glitches
but you won't get exceptions (and let me know if you do).

I wrote a small module to work around the bug in wxPython 2.5
so there aren't any more coredumps. You need to run the
build script in native/pyobj.

Windows users can download the prebuilt dll from
http://sf.net/project/showfiles.php?group_id=75211&package_id=113804&release_id=263119
Just copy the file into native/pyobj

On Linux you need to use the GTK1 binding. The GTK2 binding
also uses unicode. I will look into working correctly with
the unicode version of wxPython.

Roger

Loading...