From: Maeda Y. <ma...@th...> - 2006-04-06 17:59:36
|
I have succeeded to start up PyWM. But segmentaion fault occured when applications launched. I tried Emacs, Firefox, sylpheed, xev, xeyes... Only xterm and gnome-terminal were OK. I am using Fedora Core 5 and the following is the log when sylpheed launched: --- beginning of log --- myWindowClass.__init__: creating a window myWindowClass.__init__: window Sylpheed version 2.0.4 created flwm_.py_on_create: chained handler ok flwm_.py_on_create: a chained handler failed Traceback (most recent call last): File "flwm_.pyx", line 681, in flwm_.py_on_create File "/usr/lib/python2.4/site-packages/pywm/applets.py", line 66, in taskbarRefresh if win: File "flwm_.pyx", line 731, in flwm_.py_on_activate File "/usr/lib/python2.4/site-packages/pywm/__init__.py", line 1107, in window return self.windows[hWin] KeyError: 159533600L myWindowManager: created window Sylpheed version 2.0.4 zsh: segmentation fault python .pywm/example5.pyc --- end --- Can you realize what was happening? If you need the additional informations, please let me know. Best regards, Maeda |
From: <el...@ji...> - 2006-04-07 20:42:31
|
Maeda Yasuyuki wrote: >I found that the exception was thrown even when xterm is launching. > > The exception gets thrown from time to time when doing something with windows, like creating them. Will have to look in this more deeply, concerning the apparently non-deterneministic nature of exception throwing. >This exception may not be concerned with segfaults directly >because PyWM kept running in this case. > > To me it seems that they are related, but as I don't get segfaults, It should be possible for also. >---beginning--- >myWindowClass.__init__: window xterm created >flwm_.py_on_create: chained handler ok >flwm_.py_on_create: a chained handler failed >Traceback (most recent call last): > File "flwm_.pyx", line 681, in flwm_.py_on_create > File "/usr/lib/python2.4/site-packages/pywm/applets.py", line 66, in taskbarRefresh > if win: > File "flwm_.pyx", line 731, in flwm_.py_on_activate > File "/usr/lib/python2.4/site-packages/pywm/__init__.py", line 1107, in window return self.windows[hWin] >KeyError: 143635344L >myWindowManager: created window xterm ><window hWin:0x88fb390 'xterm'> >Fl_Hold_Browser.clear: entered >Fl_Hold_Browser_clear: entered >flwm_.py_on_deactivate: chained handler ok >WM.on_deactivate: deactivated 'xterm' >---end--- > >Moreover, when I use example1 to example4, xterm caused PyWM down, >just example5 were OK. > >---beginning--- >*********** LAUNCHING FLWM ******************* >WM.on_create: created window 'xterm' >zsh: segmentation fault python /usr/lib/python2.4/site-packages/pywm/examples/example1.py >---end--- > >My envrioment is: >Pyrex : 0.9.3.1 >gcc : 4.1.0 >glibc : 2.4 >python : 2.4.2 >fltk : 1.1.7 > > I tested with a setup that differs only with glibc being v. 2.3.6 (I'm using debian testing). Still, pywm just keeps going, only complaining from time to time. What do you think is causing the segfaulting? Could you maybe test with differrent setups (different distros especially) Anyway, I'll try to fix the bug soon. >>Expect (don't depend on me though=) a solution around the weekend. >> >> >Thank you for your favor. I will try to figure it out, too. > >Maeda > > No problem, after all, I'm supposed to maintain this software =)... Elmo |
From: <el...@ji...> - 2006-04-08 22:43:56
Attachments:
flwm_.pyx
|
Elmo Mäntynen wrote: >Maeda Yasuyuki wrote: > > > >>I found that the exception was thrown even when xterm is launching. >> >> >> >> >The exception gets thrown from time to time when doing something with >windows, like creating them. Will have to look in this more deeply, >concerning the apparently non-deterneministic nature of exception throwing. > > Something realy weird happens with the pyrex code. I don't understand it yet, but attached is a version of flwm_.pyx that shouldn't fail (can you confirm this?), but around line 680, there's very rude hack. If you want to investigate, go ahead, I have to sleep now. Elmo |
From: <el...@ji...> - 2006-04-09 17:58:39
|
Maeda Yasuyuki wrote: >Elmo Mäntynen wrote: > > >>Something realy weird happens with the pyrex code. I don't understand it >>yet, but attached is a version of flwm_.pyx that shouldn't fail (can you >>confirm this?) >> >> >Indeed, no exceptions were thrown with the new flwm_.pyx. >However, segfaults still occured. > >I tried Fedora Core 3, which contains: >glibc 2.3.6 >gcc 3.4.4 >fltk 1.1.4 >python 2.3.4 >Pyrex 0.9.2 > >I suspected that multibyte for Japanese character caused the segfaults, so that I also installed English version Fedora Core 3.It also failed. > >Maeda > > Thanks a lot for your effort. As it segfaults only with certain apps, what would be the lowest common denominator, as in, what is in those apps that causes the segfaulting that isn't in the two terminal programs. Could it be sheer size, time that takes for them to start, or what? Could you maybe test other terminal progs, very small to very large www-browsers, and anything else of significance you might come up with. Thanks again. Elmo |
From: <el...@ji...> - 2006-04-10 18:26:48
|
Maeda Yasuyuki wrote: >I've got a point! >As was expected, the segfaults seems to be of a font problem. > >I found where the segfaults occurred: line 116 in Rotated.cpp >116: XSetFont(dpy, font_gc, fontstruct->fid); > >'fontstruct' was null when segfaults occurred. I couldn't follow how it should be set. > >Would you give me a suggestion to resolve the problem? > >Maeda > > Now that's great. I thought this particular bug shouldn't appear with fltk 1.1.4=<, but I happen to have two alternative fixes. As you seem to know c better than I do, you could look into them and propose a final fix. The fixes are in comments in Rotated.cpp (use the one attached), and you should first look around line 450. There's also something around 180, but that wouldn't work out of the box, since the fix happens after line 116 (they are at the same level). Hope this works, I should've thought about this sooner. Elmo |
From: <el...@ji...> - 2006-04-10 18:34:16
Attachments:
Rotated.cpp
|
Elmo Mäntynen wrote: >Maeda Yasuyuki wrote: > > > >>I've got a point! >>As was expected, the segfaults seems to be of a font problem. >> >>I found where the segfaults occurred: line 116 in Rotated.cpp >>116: XSetFont(dpy, font_gc, fontstruct->fid); >> >>'fontstruct' was null when segfaults occurred. I couldn't follow how it should be set. >> >>Would you give me a suggestion to resolve the problem? >> >>Maeda >> >> >> >> >Now that's great. I thought this particular bug shouldn't appear with >fltk 1.1.4=<, but I happen to have two alternative fixes. As you seem to >know c better than I do, you could look into them and propose a final >fix. The fixes are in comments in Rotated.cpp (use the one attached), >and you should first look around line 450. There's also something around >180, but that wouldn't work out of the box, since the fix happens after >line 116 (they are at the same level). Hope this works, I should've >thought about this sooner. > >Elmo > > > The file =) |