Does anyone know what would cause this? I can't save anything to my class because I get a debugging exception thrown: Collection is empty
Link to source: https://dl.dropboxusercontent.com/u/1817765/Pharo%20Crash%20Files.rar
Steps to recreate:
.image
file, without the .changes
file in the same directoryNumberWithUnits>>=
NumberWithUnits
The issue was that I didn't have the correct .changes
file associated with my project. Since my teammate and I were collaborating, these were lost in translation. Once I placed the correct .changes
files in the directory of my .image
file, everything worked out.
Squeak/Pharo have special handling in case of absent source code: they try and decompile CompiledMethod from appropriate MethodDictionary.
What you saw here is a failure of Decompiler to properly decompile some method.
Without code, the IDE is non functional, and you are stuck (you can't save your code, browse your code, debug your code...)
This Pharo 1.1 version is very old and you won't get any support on it.
But interestingly, the bug of Decompiler that you encountered is still present on current Squeak trunk development (4.5)
And the method that makes the Decompiler loosy is:
< aNumberWithUnits
(self compareUnits: aNumberWithUnits)
ifTrue: [self value: ((aNumberWithUnits value) < (self value) ifTrue: [^true] ifFalse: [^false]).]
ifFalse: [^Error new signal: 'Incompatible unit types.'].
This is a rather unconventional code since the message [self value: ...]
will never be sent.
The reason is that the parameter will be evaluated first, and both branches of the condition will return ifTrue: [^true] ifFalse: [^false]
.
Since you explored some dark corner that only newbies do explore, and that we failed to test, I'd just say thank you.
If you feel like it, you can open a report on http://bugs.squeak.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With