On 12 January 2014 19:02, paolo.bernardi.67@gmail.com <paolo.bernardi.67@gmail.com> wrote:
Hi all,

I'm trying to write a binding of wxWidgets 3.0 into Pharo 3.0.
I wrote some glue-code to implement a C interface to wxWidgets (that is C++).

I can open windows on the screen of my Winxp-box,
I place buttons into them, I change position and size of the windows
and I can attach BlockClosures on MOVE and CLICK events.
Wow: if a cow-boy like me is able to do that,
it means NativeBoost is really magic!

Here the question.
Sometime Pharo crashes. it happens when an event occurs (and a st callback was attached on).
In some sessions Pharo stay alive, in some other it dies.

What should I do? Re-compile a vm and run Pharo in debug mode?
I'm not sure I could understand the reason of the crash...

usually nobody can. :)
There's no debugging except one provided by smalltalk debugger
and very low-level like gdb debugger for C. And you basically alone there :)

All i can say that callbacks for handling window events need special handling:
��- you basically should prevent VM to do event handling during handling of event by callback.
Another problem is that�� then if you put halt into code which handling events,
you will halt the image and won't be able to use it (like in smalltalk debugger).
��
For details, you can read thread:
http://lists.gforge.inria.fr/pipermail/pharo-project/2012-September/069448.html

parts of this plan is realized right now, but it is not yet ready for release.

Thanks
paolo

---
Questa e-mail �� priva di virus e malware perch�� �� attiva la protezione avast! Antivirus.
http://www.avast.com





--
Best regards,
Igor Stasenko.