pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.21k stars 356 forks source link

Pharo 12 - error when starting a Pharo image with different location of the VM - cleaning workaround ineficient ! #17064

Open ELePors opened 2 months ago

ELePors commented 2 months ago

Context : a Pharo 12 image used for developpement, starting and closing BlSpaces and saved to disk... When reopenning :

I tryed to start a Pharo 12 image : 1- with Pharo launcher or Pharo VM located in the Pharo vms directory -> everything is OK 2- with a Pharo vm (same version) located in another directory -> black screen with, in console, a lot of errors crashing in loop linked to window size and SDL (i dont have the error on this machine and complicated to copy it here) 3- with a Pharo vm located on another PC in anotehr directory -> same problem.

Before saving the image in the 1st case we can save the situation by doing that in a Playground :

set := Set new.
(SystemNavigation default allSendersOf: #ffiCall:) do: [ :m | set add: m methodClass ].
set do: [ :class | class compileAll ].

And you save, after that, the image starts in the case 2 or 3 ... but it is a big issue... quite anoying for developpers in the team.

The problem is similar to the problem encoutered in issue #17029 BUT : i cannot execute a eval script to save my image like described for Pharo 11... the eval does not execute prior to SDL start... so in the case 2 or 3, i cannot save my image with a headless script...

Eric.

ELePors commented 2 months ago

I'm blocked with this kind of bug if the pharo image is not opened by the same pharo vm with the same C libraries... Launching the image in headless mode does with "eval" not correct the problem... the evaluation of the code is not done before the c call to the SDL library occurs.