[Glass] GsFile atEnd answering nil rather than boolean

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Wed Mar 4 05:08:29 PST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150304/d96ead3d/attachment.html>


More information about the Glass mailing list