[Glass] GsFile atEnd answering nil rather than boolean
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Wed Mar 4 11:03:37 PST 2015
Mariano,
This looks like a bug and I've created an issue for it[1]. I've proposed
a fix in the bug report ... I think it is correct for 3.1.0.6, but it
will have to be validated for 2.4.x and 3.2.x ....
Dale
[1] https://github.com/GsDevKit/GsDevKit/issues/58
On 03/04/2015 05:08 AM, Mariano Martinez Peck via Glass wrote:
> Hi guys,
>
> I am trying to import a large SIXX file (46MB) using an approach like
> the following:
>
> | codec stream object context persistentKey persistentDict |
> persistentKey := ('SIXX_ROOT_ARRAY', Object new identityHash asString)
> asSymbol.
> persistentDict := UserGlobals at: #LargeSIXXExportsAndImportRoots.
> stream := (FileStream oldFileNamed: aFilename) text.
> [
> MCPlatformSupport commitOnAlmostOutOfMemoryDuring: [
> persistentDict at: persistentKey put: Array new.
> context := SixxContext forRead.
> FACompatibilityUtils current addSixxShapeChargers: context classResolver.
> object := Object readSixxFrom: stream
> context: context
> persistentRoot: (persistentDict at: persistentKey)
> ].
> ] ensure: [ persistentDict removeKey: persistentKey ].
> ^ object
>
> *The problem is that I get a Sixx parse error because at some point
> GsFile answers nil to #atEnd.* The method says that that happens when
> there is an error. But I have no idea what error can be. I tried to
> send #lastErrorString to the GsFile instance but I also get nil.
>
> Any clues on when #atEnd can answer nil or how can I get more info of
> why it is failing?
>
> Thanks in advance,
>
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150304/c9bcfb7b/attachment.html>
More information about the Glass
mailing list