ETH Oberon/Gadgets: System Freeze in unloading module
I have encountered a strange behaviour in the Oberon System with Gadgets: I execute: Gadgets.Insert BasicGadgets.NewButton to Insert a button somewhere. Then I execute System.Free BasicGadgets~ This will unrecoverably freeze the Oberon System (from some strange hints in the System.Track possibly by an infinite chain of traps). I observed this behaviour on "ETH PlugIn Oberon for WindowsTM / Win32 2.4 (15.12.2000)on Windows 2000 Version 5.0.2195 Service Pack 2" Can other confirm this using other versions ? Any ideas about possible causes ? ------------------------------------------------- This mail sent through IMP: igor.urz.unibas.ch
Gadgets.Insert BasicGadgets.NewButton
to Insert a button somewhere. Then I execute
System.Free BasicGadgets~
Don't be so cruel to the poor Button. You have stolen its Handler. ;-) Seriously: The Problem is: When freeing a Module, Oberon checks if there are still other Modules depending on that module but it cannot check if Objects are still using any Allocated Memory in that Module. In that special case the allocated Memory was the Handler and moreover any type-checks and type-casts could't work since the Module did not exist any more (after successful freeing it) etc. So the "solution" is: Do not System.Free a Module when its Objects are still displayed, since they are not deallocated and the Handler is called any time a Display.Broadcast (or update message) is sent (which is the case when new Viewers like a Trap-View are opened.) Felix.
Anyone have the source code for the Project Oberon book in electronic form? As I read the book it would be nice to see where some of the procedures are used. Is this an appropriate place for this request? c.l.o seems kind of quiet. Thanks Pat
Hi Pat
Anyone have the source code for the Project Oberon book in electronic form? As I read the book it would be nice to see where some of the procedures are used.
As far as I see it can be found in ftp://ftp.inf.ethz.ch/pub/Oberon/Books/ProjectOberon/ another place could be ftp://ftp.statlab.uni-heidelberg.de/mirrors/linz/Oberon/ there is a file named Oberon0.Cod.gz which contains the Oberon0 sources. And in any Oberon (S3 or V4) the basic Modules are still based on Project Oberon. Felix. -- Felix Friedrich Institut für Biomathematik und Biometrie GSF - Forschungszentrum für Umwelt und Gesundheit, GmbH Ingolstädter Landstraße 1, D-85764 Neuherberg Tel: ++49 89 3187 2436 email: friedrich@gsf.de --
Felix, Thanks for the pointers. As you mention there seems to be minor differences in the core modules between the source in the Project Oberon book and V4 so I'm using V4 source for now. Pat
participants (3)
-
Felix Friedrich -
Pat Hacker -
Patrick.Hunziker@unibas.ch