good morning Benoit,
this issue has kept me awake almost all the night.
if i have an uninitialized collection and want it to be written to and 
then read from a file:

Dim cCol As Collection = Null
Dim hFile As File

hFile = Open "~/test" For Write Create
Write #hFile, cCol As Variant
Close #hFile
hFile = Open "~/test" For Read
cCol = Read #hFile As Variant
Print cCol

i get segfault (in Write instruction) and figured out that it is about 
this line (in my rev #3944 gbx_stream.c:1116)
if (TYPE_is_object(type)) type = T_OBJECT;
and the switch branch for T_OBJECT which doesn't seem to expect a Null 
object (i think... i didn't look very closely to it)
(why am i telling you this, you'll know it better)

so i sat down and manually created my file without Writing Null as a 
datatype but as a string:
Write #hFile, "\x0f\x00", 2

and thought that it will at least now succeed but i get an error about 
typemismatch (wanted standard type got Null instead). Read also seems 
not to expect the Null (there is no T_NULL branch in STREAM_read_type's 
switch)

shouldn't it be possible to at least read that Null as it is a standard 
type?

regards,
tobi

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to