[Gambas-user] Segmentation Fault - Deserialization
brian at westwoodsvcs.com
Thu Jul 16 21:10:26 CEST 2020
Ok I looked at you project,
My understanding is that when you use as object or as variant, the serialization includes the name of the class in the stream,
so that when its recreated Gambas can instantiate the object from the stream because it can read the class name before invoking the _read or _write special methods on that class..
I guess it should know the name from the - as class name -, But I have never used with a specific class name.
I have been using this for about a year now, and have always used it that way with as object or variant.
Is there a reason, you need to use the specific class name when you read and write?
From: "Matthew Collins" <matthew.charles.collins.75 at gmail.com>
To: "Gambas mailing list" <user at lists.gambas-basic.org>
Sent: Thursday, July 16, 2020 9:31:25 AM
Subject: Re: [Gambas-user] Segmentation Fault - Deserialization
Try this project attached... i get segmentation fault....
On 16/07/2020 16:46, Gianluigi wrote:
Il giorno gio 16 lug 2020 alle ore 00:22 Matthew Collins < [ mailto:matthew.charles.collins.75 at gmail.com | matthew.charles.collins.75 at gmail.com ] > ha scritto:
I wrote an example for the new serialization methods:
[ http://gambaswiki.org/wiki/lang/special/read | http://gambaswiki.org/wiki/lang/special/read ]
If you change line 8 from:
Write #f1, Item1 As Object
Write #f1, Item1 As MyClass
You get segmentation fault, is this a bug?
Attached my simple example that gives no error with object.
Zip to avoid problems
----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]----
----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User