scripting pharo How to disable settings loading..

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

scripting pharo How to disable settings loading..

Stéphane Ducasse
Hi 

I would like to write some scripts with Pharo. 
Now I cannot find how to block the settings
because I have a crash in my settings


pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image --list     
pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image —-help
pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image -help

All of them crash because my settings are broken    



doing the following does not help

pharo80 --help
Usage: /Users/ducasse/bin/Pharo/Pharo64Stable.app/Contents/MacOS/Pharo [<option>...] [<imageName> [<argument>...]]
       /Users/ducasse/bin/Pharo/Pharo64Stable.app/Contents/MacOS/Pharo [<option>...] -- [<argument>...]

Common <option>s:
  --help                 print this help message, then exit
  --memory <size>[mk]    use fixed heap size (added to image size)
  --nohandlers           disable sigsegv & sigusr1 handlers
  --timephases           print start load and run times
  --breaksel selector    set breakpoint on send of selector
  --breakmnu selector    set breakpoint on MNU of selector
  --eden <size>[mk]      set eden memory to bytes
  --leakcheck num        check for leaks in the heap
  --stackpages num       use n stack pages
  --numextsems num       make the external semaphore table num in size
  --noheartbeat          disable the heartbeat for VM debugging. disables input
  --pollpip              output . on each poll for input
  --checkpluginwrites    check for writes past end of object in plugins
  --trace[=num]          enable tracing (optionally to a specific value)
  --warnpid              print pid in warnings
  --codesize <size>[mk]  set machine code memory to bytes
  --tracestores          enable store tracing (assert check stores)
  --cogmaxlits <n>       set max number of literals for methods to be compiled to machine code
  --cogminjumps <n>      set min number of backward jumps for interpreted methods to be considered for compilation to machine code
  --reportheadroom       report unused stack headroom on exit
  --maxoldspace <size>[mk]      set max size of old space memory to bytes
  --logscavenge          log scavenging to scavenge.log
  --headless             run in headless (no window) mode (default: false)
  --headfull             run in headful (window) mode (default: true)
  --version              print version information, then exit
  --blockonerror         on error or segv block, not exit.  useful for attaching gdb
  --blockonwarn          on warning block, don't warn.  useful for attaching gdb
  --exitonwarn           treat warnings as errors, exiting on warn

Notes:
  <imageName> defaults to `Pharo.image'.
  If '--memory' or '-maxoldspace' are not specified then the heap will grow dynamically.
  <argument>s are ignored, but are processed by the Squeak image.
  The first <argument> normally names a Squeak `script' to execute.
  Precede <arguments> by `--' to use default image.



--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply | Threaded
Open this post in threaded view
|

Re: [rmod] scripting pharo How to disable settings loading..

CyrilFerlicot
Hi,

You need to add `--no-default-preferences` after the image name.

pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image
--no-default-preferences --list

On Wed, Jul 29, 2020 at 6:57 PM Stéphane Ducasse
<[hidden email]> wrote:

>
> Hi
>
> I would like to write some scripts with Pharo.
> Now I cannot find how to block the settings
> because I have a crash in my settings
>
>
> pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image --list
> pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image —-help
> pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image -help
>
> All of them crash because my settings are broken
>
>
>
> doing the following does not help
>
> pharo80 --help
> Usage: /Users/ducasse/bin/Pharo/Pharo64Stable.app/Contents/MacOS/Pharo [<option>...] [<imageName> [<argument>...]]
>        /Users/ducasse/bin/Pharo/Pharo64Stable.app/Contents/MacOS/Pharo [<option>...] -- [<argument>...]
>
> Common <option>s:
>   --help                 print this help message, then exit
>   --memory <size>[mk]    use fixed heap size (added to image size)
>   --nohandlers           disable sigsegv & sigusr1 handlers
>   --timephases           print start load and run times
>   --breaksel selector    set breakpoint on send of selector
>   --breakmnu selector    set breakpoint on MNU of selector
>   --eden <size>[mk]      set eden memory to bytes
>   --leakcheck num        check for leaks in the heap
>   --stackpages num       use n stack pages
>   --numextsems num       make the external semaphore table num in size
>   --noheartbeat          disable the heartbeat for VM debugging. disables input
>   --pollpip              output . on each poll for input
>   --checkpluginwrites    check for writes past end of object in plugins
>   --trace[=num]          enable tracing (optionally to a specific value)
>   --warnpid              print pid in warnings
>   --codesize <size>[mk]  set machine code memory to bytes
>   --tracestores          enable store tracing (assert check stores)
>   --cogmaxlits <n>       set max number of literals for methods to be compiled to machine code
>   --cogminjumps <n>      set min number of backward jumps for interpreted methods to be considered for compilation to machine code
>   --reportheadroom       report unused stack headroom on exit
>   --maxoldspace <size>[mk]      set max size of old space memory to bytes
>   --logscavenge          log scavenging to scavenge.log
>   --headless             run in headless (no window) mode (default: false)
>   --headfull             run in headful (window) mode (default: true)
>   --version              print version information, then exit
>   --blockonerror         on error or segv block, not exit.  useful for attaching gdb
>   --blockonwarn          on warning block, don't warn.  useful for attaching gdb
>   --exitonwarn           treat warnings as errors, exiting on warn
>
> Notes:
>   <imageName> defaults to `Pharo.image'.
>   If '--memory' or '-maxoldspace' are not specified then the heap will grow dynamically.
>   <argument>s are ignored, but are processed by the Squeak image.
>   The first <argument> normally names a Squeak `script' to execute.
>   Precede <arguments> by `--' to use default image.
>
>
>
> --------------------------------------------
> Stéphane Ducasse
> http://stephane.ducasse.free.fr / http://www.pharo.org
> 03 59 35 87 52
> Assistant: Aurore Dalle
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley,
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
>


