Opened 15 years ago
Closed 15 years ago
#752 closed defect (fixed)
crash when loading oza containing instances without Class definition
Reported by: | Jorge | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | highest | Milestone: | OOP Implementation |
Component: | OOP | Version: | head |
Severity: | major | Keywords: | |
Cc: |
Description (last modified by )
Evaluate file1.tol in one tol session then in other session evaluate file2.tol, the session 2 will fail with a segmentation fault because Class A is not defined.
file1.tol
============================
Class A { Real v = 1 }; A objA; Real Ois.Store( [[ objA ]], "/tmp/objA.oza" );
file2.tol, to be executed in other sesion
===========================================
Set Include( "/tmp/objA.oza" );
Change History (2)
comment:1 Changed 15 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
In new release TOL doesn't fail with a segmentation fault.
It gives these error messages
The Class A is not stored nor reloaded and objA cannot be rebuilt.
Other auxiliar information is stored in OIS as the dating of a time series or the structure of a set, but the calss of an instance is a more complex task, due it can be inherited from other classes.
So, you should insert the class in the OIS or load it from another prebuilt OIS or from original source, as described in this test