pharo-project / pharo-launcher

Lets you manage your pharo images and download new ones
https://pharo-project.github.io/pharo-launcher/
MIT License
108 stars 46 forks source link

Insufficient buffer size to read current working directory: 0 #508

Closed bstjean closed 3 years ago

bstjean commented 3 years ago

The primitive primitiveGetCurrentWorkingDirectory seems to fail as tit fallse back to the Smalltalk code in Win32Platform>>currentWorkingDirectoryPathWithBufferSize:

To Reproduce Steps to reproduce the behavior:

  1. Create a pharo 9 image (32 or 64 bit) on Windows 10
  2. Launch the image
  3. The error occurs (see stack below). This error does NOT happen with Pharo 8 images!

Win32Platform(Object)>>error: Win32Platform(OSPlatform)>>currentWorkingDirectoryPathWithBuffer: Win32Platform(WinPlatform)>>currentWorkingDirectoryPathWithBufferSize: Win32Platform(WinPlatform)>>currentWorkingDirectoryPath DiskStore class>>defaultWorkingDirectory DiskStore class>>startUp: ClassSessionHandler>>startup: [ :arg2 | arg2 startup: arg1 ] in WorkingSession>>runStartup: in Block: [ :arg2 | arg2 startup: arg1 ] [ arg2 value: arg3 ] in [ :arg3 | [ arg2 value: arg3 ] on: Exception do: [ :arg4 | self errorHandler handleError: arg4 ] ] in WorkingSession>>runList:do: in Block: [ arg2 value: arg3 ] FullBlockClosure(BlockClosure)>>on:do: [ :arg3 | [ arg2 value: arg3 ] on: Exception do: [ :arg4 | self errorHandler handleError: arg4 ] ] in WorkingSession>>runList:do: in Block: [ :arg3 | ... Array(SequenceableCollection)>>do: WorkingSession>>runList:do: WorkingSession>>runStartup: WorkingSession>>start: SessionManager>>launchSnapshot:andQuit: [ tmp3 := self launchSnapshot: arg1 andQuit: arg2. tmp1 signal ] in SessionManager>>snapshot:andQuit: in Block: [ ... [ self value. Processor terminateActive ] in FullBlockClosure(BlockClosure)>>newProcess in Block: [ ...

guillep commented 3 years ago

Thanks for the report, this is not a Pharo launcher problem, this is related to some changes we are doing on windows to have better native support. I'll take care of fixing it over the week.

Thanks again!

guillep commented 3 years ago

I've migrated the issue to the Pharo repository, I'll follow it up in there!