--
Cyril Ferlicot
https://ferlicot.fr

Reply | Threaded
Open this post in threaded view
|

Re: [rmod] scripting pharo How to disable settings loading..

Stéphane Ducasse
Thanks cyril I found it by removing my settings. 
Now to me this means that the settings should be managed after the handlers.

S.

On 29 Jul 2020, at 19:06, Cyril Ferlicot <[hidden email]> wrote:

Hi,

You need to add `--no-default-preferences` after the image name.

pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image
--no-default-preferences --list

On Wed, Jul 29, 2020 at 6:57 PM Stéphane Ducasse
<[hidden email]> wrote:

Hi

I would like to write some scripts with Pharo.
Now I cannot find how to block the settings
because I have a crash in my settings


pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image --list
pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image —-help
pharo80 /Users/ducasse/Documents/Pharo/images/P8Indian/P8Indian.image -help

All of them crash because my settings are broken



doing the following does not help

pharo80 --help
Usage: /Users/ducasse/bin/Pharo/Pharo64Stable.app/Contents/MacOS/Pharo [<option>...] [<imageName> [<argument>...]]
      /Users/ducasse/bin/Pharo/Pharo64Stable.app/Contents/MacOS/Pharo [<option>...] -- [<argument>...]

Common <option>s:
 --help                 print this help message, then exit
 --memory <size>[mk]    use fixed heap size (added to image size)
 --nohandlers           disable sigsegv & sigusr1 handlers
 --timephases           print start load and run times
 --breaksel selector    set breakpoint on send of selector
 --breakmnu selector    set breakpoint on MNU of selector
 --eden <size>[mk]      set eden memory to bytes
 --leakcheck num        check for leaks in the heap
 --stackpages num       use n stack pages
 --numextsems num       make the external semaphore table num in size
 --noheartbeat          disable the heartbeat for VM debugging. disables input
 --pollpip              output . on each poll for input
 --checkpluginwrites    check for writes past end of object in plugins
 --trace[=num]          enable tracing (optionally to a specific value)
 --warnpid              print pid in warnings
 --codesize <size>[mk]  set machine code memory to bytes
 --tracestores          enable store tracing (assert check stores)
 --cogmaxlits <n>       set max number of literals for methods to be compiled to machine code
 --cogminjumps <n>      set min number of backward jumps for interpreted methods to be considered for compilation to machine code
 --reportheadroom       report unused stack headroom on exit
 --maxoldspace <size>[mk]      set max size of old space memory to bytes
 --logscavenge          log scavenging to scavenge.log
 --headless             run in headless (no window) mode (default: false)
 --headfull             run in headful (window) mode (default: true)
 --version              print version information, then exit
 --blockonerror         on error or segv block, not exit.  useful for attaching gdb
 --blockonwarn          on warning block, don't warn.  useful for attaching gdb
 --exitonwarn           treat warnings as errors, exiting on warn

Notes:
 <imageName> defaults to `Pharo.image'.
 If '--memory' or '-maxoldspace' are not specified then the heap will grow dynamically.
 <argument>s are ignored, but are processed by the Squeak image.
 The first <argument> normally names a Squeak `script' to execute.
 Precede <arguments> by `--' to use default image.



--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Aurore Dalle
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France



--
Cyril Ferlicot
https://ferlicot.fr

--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France