So...after debugging the VM, it looks it is crashing in DeflatePlugin >> encodeMatch: length distance: dist<br><br>encodeMatch: length distance: dist<br> "Encode the given match of length length starting at dist bytes ahead"<br>
| literal distance |<br> <inline: true><br> zipLiterals at: zipLiteralCount put: length - DeflateMinMatch.<br> zipDistances at: zipLiteralCount put: dist.<br> literal := (zipMatchLengthCodes at: length - DeflateMinMatch).<br>
zipLiteralFreq at: literal put: (zipLiteralFreq at: literal) + 1.<br> dist < 257<br> ifTrue:[distance := zipDistanceCodes at: dist - 1]<br> ifFalse:[distance := zipDistanceCodes at: 256 + (dist - 1 bitShift: -7)].<br>
<span style="color: rgb(51, 102, 255);"> zipDistanceFreq at: distance put: (zipDistanceFreq at: distance) + 1.</span><br> zipLiteralCount := zipLiteralCount + 1.<br> zipMatchCount := zipMatchCount + 1.<br> ^zipLiteralCount = zipLiteralSize "We *must* flush"<br>
or:[(zipLiteralCount bitAnd: 16rFFF) = 0 "Only check every N kbytes"<br> and:[self shouldFlush]]<br><br>When it does: <span style="color: rgb(51, 102, 255);"> zipDistanceFreq at: distance put: (zipDistanceFreq at: distance) + 1.</span><br>
it gives a EXC_BAD_ACCESS.<br>distance value is 1444965993<br><br>The sender is #deflateBlock: lastIndex chainLength: chainLength goodMatch: goodMatch<br>and sender #primitiveDeflateBlock<br><br>If I do a call printAllStacks(), I get this part:<br>
<br>(gdb) call printAllStacks()<br>Process 0x1f70c924 priority 40<br>0xbff65968 M GZipWriteStream(DeflateStream)>deflateBlock 555574892: a(n) GZipWriteStream<br>0xbff6598c M GZipWriteStream(DeflateStream)>nextPutAll: 555574892: a(n) GZipWriteStream<br>
0xbff659a8 M GZipWriteStream(DeflateStream)>next:putAll:startingAt: 555574892: a(n) GZipWriteStream<br>0xbff659cc M FLBufferedWriteStream>flushBuffer 556072120: a(n) FLBufferedWriteStream<br>0xbff659e4 M FLBufferedWriteStream>nextBytesPutAll: 556072120: a(n) FLBufferedWriteStream<br>
0xbff65a04 M FLBufferedWriteStream>nextStringPut: 556072120: a(n) FLBufferedWriteStream<br>0xbff65a24 M [] in FLVariablesMapping>serializeMappingOn: 557179132: a(n) FLVariablesMapping<br>0xbff65a44 M OrderedCollection>do: 557179148: a(n) OrderedCollection<br>
0xbff65a64 M FLVariablesMapping>serializeMappingOn: 557179132: a(n) FLVariablesMapping<br>0xbff65a80 M FLFixedObjectCluster(FLPointerObjectCluster)>serializeInstancesStepWith: 556081188: a(n) FLFixedObjectCluster<br>
0xbff65a9c M FLSerialization>clusterInstancesStepOf: 556076884: a(n) FLSerialization<br>0xbff65ab8 M [] in FLSerialization>instancesStep 556076884: a(n) FLSerialization<br><br><br>And from the gdb I get:<br><br>#0 0x000b3721 in deflateBlockchainLengthgoodMatch at ZipPlugin.c:303<br>
#1 0x000b4a62 in primitiveDeflateBlock at ZipPlugin.c:719<br>#2 0x1f400858 in ??<br>#3 0x00067820 in threadSchedulingLoop at gcc3x-cointerpmt.c:45853<br>#4 0x0003d79b in initialEnterSmalltalkExecutive at gcc3x-cointerpmt.c:18372<br>
#5 0x0003e45f in initStackPagesAndInterpret at gcc3x-cointerpmt.c:18839<br>#6 0x00022ae8 in interpret at gcc3x-cointerpmt.c:2076<br>#7 0x0006df20 in -[sqSqueakMainApplication runSqueak] at sqSqueakMainApplication.m:174<br>
#8 0x92ee186c in __NSFirePerformWithOrder<br>#9 0x967fadd2 in __CFRunLoopDoObservers<br>#10 0x967b6ced in __CFRunLoopRun<br>#11 0x967b63c4 in CFRunLoopRunSpecific<br>#12 0x967b61f1 in CFRunLoopRunInMode<br>
#13 0x98262e04 in RunCurrentEventLoopInMode<br>#14 0x98262af5 in ReceiveNextEventCommon<br>#15 0x98262a3e in BlockUntilNextEventMatchingListInMode<br>#16 0x93159595 in _DPSNextEvent<br>#17 0x93158dd6 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]<br>
#18 0x9311b1f3 in -[NSApplication run]<br>#19 0x93113289 in NSApplicationMain<br>#20 0x0006bec9 in main at main.m:52<br><br><br>Any pointer is appreaciated.<br><br>THanks<br><br><br><br><div class="gmail_quote">On Fri, Dec 2, 2011 at 11:57 PM, Diogenes Moreira <span dir="ltr"><<a href="mailto:diogenes.moreira@gmail.com">diogenes.moreira@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">en que SO estas corriendo..primitiva ??<br>
por otro lado que tenes en el PharoDebug.Log<br>
<br>
<a href="http://about.me/diogenes.moreira" target="_blank">http://about.me/diogenes.moreira</a><br>
<br>
<br>
<br>
2011/12/2 Mariano Martinez Peck <<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>>:<br>
<div class="HOEnZb"><div class="h5">> Hi guys. We are doing some experiments with Fuel and GZip streams... Now I<br>
> have a beatiful test like this:<br>
><br>
> testMethodContextThisContext<br>
><br>
> | materializedContext context |<br>
> context := thisContext copy.<br>
> materializedContext := self resultOfSerializeAndMaterialize: context.<br>
><br>
> and it crashes like crazy. From the VM crash stack, I can see:<br>
><br>
><br>
> Smalltalk stack dump:<br>
> 0xbff66ba4 M GZipWriteStream(DeflateStream)>deflateBlock 447551436: a(n)<br>
> GZipWriteStream<br>
> 0xbff66bc8 M GZipWriteStream(DeflateStream)>nextPutAll: 447551436: a(n)<br>
> GZipWriteStream<br>
> 0xbff66be4 M GZipWriteStream(DeflateStream)>next:putAll:startingAt:<br>
> 447551436: a(n) GZipWriteStream<br>
> 0xbff66c08 M FLBufferedWriteStream>flushBuffer 448048664: a(n)<br>
> FLBufferedWriteStream<br>
> 0xbff66c20 M FLBufferedWriteStream>nextBytesPutAll: 448048664: a(n)<br>
> FLBufferedWriteStream<br>
> 0xbff66c40 M FLBufferedWriteStream>nextStringPut: 448048664: a(n)<br>
> FLBufferedWriteStream<br>
> 0xbff66c5c M FLByteStringCluster>serialize:on: 448054196: a(n)<br>
> FLByteStringCluster<br>
> 0xbff66c7c M FLByteStringCluster(FLPrimitiveCluster)>serializeInstance:with:<br>
> 448054196: a(n) FLByteStringCluster<br>
> 0xbff66ca0 M [] in<br>
> FLByteStringCluster(FLIteratingCluster)>serializeInstances: 448054196: a(n)<br>
> FLByteStringCluster<br>
> 0xbff66cc8 M IdentitySet(Set)>do: 451711680: a(n) IdentitySet<br>
> 0xbff66ce4 M FLByteStringCluster(FLIteratingCluster)>serializeInstances:<br>
> 448054196: a(n) FLByteStringCluster<br>
> 0xbff66d00 M<br>
> FLByteStringCluster(FLIteratingCluster)>serializeInstancesStepWith:<br>
> 448054196: a(n) FLByteStringCluster<br>
> 0xbff66d1c M FLSerialization>clusterInstancesStepOf: 448053428: a(n)<br>
> FLSerialization<br>
> 0xbff66d38 M [] in FLSerialization>instancesStep 448053428: a(n)<br>
> FLSerialization<br>
> 0xbff66d58 M OrderedCollection>do: 449989736: a(n) OrderedCollection<br>
> 0xbff66d74 M FLSerialization>instancesStep 448053428: a(n) FLSerialization<br>
> 0xbff66d8c M FLSerialization>run 448053428: a(n) FLSerialization<br>
> 0xbff66db0 I [] in FLSerializer>defaultSerialization 447550464: a(n)<br>
> FLSerializer<br>
> 0xbff66dd8 M [] in FLSerializer>serialize:on: 447550464: a(n) FLSerializer<br>
> 0xbff66df8 M BlockClosure>ensure: 448052884: a(n) BlockClosure<br>
> 0xbff66e18 M FLSerializer>serialize:on: 447550464: a(n) FLSerializer<br>
> 0xbff66e3c M [] in<br>
> FLMethodContextSerializationTest(FLSerializationTest)>serialize: 447235380:<br>
> a(n) FLMethodContextSerializationTest<br>
> 0xbff66e60 M [] in GZipWriteStream class(PositionableStream class)>on:do:<br>
> 419845144: a(n) GZipWriteStream class<br>
> 0xbff66e80 M BlockClosure>ensure: 448048616: a(n) BlockClosure<br>
> 0xbff66ea0 M GZipWriteStream class(PositionableStream class)>on:do:<br>
> 419845144: a(n) GZipWriteStream class<br>
> 0xbff66ec4 M [] in FLGZipStrategy>writeStreamDo: 447550896: a(n)<br>
> FLGZipStrategy<br>
> 0xbff66ee0 M FLByteArrayStreamStrategy>writeStreamDo: 447550884: a(n)<br>
> FLByteArrayStreamStrategy<br>
> 0xbff66efc M FLGZipStrategy>writeStreamDo: 447550896: a(n) FLGZipStrategy<br>
> 0xbff66f18 M<br>
> FLMethodContextSerializationTest(FLSerializationTest)>serialize: 447235380:<br>
> a(n) FLMethodContextSerializationTest<br>
> 0xbff66f34 M<br>
> FLMethodContextSerializationTest(FLSerializationTest)>resultOfSerializeAndMaterialize:<br>
> 447235380: a(n) FLMethodContextSerializationTest<br>
> 0xbff66f58 M FLMethodContextSerializationTest>testMethodContextThisContext<br>
> 447235380: a(n) FLMethodContextSerializationTest<br>
><br>
><br>
> any idea of where I should start to look at?<br>
><br>
> Thanks<br>
><br>
><br>
> --<br>
> Mariano<br>
> <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>