Thread: Re: Fwd: Re: [Fxruby-users] random crashes with FXTable
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <jl...@cf...> - 2003-07-21 14:57:43
|
Emmanuel Touzery wrote: > This bug really blocks me, as the application is not usable in this > state; I was wondering if you could just tell me approximately when you hope > to fix it (days, weeks, months?). I am still trying to find a way to *consistently* reproduce the crash under Linux. Unlike your experience, the program doesn't crash when I simply try to load the glossary file (lyle-good.glo). I did get it to crash once, I think in the Bibliography dialog box, but haven't been able to do that again. > I tried with ruby 1.8 and the problems persist. I tried to fix it > myself, but it seems to be some kind of memory corruption problem, and > without knowledge of the source, i'm not getting anywhere. I would try to > reduce the source code related to the bug, but it's so easy to reproduce, > and the code is generally so simple, that i guess it wouldn't help (only > maybe if i reduce it a lot and try to port it to FOX/C++ to see if it's a > FOX bug maybe.. but it would take me forever...). As already noted, it's not so easy to reproduce (for me anyways ;) I agree with you that it's probably some kind of memory corruption problem; most of these difficult-to-reproduce bugs end up being related to interactions with Ruby's garbage collector. As a workaround, you might simply try disabling garbage collection altogether by adding the line: GC.disable at the beginning of the program. |
From: Emmanuel T. <emm...@wa...> - 2003-07-21 18:36:38
|
Hello, thank you VERY MUCH for the quick answer!!! On Monday 21 of July 2003 17:08, Lyle Johnson wrote: > Emmanuel Touzery wrote: > > This bug really blocks me, as the application is not usable in this > > state; I was wondering if you could just tell me approximately when you > > hope to fix it (days, weeks, months?). > > I am still trying to find a way to *consistently* reproduce the crash > under Linux. Unlike your experience, the program doesn't crash when I > simply try to load the glossary file (lyle-good.glo). I did get it to > crash once, I think in the Bibliography dialog box, but haven't been > able to do that again. oh.. i guess it must be a combination of glibc, ruby, etc... my system is a= =20 mandrake 8.0, kernel 2.4.3-20mdk, glibc 2.2.2-4mdk. but for me it's quite amazing, i tried to reduce the program to reproduce t= he=20 crash (i hoped to port it to C++ to see if it's a FOX problem maybe), i=20 started by trying to reduce the input file that creates the crash=20 (good-lyle.glo). as a result, i could remove maybe one or two lines out of= =20 200 or so! removing any single of the others, and the crash (at startup)=20 goes away (i didn't try to reorder lines). crashes on use under windows=20 happen at one point or another, always. i didn't use it long enough under=20 linux to know. what is your system? I have access to SuSE linux boxes at work (a bit old=20 versions i'm afraid). if (big luck but ok) i would have access to the same= =20 version of linux than you, i could try to make it reproduceable there.. (i= =20 assume you're on x86). if you can debug on windows, too (i assume), which windows? i have access t= o=20 98/XP/2000 boxes. i can try to make it crash for sure on those too.. (i'll try to generate dummy .glo files until i get something) > > I tried with ruby 1.8 and the problems persist. I tried to fix it > > myself, but it seems to be some kind of memory corruption problem, and > > without knowledge of the source, i'm not getting anywhere. I would try = to > > reduce the source code related to the bug, but it's so easy to reproduc= e, > > and the code is generally so simple, that i guess it wouldn't help (only > > maybe if i reduce it a lot and try to port it to FOX/C++ to see if it's= a > > FOX bug maybe.. but it would take me forever...). > > As already noted, it's not so easy to reproduce (for me anyways ;) I > agree with you that it's probably some kind of memory corruption > problem; most of these difficult-to-reproduce bugs end up being related > to interactions with Ruby's garbage collector. As a workaround, you > might simply try disabling garbage collection altogether by adding the > line: > > GC.disable > > at the beginning of the program. thank you very much! i agree with you it should be related to the ruby garbage collector.. AND i= n=20 my case, the systematic crash under linux goes away when i add GC.disable a= t=20 the start of the program. i'll try under windows to see if my other crashes= =20 go away, tomorrow... thank you, it seems that's the workaround i was looking for! i'll still try to reproduce the bug 100% under windows. emmanuel. =2D-=20 "Droit devant soi, on ne peut pas aller bien loin" - Le petit prince, Antoine de Saint Exup=E9ry |
From: Lyle J. <jl...@cf...> - 2003-07-21 19:41:22
|
Emmanuel Touzery wrote: > but for me it's quite amazing, i tried to reduce the program to reproduce the > crash (i hoped to port it to C++ to see if it's a FOX problem maybe) I wouldn't bother porting it to C++, it's extremely unlikely to be a FOX problem. > what is your system? I have access to SuSE linux boxes at work (a bit old > versions i'm afraid). if (big luck but ok) i would have access to the same > version of linux than you, i could try to make it reproduceable there.. (i > assume you're on x86). Yes, I'm running Red Hat Linux 8.0 on x86. > if you can debug on windows, too (i assume), which windows? i have access to > 98/XP/2000 boxes. i can try to make it crash for sure on those too.. I can run the code on Windows (either Win2000 or WinXP) but have never found a good solution for interactively debugging Ruby extensions (like FXRuby) on Windows. The best I can do with Windows (usually) is to just add print statements to the C++ source code to try to "triangulate" the source of the error ;) As you've already discovered, the best route is to try to consistently reproduce the problem under Linux, where it's generally easier to debug. > (i'll try to generate dummy .glo files until i get something) OK. > i agree with you it should be related to the ruby garbage collector.. AND in > my case, the systematic crash under linux goes away when i add GC.disable at > the start of the program. i'll try under windows to see if my other crashes > go away, tomorrow... OK. I would still like to actually track down the bug (and not just work around it!) but I'm glad the GC.disable trick seems to help for now. |
From: Riccardo G. <ric...@fi...> - 2003-07-22 07:09:12
|
Hi all I've been a while distracted away from Fox and Ruby, but now I'm back and I have a (probably silly) question (probably for Lyle, but I think posting on the mailing list is better). I have some small C++ Fox widgets that I derived in the past from standard ones for my applications; my question is if there is an "easy" way to use them in FXRuby; I know I can just get the FXRuby sources, add my C++ code and the relative swig wrappers and recompile FXRuby including them .. but this means that I'll end working with a non official release of FXRuby, and moreover it is an operation I need to perform every time an FXRuby new version is released .. any alternative idea? As always thanks to Jeroen, Lyle and all for Fox people around :) Riccardo P.S. If someone is interested, it will be published on the Proceedings of the CHEP conference 2003 (Computing in High Energy Physics) a paper on FRED, an event display application written in Ruby and FXRuby. If you are interested you can find a preprint here http://arxiv.org/abs/cs.gr/0306031 P.P.S. On a completely different topic; does anyone here have any experience with QT Python? I'm tring to promote FXRuby and Ruby to some colleagues of mine, but they asked why not using QTPy instead; apart the obvious licence situation (Fox is free, QT is not, at least for Windows), I have no experience with neither Qt or Python to answer their question .. someone has tried in the past some sort of comparison? Ok, not so important, just a curiosity. Thanks :) -- +--------------------------------------------------------------+ | Riccardo Giannitrapani | | | | Dipartimento di Fisica - Room L1-14-BE | | Universita` di Udine - Via delle Scienze, 206 Udine (Italy) | | Tel (Home): +39-0432-470011 -- (Office): +39-0432-558209 | | Home Page: http://www.fisica.uniud.it/~riccardo | | ICQ# 86590904 | +--------------------------------------------------------------+ |
From: Lyle J. <jl...@cf...> - 2003-07-22 14:10:35
|
Riccardo Giannitrapani wrote: > I have some small C++ Fox widgets that I derived in the past from > standard ones for my applications; my question is if there is an "easy" > way to use them in FXRuby; I know I can just get the FXRuby sources, add > my C++ code and the relative swig wrappers and recompile FXRuby > including them .. but this means that I'll end working with a non > official release of FXRuby, and moreover it is an operation I need to > perform every time an FXRuby new version is released .. any alternative > idea? Is it possible to port the C++ code for those widgets to Ruby? One of the goals for FXRuby is that you can do most anything with it that you could with the C++ library, including subclassing existing widgets to build new ones. |
From: Riccardo G. <ric...@fi...> - 2003-07-22 14:23:12
|
Yes sure .. as an example Marco Frailis has done a ColoredListItem starting from some C++ code snippsets he found on the Fox project page .. the conversion to the FXRuby domain was quite straightforward .. my question was originated by the fact that I'll probably need to support a C++ application (not all the people around like Ruby .. I know, it seems impossible :) .. )that will use FOX and that probably need me to develop some new widgets .. I would like than to be able to use that widgets also for my other ruby projects, without implementing them twice .. but anyway this is a maybe scenario, so for now it is just a personal curiosity .. Thanks for the reply, Riccardo :) Lyle Johnson wrote: > Riccardo Giannitrapani wrote: > >> I have some small C++ Fox widgets that I derived in the past from >> standard ones for my applications; my question is if there is an >> "easy" way to use them in FXRuby; I know I can just get the FXRuby >> sources, add my C++ code and the relative swig wrappers and recompile >> FXRuby including them .. but this means that I'll end working with a >> non official release of FXRuby, and moreover it is an operation I need >> to perform every time an FXRuby new version is released .. any >> alternative idea? > > > Is it possible to port the C++ code for those widgets to Ruby? One of > the goals for FXRuby is that you can do most anything with it that you > could with the C++ library, including subclassing existing widgets to > build new ones. > > > -- +--------------------------------------------------------------+ | Riccardo Giannitrapani | | | | Dipartimento di Fisica - Room L1-14-BE | | Universita` di Udine - Via delle Scienze, 206 Udine (Italy) | | Tel (Home): +39-0432-470011 -- (Office): +39-0432-558209 | | Home Page: http://www.fisica.uniud.it/~riccardo | | ICQ# 86590904 | +--------------------------------------------------------------+ |