<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Ok I looked at you project,</div><div><br data-mce-bogus="1"></div><div> My understanding is that when you use as object or as variant, the serialization includes the name of the class in the stream, </div><div>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.. </div><div><br data-mce-bogus="1"></div><div>I guess it should know the name from the - as class name -, But I have never used with a specific class name.</div><div><br data-mce-bogus="1"></div><div>I have been using this for about a year now, and have always used it that way with as object or variant.</div><div><br data-mce-bogus="1"></div><div>Is there a reason, you need to use the specific class name when you read and write?</div><div><br></div><div data-marker="__SIG_PRE__">Thank You<br>Brian G</div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Matthew Collins" <matthew.charles.collins.75@gmail.com><br><b>To: </b>"Gambas mailing list" <user@lists.gambas-basic.org><br><b>Sent: </b>Thursday, July 16, 2020 9:31:25 AM<br><b>Subject: </b>Re: [Gambas-user] Segmentation Fault - Deserialization<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><p>Hi,</p>
    <p>Try this project attached...  i get segmentation fault....<br>
    </p>
    <p>Thanks<br>
      Matt<br>
    </p>
    <div class="moz-cite-prefix">On 16/07/2020 16:46, Gianluigi wrote:<br>
    </div>
    <blockquote cite="mid:CAJ2rqFZSQ0CAEkK3G2dsYeaxrSSbFMztrKGBbHL5=NRfVoWk6Q@mail.gmail.com">
      
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">Il giorno gio 16 lug 2020
            alle ore 00:22 Matthew Collins <<a href="mailto:matthew.charles.collins.75@gmail.com" target="_blank">matthew.charles.collins.75@gmail.com</a>>
            ha scritto:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div dir="auto">
              <div>Hi,</div>
              <div><br>
              </div>
              <div>I wrote an example for the new serialization methods:</div>
              <a href="http://gambaswiki.org/wiki/lang/special/read" target="_blank">http://gambaswiki.org/wiki/lang/special/read</a><br>
              <br>
              If you change line 8 from:
              <div>Write #f1, Item1 As Object</div>
              <div>To:</div>
              <div>Write #f1, Item1 As MyClass</div>
              <div><br>
              </div>
              <div>You get segmentation fault, is this a bug?</div>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>Hi Matthew,<br>
            <br>
            Attached my simple example that gives no error with object.<br>
            Zip to avoid problems<br>
            <br>
            Regards<br>
            Gianluigi <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre">----[ <a class="moz-txt-link-freetext" href="http://gambaswiki.org/wiki/doc/netiquette" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----
</pre>
    </blockquote>
  

<br><br>----[ http://gambaswiki.org/wiki/doc/netiquette ]----<br></div></div></body></html>