[Glass] GsFile atEnd answering nil rather than boolean

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Thu Mar 5 05:49:01 PST 2015


On Wed, Mar 4, 2015 at 4:03 PM, Dale Henrichs via Glass <
glass at lists.gemtalksystems.com> wrote:

>  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 ....
>
>
Hi Dale,

Thanks for opening the issue. After some more time and research, I think
the reason why I may have received the nil was because my GsFile become
persisted and probably flushed away by the VM causing the loss of the
session state (GbsRtErrLostSessionState). But...I discovered that a lot
later...so probably reporting the error when getting the nil at #atEnd
makes sense as you put in the ticker and as James suggested.

BTW...are GemStone issues now handled in GsDevKit issue tracker or you also
use your internal bug tracker?

Thanks




> 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 listGlass at lists.gemtalksystems.comhttp://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150305/6828ba30/attachment.html>


More information about the Glass mailing list