From: | Rudi Chiarito |
Date: | 12 Sep 2000 at 06:14:23 |
Subject: | AMIOPEN: freeevent() |
I have seen this bug in at least three different programs. Maybe it's
better to spread the word.
To reproduce it, run your program under intent_shell_debug or
intent_media_debug. Move the mouse over your program's window. If it
makes Elate enter the debugger, I bet Fleecy's house that you are calling
freeevent() the wrong way.
The problem occurs if you use as the first parameter of freeevent()
the field "targetavo" from the event you just received. That is wrong.
It isn't an AVO's duty to free events. It's AVE's. So you should use the
value you obtained from kn_dev_lookup("/device/ave/*") instead.
If you use Patrick Roberts' ewinease, you can use the variable
__EWE_INITPTRS.aveinst and live happily. I already told Patrick about the
problem in old releases of ewinease, I suppose the current version on
ftp.amiga.com already includes the fix. In any case, check your event
handling and test your software as I explained above. Better yet, ALWAYS
use the debug versions. You'll find problems earlier and more easily.