De : Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org]
De la part de Cl��ment Bera
Envoy�� : mercredi 3 d��cembre 2014 17:54
�� : Pharo Development List
Objet : Re: [Pharo-dev] Code retrieval on primitive failed
Please send the full stack trace. You don't have only three lines, do you ?
No, indeed (the full stack is attached).
There's one solution that Igor does sometimes that you can try...For that you need to remember what code you changed that now crashes the image in smalltalk. Do you know what code crash your image ?
Could you rewrite it (exactly the same code) in a fresh image ?
If so the process is as follow:
- rewrite the crashing code in a fresh image
- extract the bytecode from the compiled method
- open a copy of your image with an hexadecimal editor, look for the bytecode pattern, replace it by returnself (byte 120 the number of times needed)
- try open your copy. Do as little things as possible (typically, only file out your packages, monticello will most probably not work)
Ok I will try this but this is more a generic printing method that is the problem (see trace)��� And not a specific method���
I tried but it seems not adapted to my case���
The alternative is to open your image on top of the cog simulator. Word has been that there's a Pharo 3 image running the cog simulator, you can use that to debug the code and fix it. Alternatively use a squeak
vmmaker image that you can build with this script:
$ cd ./image
$ ./buildsqueaktrunkvmmakerimage.sh
You put a halt on the implementation of primitive 117 in the simulator (named primitives call such as NB calls) to catch the crash and fix it from there in the simulator.
That seems better ! I am trying this way.
Good luck and have fun :-)
Thanks :)
2014-12-03 17:04 GMT+01:00 Blondeau Vincent <vincent.blondeau@worldline.com>:
Hello everyone,
I am doing some developments with NativeBoost and unfortunaly I succeed to save my image in a unstable state.
I am using the last moose image i.e.: Pharo3.0 - Latest update: #30860.
So when I want to launch my image, I get a primitive faillure.
The interesting part of the stack trace is :
Stack backtrace:
[07EE7A1B] ??? + 0 in (null)
[00539AB5] ??? + 1284789 in Pharo.exe
Smalltalk stack dump:
0x2410b8 M NBFFICallout class(NBNativeCodeGen class)>retrySend: 0x4c70b4c: a(n) NBFFICallout class
0x2410ec I NBFFICallout class(NBNativeCodeGen class)>retrySend: 0x4c70b4c: a(n) NBFFICallout class
0x78a0d90 s RDoubleVector(OrderedCollection)>at:
Then I wanted to retrieve my changes on a new image but, as the doIts are not recorded, I have neither the method deletions nor all the operations on classes nor the trait methods that are recorded as Doits with preamble: Trait method.
I tried to launch my image with squeak (which doesn���t support NativeBoost) to hope saving or commit my code. But as I am calling a primitive at startup of the image to initialize the external environement. I got the following trace :
[31m==== Startup Error: PrimitiveFailed: primitive #isEnabled in NativeBoost class failed
[0mNativeBoost class(Object)>>primitiveFailed:
NativeBoost class(Object)>>primitiveFailed
NativeBoost class>>isEnabled
NativeBoost class>>forCurrentPlatform
NativeBoost class>>loadSymbol:fromModule:
RSession class(Object)>>nbGetSymbolAddress:module:
So what can I do to retrieve all my code without loose a day to rewrite it?
Thanks in advance
Vincent
Ce message et les pi��ces jointes sont confidentiels et r��serv��s �� l'usage exclusif de ses destinataires. Il peut ��galement ��tre prot��g�� par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm��diatement l'exp��diteur et de le
d��truire. L'int��grit�� du message ne pouvant ��tre assur��e sur Internet, la responsabilit�� de Worldline ne pourra ��tre recherch��e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus,
l'exp��diteur ne donne aucune garantie �� cet ��gard et sa responsabilit�� ne saurait ��tre recherch��e pour tout dommage r��sultant d'un virus transmis.
This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet,
the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted.