Re: Ad Apple''s setup for the (Java) scripting framework

2018-12-19 Thread Peter Kovacs
Since it has been closed because of lack of response, just reopen it and
continue.


On 19.12.18 18:06, Rony G. Flatscher (Apache) wrote:
> While re-assessing the (Java based) scripting framework on Apple (checking on
> ) for AOO 4.1.6 the 
> following problems could be
> isolated:
>
>   * the PATH environment variable on MacOS gets tampered with, such that 
> executables in
> "/usr/local/bin" cannot be resolved, breaking the long standing scripting 
> support for ooRexx
>   o AOO 4.1.6 on Darwin sets the PATH environment variable to
> .:/usr/bin:/bin:/usr/sbin:/sbin
> rather, it should just leave the PATH environment variable intact as 
> is the case on AOO
> 4.1.6 for Linux
>
> As Apple has forced third party software to install to "/usr/local" a few 
> years ago, at least
> "/usr/local/bin" needs to be available at all times as well! (Better 
> would be the user's PATH
> value like on Linux.)
>
>   * the current directory is set to the root directory "/" rather than to the 
> user's home directory
> like on Linux
>
> ---
>
> Another observation that pertains to Apple only: interacting with AOO using 
> the Java archives
> (juh.jar, unoil.jar, ridl.jar, jurt.jar) from Java now causes a runtime 
> exception on Apple with Java
> 9. Not sure whether this is the Apple AOO or the Java responsibility (it used 
> to work in the past
> years).
>
> Here the trace of the exception (RexxDispatcher.java is the Java program that 
> will invoke the ooRexx
> scripting engine which itself uses a Java bridge that interacts with AOO via 
> Java):
>
> wu114215:test rony$ rexxj.sh OpenOfficeTest.rex 
> *CE> 2018-12-18 16:06:25.356 soffice[6648:119551] WARNING: NSWindow drag 
> regions should only be
> invalidated on the Main Thread! This will throw an exception in the 
> future. Called from (***CE>   0   AppKit  
> 0x7fff381bdccc -[NSWindow(NSWindow_Theme) 
> _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
> CE>   1   AppKit  0x7fff381bb07c 
> -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
> CE>   2   AppKit  0x7fff381baaa6 
> -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
> CE>   3   libvcl.dylib0x0001118d5286 
> -[SalFrameWindow initWithSalFrame:] + 262
> CE>   4   libvcl.dylib0x00011160e273 
> _ZN12AquaSalFrame17initWindowAndViewEv + 643
> CE>   5   libvcl.dylib0x00011160deb7 
> _ZN12AquaSalFrameC2EP8SalFramem + 519
> CE>   6   libvcl.dylib0x0001115e93f0 
> _ZN15AquaSalInstance11CreateFrameEP8SalFramem + 48
> CE>   7   libvcl.dylib0x00011189f567 
> _ZN6Window8ImplInitEPS_lP16SystemParentData + 1159
> CE>   8   libvcl.dylib0x000111823184 
> _ZN16ImplBorderWindow8ImplInitEP6WindowltP16SystemParentData + 404
> CE>   9   libvcl.dylib0x0001118234c5 
> _ZN16ImplBorderWindowC1EP6WindowP16SystemParentDatalt + 69
> CE>   10  libvcl.dylib0x0001118bef78 
> _ZN10WorkWindow8ImplInitEP6WindowlP16SystemParentData + 88
> CE>   11  libvcl.dylib0x0001118bf320 
> _ZN10WorkWindowC1EP6Windowl + 80
> CE>   12  libootk.dylib   0x0001109420c0 
> _ZN11VCLXToolkit16ImplCreateWindowEPP10VCLXWindowRKN3com3sun4star3awt16WindowDescriptorEP6Windowl
>  + 5712
> CE>   13  libootk.dylib   0x000110940454 
> _ZN11VCLXToolkit16ImplCreateWindowERKN3com3sun4star3awt16WindowDescriptorEl + 
> 452
> CE>   14  libootk.dylib   0x0001109407b4 
> _ZThn80_N11VCLXToolkit12createWindowERKN3com3sun4star3awt16WindowDescriptorE 
> + 20
> CE>   15  libfwk.dylib0x000113f2d84e 
> _ZN9framework18TaskCreatorService28implts_createContainerWindowERKN3com3sun4star3uno9ReferenceINS3_3awt7XWindowEEERKNS6_9RectangleEh
>  + 1022
> CE>   16  libfwk.dylib0x000113f2cecc 
> _ZN9framework18TaskCreatorService27createInstanceWithArgumentsERKN3com3sun4star3uno8SequenceINS4_3AnyEEE
>  + 924
> CE>   17  libfwk.dylib0x000113f2ecd2 
> _ZThn16_N9framework18TaskCreatorService27createInstanceWithArgumentsERKN3com3sun4star3uno8SequenceINS4_3AnyEEE
>  + 18
> CE>   18  libfwk.dylib0x000113e34591 
> _ZN9framework11TaskCreator10createTaskERKN3rtl8OUStringEh + 3089
> CE>   19  libfwk.dylib0x000113efbd9a 
> _ZN9framework7Desktop9findFrameERKN3rtl8OUStringEi + 778
> CE>   20  libfwk.dylib0x000113efc3b2 
> 

Ad Apple''s setup for the (Java) scripting framework

2018-12-19 Thread Rony G. Flatscher (Apache)
While re-assessing the (Java based) scripting framework on Apple (checking on
) for AOO 4.1.6 the following 
problems could be
isolated:

  * the PATH environment variable on MacOS gets tampered with, such that 
executables in
"/usr/local/bin" cannot be resolved, breaking the long standing scripting 
support for ooRexx
  o AOO 4.1.6 on Darwin sets the PATH environment variable to
.:/usr/bin:/bin:/usr/sbin:/sbin
rather, it should just leave the PATH environment variable intact as is 
the case on AOO
4.1.6 for Linux

As Apple has forced third party software to install to "/usr/local" a few 
years ago, at least
"/usr/local/bin" needs to be available at all times as well! (Better would 
be the user's PATH
value like on Linux.)

  * the current directory is set to the root directory "/" rather than to the 
user's home directory
like on Linux

---

Another observation that pertains to Apple only: interacting with AOO using the 
Java archives
(juh.jar, unoil.jar, ridl.jar, jurt.jar) from Java now causes a runtime 
exception on Apple with Java
9. Not sure whether this is the Apple AOO or the Java responsibility (it used 
to work in the past
years).

Here the trace of the exception (RexxDispatcher.java is the Java program that 
will invoke the ooRexx
scripting engine which itself uses a Java bridge that interacts with AOO via 
Java):

wu114215:test rony$ rexxj.sh OpenOfficeTest.rex 
*CE> 2018-12-18 16:06:25.356 soffice[6648:119551] WARNING: NSWindow drag 
regions should only be
invalidated on the Main Thread! This will throw an exception in the future. 
Called from (***CE> 0   AppKit  
0x7fff381bdccc -[NSWindow(NSWindow_Theme) 
_postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
CE> 1   AppKit  0x7fff381bb07c 
-[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
CE> 2   AppKit  0x7fff381baaa6 
-[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
CE> 3   libvcl.dylib0x0001118d5286 
-[SalFrameWindow initWithSalFrame:] + 262
CE> 4   libvcl.dylib0x00011160e273 
_ZN12AquaSalFrame17initWindowAndViewEv + 643
CE> 5   libvcl.dylib0x00011160deb7 
_ZN12AquaSalFrameC2EP8SalFramem + 519
CE> 6   libvcl.dylib0x0001115e93f0 
_ZN15AquaSalInstance11CreateFrameEP8SalFramem + 48
CE> 7   libvcl.dylib0x00011189f567 
_ZN6Window8ImplInitEPS_lP16SystemParentData + 1159
CE> 8   libvcl.dylib0x000111823184 
_ZN16ImplBorderWindow8ImplInitEP6WindowltP16SystemParentData + 404
CE> 9   libvcl.dylib0x0001118234c5 
_ZN16ImplBorderWindowC1EP6WindowP16SystemParentDatalt + 69
CE> 10  libvcl.dylib0x0001118bef78 
_ZN10WorkWindow8ImplInitEP6WindowlP16SystemParentData + 88
CE> 11  libvcl.dylib0x0001118bf320 
_ZN10WorkWindowC1EP6Windowl + 80
CE> 12  libootk.dylib   0x0001109420c0 
_ZN11VCLXToolkit16ImplCreateWindowEPP10VCLXWindowRKN3com3sun4star3awt16WindowDescriptorEP6Windowl
 + 5712
CE> 13  libootk.dylib   0x000110940454 
_ZN11VCLXToolkit16ImplCreateWindowERKN3com3sun4star3awt16WindowDescriptorEl + 
452
CE> 14  libootk.dylib   0x0001109407b4 
_ZThn80_N11VCLXToolkit12createWindowERKN3com3sun4star3awt16WindowDescriptorE + 
20
CE> 15  libfwk.dylib0x000113f2d84e 
_ZN9framework18TaskCreatorService28implts_createContainerWindowERKN3com3sun4star3uno9ReferenceINS3_3awt7XWindowEEERKNS6_9RectangleEh
 + 1022
CE> 16  libfwk.dylib0x000113f2cecc 
_ZN9framework18TaskCreatorService27createInstanceWithArgumentsERKN3com3sun4star3uno8SequenceINS4_3AnyEEE
 + 924
CE> 17  libfwk.dylib0x000113f2ecd2 
_ZThn16_N9framework18TaskCreatorService27createInstanceWithArgumentsERKN3com3sun4star3uno8SequenceINS4_3AnyEEE
 + 18
CE> 18  libfwk.dylib0x000113e34591 
_ZN9framework11TaskCreator10createTaskERKN3rtl8OUStringEh + 3089
CE> 19  libfwk.dylib0x000113efbd9a 
_ZN9framework7Desktop9findFrameERKN3rtl8OUStringEi + 778
CE> 20  libfwk.dylib0x000113efc3b2 
_ZThn56_N9framework7Desktop9findFrameERKN3rtl8OUStringEi + 18
CE> 21  libfwk.dylib0x000113eb53ce 
_ZN9framework7LoadEnv16impl_loadContentEv + 766
CE> 22  libfwk.dylib0x000113eb0e56