Closed andyschmidt closed 9 years ago
Hi Andy,
if the application crashes on exit, it is a garbage collector related bug, in most cases. In theory this could also happen while the application is running, but is typical for the final GC run. Unfortunately the stack trace on Windows is useless, but fortunately your program also crashes on Linux. And on Linux valgrind is a great help. I'll try to fix this soon, but need to do a closer look at the implementation FXTreeList, which is wondrously different to the other list types.
Some background to this: The relation between libfox and Rubys garbage collector is one of the most difficult part in fxruby. In the old days with Ruby-1.8, there was a single great GC run that consisted of the mark phase and the sweep phase immediately afterwards. The final GC run on application exit didn't really work in 1.8. This way fxruby was quite stable.
With newer ruby versions the GC became more and more subtle, which is great for ruby, but hard for fxruby. In fact, libfox it extremely ill-suited for using in a GC'ed environment. libfox often depends on explicit destruction of objects, which is great for C++, but difficult in GC'ed languages. The ownership of Objects is different from case to case and it's even possible that the ownership of objects change while their lifetime.
I've done a lot of work to get the GC'ing stable, but certainly there are still a lot of cases where it could cash (like in this case). Furthermore there are some GC related corner cases (with method overloading), that I can not address, without completely reinventing the current logic (which I'll not do).
Hope that helps.
PS: I'm really amazed about your watobo project! Since I'm doing pentests from time to time, I'll definitely give it a try.
Lars,
thank you very much for the detailed explanation.
If you have any questions regarding watobo just drop me a mail.
Am 28.09.2013 22:11, schrieb Lars Kanis:
Hi Andy,
if the application crashes on exit, it is a garbage collector related bug, in most cases. In theory this could also happen while the application is running, but is typical for the final GC run. Unfortunately the stack trace on Windows is useless, but fortunately your program also crashes on Linux. And on Linux valgrind is a great help. I'll try to fix this soon, but need to do a closer look at the implementation FXTreeList, which is wondrously different to the other list types.
Some background to this: The relation between libfox and Rubys garbage collector is one of the most difficult part in fxruby. In the old days with Ruby-1.8, there was a single great GC run that consisted of the mark phase and the sweep phase immediately afterwards. The final GC run on application exit didn't really work in 1.8. This way fxruby was quite stable.
With newer ruby versions the GC became more and more subtle, which is great for ruby, but hard for fxruby. In fact, libfox it extremely ill-suited for using in a GC'ed environment. libfox often depends on explicit destruction of objects, which is great for C++, but difficult in GC'ed languages. The ownership of Objects is different from case to case and it's even possible that the ownership of objects change while their lifetime.
I've done a lot of work to get the GC'ing stable, but certainly there are still a lot of cases where it could cash (like in this case). Furthermore there are some GC related corner cases (with method overloading), that I can not address, without completely reinventing the current logic (which I'll not do).
Hope that helps.
PS: I'm really amazed about your watobo project! Since I'm doing pentests from time to time, I'll definitely give it a try.
— Reply to this email directly or view it on GitHub https://github.com/larskanis/fxruby/issues/10#issuecomment-25307524.
This issue should be fixed in fxruby-1.6.29.
Hi,
after running in circles I finally found the real issue of my crashes.
Crash
Analysis
The crash happens only when
myelements=
is calledappendItem
is called with a FXTreeItem object -> [2]Script