[Glass] How is this supposed to work in SIXX?
Mariano Martinez Peck via Glass
glass at lists.gemtalksystems.com
Wed May 10 13:17:16 PDT 2017
Hi,
I am getting an error when I am trying to import a SIXX file generated in
Gemstone 3.3.3 and I am importing it in another GemStone 3.3.3. Attached is
the stack.
The problem is in
Object >> initializeInstVarsFromSixxElement: sixxElement context:
aSixxContext
| coll |
coll := (SixxXmlUtil elementsFrom: sixxElement) select: [:elem |
(SixxXmlUtil isTextFrom: elem) not ].
*coll reverse*
do: .......
In this example, what I get as "coll" is an instance of *XMLOrderedList*.
And " coll reverse" does not work at all. Why, because code is:
SequenceablCollection >> reverse
"Returns a copy of the receiver with its elements in reverse order."
| copy sz high mid |
sz := self size.
* copy := self species new: sz.*
* copy size < sz*
* ifTrue: [ copy size: sz "handle OrderedCollection" ].*
high := sz.
mid := sz bitShift: -1. " // 2 "
1 to: mid do: [ :low |
* copy at: low put: (self at: high).*
copy at: high put: (self at: low).
high := high - 1 ].
....... "code clipped"
"self species new: sz" is a "XMLOrderedList new: 6".
even with the ifTrue: below, doing "(XMLOrderedList new: 6) size: 6" it's
still not a 6 elements collection.
So... when we do "* copy at: low put: (self at: high)." *it fails.
XMLOrderedList does implement #at:put: but this way:
at: anIndex put: aValue
^ collection at: anIndex put: aValue
And clearly...the "collection" inside is 0 size, not 6.
((XMLOrderedList new: 6) size: 6) collection size -> 0
So...how could this ever work? Damn...I am sure missing something.
Any clue is appreciated.
Bye,
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20170510/e0c95d03/attachment.html>
-------------- next part --------------
error printing
--------------------
1. FaGemStonePlatform class>>saveExceptionContinuation: @10 line 10
2. FaBackgroundProcess>>handleException: @18 line 9
3. [] in FaBackgroundProcess>>runInForeground @54 line 47
4. OffsetError(AbstractException)>>_executeHandler: @4 line 8
5. OffsetError(AbstractException)>>_signalWith: @1 line 1
6. OffsetError(AbstractException)>>signal @2 line 47
7. OrderedCollection(Object)>>_error:args: @16 line 11
8. OrderedCollection(Object)>>_errorIndexOutOfRange: @2 line 6
9. OrderedCollection(Object)>>at:put: @18 line 23
10. XMLOrderedList>>at:put: @2 line 2
11. XMLOrderedList(SequenceableCollection)>>reverse @19 line 12
12. FaGemStoneDataStore(Object)>>initializeInstVarsFromSixxElement:context: @6 line 4
13. FaGemStoneDataStore(Object)>>initializeFromSixxElement:context: @12 line 6
14. FaGemStoneDataStore class(Behavior)>>newInstanceFromSixxElement:context: @24 line 15
15. FaGemStoneDataStore class(Behavior)>>fromSixxElement:context: @10 line 6
16. Object class(Behavior)>>readSixxFromSixxElement:context: @32 line 26
17. Object class(Behavior)>>readSixxFrom:context:persistentRoot: @7 line 6
18. [] in UndefinedObject(FaGemStonePlatform class)>>materializeFromSixxFile: @39 line 15
19. [] in UndefinedObject(FAGemStoneCompatibility class)>>commitOnAlmostOutOfMemoryDuring:threshold: @8 line 5
20. UndefinedObject(ExecBlock)>>ensure: @2 line 12
21. FAGemStoneCompatibility class>>commitOnAlmostOutOfMemoryDuring:threshold: @3 line 6
22. [] in UndefinedObject(FaGemStonePlatform class)>>materializeFromSixxFile: @27 line 10
23. UndefinedObject(ExecBlock)>>ensure: @2 line 12
24. FaGemStonePlatform class>>materializeFromSixxFile: @19 line 20
25. FaGemStoneStoreSession(FaMemoryStoreSession)>>materializeDataStoreFromSixxFile: @3 line 2
26. [] in UndefinedObject(FaMemoryStoreSession)>>internalImportDataStoreAsSixxFileFrom: @22 line 11
27. UndefinedObject(ExecBlock)>>cull: @7 line 4
28. [] in FaBackgroundProcess>>runProcessBlock @24 line 5
29. [] in UndefinedObject(FaGemStonePlatform class)>>executeClosureWithBackgroundPriority: @15 line 7
30. UndefinedObject(ExecBlock)>>ensure: @2 line 12
31. FaGemStonePlatform class>>executeClosureWithBackgroundPriority: @11 line 8
32. FaBackgroundProcess>>runProcessBlock @12 line 5
33. [] in FaBackgroundProcess>>runInForeground @30 line 11
34. FaBackgroundProcess(ExecBlock)>>on:do: @3 line 44
35. [] in FaBackgroundProcess>>runInForeground @18 line 20
36. FaBackgroundProcess(ExecBlock)>>on:do: @3 line 44
37. [] in FaBackgroundProcess>>runInForeground @14 line 40
38. FaBackgroundProcess(ExecBlock)>>on:do: @3 line 44
39. FaCurrentUserContextInformation class(WADynamicVariable class)>>use:during: @3 line 4
40. FaUserContextInformation class>>withContext:do: @2 line 3
41. FaUserContextInformation class>>withLoggedInUsername:do: @3 line 3
42. FaBackgroundProcess>>runInForeground @4 line 3
43. Executed Code
44. GsNMethod class>>_gsReturnToC @1 line 1
More information about the Glass
mailing list