Problem: Log output to Transcript sometimes hangs Morphic.
Reason: Buggy PluggableTextMorph or other parts of Morphic system.
Solution: Alt-dot can provisionally help. Let Transcript window minimized or closed during simulation or redirect the log to file.
Problem: Renaming/adding/removing ports sometimes causes errors or duplicating connectors in superordinated coupledDEVS GUI.
Reason: Bugs in GUI.
Solution: Close error notifier (if any), close coupled DEVS explorer and reopen it.
Problem: Syntax error in method of a prototype object.
Solution: Identify the error in the notifier, close it and correct the error in the prototype object inspector or atomic devs explorer. (Current version of SmallDEVS have not error notification tightly integrated with the method editor.)
Problem: Runtime error in method of a prototype object.
Solution: You can use debugger to investigate the error. Then close the debugger, correct the error in the prototype object inspector or atomic devs explorer (you van not correct it directly in the debugger as in the case of Smalltalk methods, because the current version of SmallDEVS is not fully interoperable with the debugger). Then stop the simulation (because the last simulation step has been broken) and start it again.
Problem: Data lost due to crash of Squeak.
Reason: SmallDEVS is not an application. It is a class library and a framework for development of models and simulations. The system is totally open and the unlimited power of the underlying programming language is available, including ways to make malligious programs which can cause crash. Changes im Smalltalk classes code is continuously logged and it is possible to recover them easily. But in the case of DEVS models nothing is automagically logged and every crash of unsaved image leads to lost data.
Solution: Save the image frequentlly and make backups of image+changes. Remeber, all crashes are caused by you and you have to learn to make programs and models without errors. Making backups is the only way to make the development process effective.
Problem: Atomic components serving as interfaces to real world typically contain slots pointing to GUI objects, sockets, semaphores, processes. They can have serious problems with copying and serialization.
Solution: Such slots must not be copied nor serialized. Use slots with names begining with 'X' – they are automagically set to nil in copies, storeStrings and sixxStrings. You have to use lazy initialization pattern for accessing them or, in a case of precesses, initialize them in #prepareToStart method (note: #prepareToStart and #prepareToStop are intended for creation start and termination eventual processes in components serving as interfaces to real world).
Link to this Page
- SmallDEVS last edited on 9 April 2012 at 5:44 pm by ip81-19-5-83.netdatacomm.cz