While re-assessing the (Java based) scripting framework on Apple (checking on
<https://bz.apache.org/ooo/show_bug.cgi?id=117961>) 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                              
0x00007fff381bdccc -[NSWindow(NSWindow_Theme) 
_postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
    CE>         1   AppKit                              0x00007fff381bb07c 
-[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
    CE>         2   AppKit                              0x00007fff381baaa6 
-[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
    CE>         3   libvcl.dylib                        0x00000001118d5286 
-[SalFrameWindow initWithSalFrame:] + 262
    CE>         4   libvcl.dylib                        0x000000011160e273 
_ZN12AquaSalFrame17initWindowAndViewEv + 643
    CE>         5   libvcl.dylib                        0x000000011160deb7 
_ZN12AquaSalFrameC2EP8SalFramem + 519
    CE>         6   libvcl.dylib                        0x00000001115e93f0 
_ZN15AquaSalInstance11CreateFrameEP8SalFramem + 48
    CE>         7   libvcl.dylib                        0x000000011189f567 
_ZN6Window8ImplInitEPS_lP16SystemParentData + 1159
    CE>         8   libvcl.dylib                        0x0000000111823184 
_ZN16ImplBorderWindow8ImplInitEP6WindowltP16SystemParentData + 404
    CE>         9   libvcl.dylib                        0x00000001118234c5 
_ZN16ImplBorderWindowC1EP6WindowP16SystemParentDatalt + 69
    CE>         10  libvcl.dylib                        0x00000001118bef78 
_ZN10WorkWindow8ImplInitEP6WindowlP16SystemParentData + 88
    CE>         11  libvcl.dylib                        0x00000001118bf320 
_ZN10WorkWindowC1EP6Windowl + 80
    CE>         12  libootk.dylib                       0x00000001109420c0 
_ZN11VCLXToolkit16ImplCreateWindowEPP10VCLXWindowRKN3com3sun4star3awt16WindowDescriptorEP6Windowl
 + 5712
    CE>         13  libootk.dylib                       0x0000000110940454 
_ZN11VCLXToolkit16ImplCreateWindowERKN3com3sun4star3awt16WindowDescriptorEl + 
452
    CE>         14  libootk.dylib                       0x00000001109407b4 
_ZThn80_N11VCLXToolkit12createWindowERKN3com3sun4star3awt16WindowDescriptorE + 
20
    CE>         15  libfwk.dylib                        0x0000000113f2d84e 
_ZN9framework18TaskCreatorService28implts_createContainerWindowERKN3com3sun4star3uno9ReferenceINS3_3awt7XWindowEEERKNS6_9RectangleEh
 + 1022
    CE>         16  libfwk.dylib                        0x0000000113f2cecc 
_ZN9framework18TaskCreatorService27createInstanceWithArgumentsERKN3com3sun4star3uno8SequenceINS4_3AnyEEE
 + 924
    CE>         17  libfwk.dylib                        0x0000000113f2ecd2 
_ZThn16_N9framework18TaskCreatorService27createInstanceWithArgumentsERKN3com3sun4star3uno8SequenceINS4_3AnyEEE
 + 18
    CE>         18  libfwk.dylib                        0x0000000113e34591 
_ZN9framework11TaskCreator10createTaskERKN3rtl8OUStringEh + 3089
    CE>         19  libfwk.dylib                        0x0000000113efbd9a 
_ZN9framework7Desktop9findFrameERKN3rtl8OUStringEi + 778
    CE>         20  libfwk.dylib                        0x0000000113efc3b2 
_ZThn56_N9framework7Desktop9findFrameERKN3rtl8OUStringEi + 18
    CE>         21  libfwk.dylib                        0x0000000113eb53ce 
_ZN9framework7LoadEnv16impl_loadContentEv + 766
    CE>         22  libfwk.dylib                        0x0000000113eb0e56 
_ZN9framework7LoadEnv12startLoadingEv + 438
    CE>         23  libfwk.dylib                        0x0000000113eafef3 
_ZN9framework7LoadEnv20loadComponentFromURLERKN3com3sun4star3uno9ReferenceINS3_5frame16XComponentLoaderEEERKNS5_INS3_4lang20XMultiServiceFactoryEEERKN3rtl8OUStringESJ_iRKNS4_8SequenceINS3_5beans13PropertyValueEEE
 + 227
    CE>         24  libfwk.dylib                        0x0000000113efad37 
_ZN9framework7Desktop20loadComponentFromURLERKN3rtl8OUStringES4_iRKN3com3sun4star3uno8SequenceINS7_5beans13PropertyValueEEE
 + 327
    CE>         25  libfwk.dylib                        0x0000000113efae82 
_ZThn24_N9framework7Desktop20loadComponentFromURLERKN3rtl8OUStringES4_iRKN3com3sun4star3uno8SequenceINS7_5beans13PropertyValueEEE
 + 18
    CE>         26  libs5abi_uno.dylib                  0x0000000117d5aada 
_ZN7bridges7cpp_uno6shared25unoInterfaceProxyDispatchEP14_uno_InterfacePK24_typelib_TypeDescriptionPvPS7_PP8_uno_Any
 + 4042
    CE>         27  libs5abi_uno.dylib                  0x0000000117d5a430 
_ZN7bridges7cpp_uno6shared25unoInterfaceProxyDispatchEP14_uno_InterfacePK24_typelib_TypeDescriptionPvPS7_PP8_uno_Any
 + 2336
    CE>         28  libs5abi_uno.dylib                  0x0000000117d59df0 
_ZN7bridges7cpp_uno6shared25unoInterfaceProxyDispatchEP14_uno_InterfacePK24_typelib_TypeDescriptionPvPS7_PP8_uno_Any
 + 736
    CE>         29  binaryurp.uno.dylib                 0x0000000118f17864 
_ZNK9binaryurp15IncomingRequest13execute_throwEPNS_9BinaryAnyEPNSt3__16vectorIS1_NS3_9allocatorIS1_EEEE
 + 2068
    CE>         30  binaryurp.uno.dylib                 0x0000000118f16b4b 
_ZNK9binaryurp15IncomingRequest7executeEv + 155
    CE>         31  binaryurp.uno.dylib                 0x0000000118f1b7af 
request + 15
    CE>         32  libuno_cppu.dylib.3                 0x000000010fb69d76 
_ZN15cppu_threadpool8JobQueue5enterElh + 150
    CE>         33  libuno_cppu.dylib.3                 0x000000010fb6a171 
_ZN15cppu_threadpool14ORequestThread3runEv + 97
    CE>         34  libuno_cppu.dylib.3                 0x000000010fb6a0ce 
cppu_requestThreadWorker + 14
    CE>         35  libuno_sal.dylib.3                  0x000000010f5cd875 
osl_setThreadTextEncoding + 309
    CE>         36  libsystem_pthread.dylib             0x00007fff6801c305 
_pthread_body + 126
    CE>         37  libsystem_pthread.dylib             0x00007fff6801f26f 
_pthread_start + 70
    CE>         38  libsystem_pthread.dylib             0x00007fff6801b415 
thread_start + 13
    CE> )
    *CE> 2018-12-18 16:06:26.326 soffice[6648:119551] *** Terminating app due 
to uncaught exception
    'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should 
only be called from
    the Main Thread!'****CE> *** First throw call stack:*
    CE> (
    CE>         0   CoreFoundation                      0x00007fff3aca2ecd 
__exceptionPreprocess + 256
    CE>         1   libobjc.A.dylib                     0x00007fff66d5a720 
objc_exception_throw + 48
    CE>         2   AppKit                              0x00007fff3813bbe0 
NSAlwaysMatchRequestedMaskOf1DefaultValueFunction + 0
    CE>         3   libvcl.dylib                        0x00000001115e939f 
_ZN15AquaSalInstance8AnyInputEt + 191
    CE>         4   libvcl.dylib                        0x0000000111623baf 
_ZN11Application8AnyInputEt + 31
    CE>         5   libsw.dylib                         0x0000000136e9d26a 
_ZN11SwLayAction11FormatCntntEPK9SwPageFrm + 858
    CE>         6   libsw.dylib                         0x0000000136e9b2d0 
_ZN11SwLayAction14InternalActionEv + 1808
    CE>         7   libsw.dylib                         0x0000000136e9a987 
_ZN11SwLayAction6ActionEv + 295
    CE>         8   libsw.dylib                         0x000000013711a93d 
_ZN9ViewShell13ImplEndActionEh + 333
    CE>         9   libsw.dylib                         0x0000000136cc563b 
_ZN11SwCrsrShell9EndActionEh + 139
    CE>         10  libsw.dylib                         0x000000013734d20d 
_ZN6SwView16OuterResizePixelERK5PointRK4Size + 1309
    CE>         11  libsfx.dylib                        0x000000010fec13cc 
_ZN12SfxViewFrame6ResizeEh + 300
    CE>         12  libvcl.dylib                        0x00000001118a747f 
_ZN6Window17ImplPosSizeWindowEllllt + 2063
    CE>         13  libvcl.dylib                        0x00000001118a737c 
_ZN6Window17ImplPosSizeWindowEllllt + 1804
    CE>         14  libvcl.dylib                        0x00000001118b02da 
_ZN6Window15SetPosSizePixelEllllt + 186
    CE>         15  libsfx.dylib                        0x000000010fe98ac3 
_ZN8SfxFrame28SetToolSpaceBorderPixel_ImplERK8SvBorder + 291
    CE>         16  libsfx.dylib                        0x000000010fcad181 
_ZN20SfxFrameWorkWin_Impl18ArrangeChilds_ImplEh + 257
    CE>         17  libsfx.dylib                        0x000000010fe994d5 
_ZN8SfxFrame6ResizeEv + 709
    CE>         18  libvcl.dylib                        0x00000001118a747f 
_ZN6Window17ImplPosSizeWindowEllllt + 2063
    CE>         19  libvcl.dylib                        0x00000001118a737c 
_ZN6Window17ImplPosSizeWindowEllllt + 1804
    CE>         20  libvcl.dylib                        0x00000001118b02da 
_ZN6Window15SetPosSizePixelEllllt + 186
    CE>         21  libootk.dylib                       0x000000011094b68e 
_ZN10VCLXWindow10setPosSizeEiiiis + 158
    CE>         22  libfwk.dylib                        0x0000000113e4db82 
_ZN9framework26DockingAreaDefaultAcceptor19setDockingAreaSpaceERKN3com3sun4star3awt9RectangleE
 + 482
    CE>         23  libfwk.dylib                        0x0000000113e85e1a 
_ZN9framework13LayoutManager15implts_doLayoutEhh + 1274
    CE>         24  libfwk.dylib                        0x0000000113e81f19 
_ZN9framework13LayoutManager22implts_doLayout_notifyEh + 25
    CE>         25  libfwk.dylib                        0x0000000113e8164a 
_ZN9framework13LayoutManager35implts_updateUIElementsVisibleStateEh + 762
    CE>         26  libfwk.dylib                        0x0000000113e8c4d8 
_ZN9framework13LayoutManager11windowShownERKN3com3sun4star4lang11EventObjectE + 
520
    CE>         27  libootk.dylib                       0x0000000110a64868 
_ZN25WindowListenerMultiplexer11windowShownERKN3com3sun4star4lang11EventObjectE 
+ 888
    CE>         28  libootk.dylib                       0x00000001109496b6 
_ZN10VCLXWindow18ProcessWindowEventERK14VclWindowEvent + 3606
    CE>         29  libootk.dylib                       0x00000001109485d0 
_ZN10VCLXWindow27LinkStubWindowEventListenerEPvS0_ + 80
    CE>         30  libvcl.dylib                        0x000000011162c451 
_ZNK17VclEventListeners4CallEP14VclSimpleEvent + 273
    CE>         31  libvcl.dylib                        0x00000001118ad063 
_ZN6Window18CallEventListenersEmPv + 163
    CE>         32  libvcl.dylib                        0x00000001118a1c38 
_ZN6Window20ImplSetReallyVisibleEv + 168
    CE>         33  libvcl.dylib                        0x00000001118a1cb7 
_ZN6Window20ImplSetReallyVisibleEv + 295
    CE>         34  libvcl.dylib                        0x00000001118a64e7 
_ZN6Window4ShowEht + 983
    CE>         35  libvcl.dylib                        0x00000001118a6589 
_ZN6Window4ShowEht + 1145
    CE>         36  libfwk.dylib                        0x0000000113ebb518 
_ZN9framework7LoadEnv27impl_makeFrameWindowVisibleERKN3com3sun4star3uno9ReferenceINS3_3awt7XWindowEEEh
 + 744
    CE>         37  libfwk.dylib                        0x0000000113eb659f 
_ZN9framework7LoadEnv25impl_reactForLoadingStateEv + 639
    CE>         38  libfwk.dylib                        0x0000000113eb7195 
_ZN9framework7LoadEnv14impl_setResultEh + 69
    CE>         39  libfwk.dylib                        0x0000000113eb5fe2 
_ZN9framework7LoadEnv16impl_loadContentEv + 3858
    CE>         40  libfwk.dylib                        0x0000000113eb0e56 
_ZN9framework7LoadEnv12startLoadingEv + 438
    CE>         41  libfwk.dylib                        0x0000000113eafef3 
_ZN9framework7LoadEnv20loadComponentFromURLERKN3com3sun4star3uno9ReferenceINS3_5frame16XComponentLoaderEEERKNS5_INS3_4lang20XMultiServiceFactoryEEERKN3rtl8OUStringESJ_iRKNS4_8SequenceINS3_5beans13PropertyValueEEE
 + 227
    CE>         42  libfwk.dylib                        0x0000000113efad37 
_ZN9framework7Desktop20loadComponentFromURLERKN3rtl8OUStringES4_iRKN3com3sun4star3uno8SequenceINS7_5beans13PropertyValueEEE
 + 327
    CE>         43  libfwk.dylib                        0x0000000113efae82 
_ZThn24_N9framework7Desktop20loadComponentFromURLERKN3rtl8OUStringES4_iRKN3com3sun4star3uno8SequenceINS7_5beans13PropertyValueEEE
 + 18
    CE>         44  libs5abi_uno.dylib                  0x0000000117d5aada 
_ZN7bridges7cpp_uno6shared25unoInterfaceProxyDispatchEP14_uno_InterfacePK24_typelib_TypeDescriptionPvPS7_PP8_uno_Any
 + 4042
    CE>         45  libs5abi_uno.dylib                  0x0000000117d5a430 
_ZN7bridges7cpp_uno6shared25unoInterfaceProxyDispatchEP14_uno_InterfacePK24_typelib_TypeDescriptionPvPS7_PP8_uno_Any
 + 2336
    CE>         46  libs5abi_uno.dylib                  0x0000000117d59df0 
_ZN7bridges7cpp_uno6shared25unoInterfaceProxyDispatchEP14_uno_InterfacePK24_typelib_TypeDescriptionPvPS7_PP8_uno_Any
 + 736
    CE>         47  binaryurp.uno.dylib                 0x0000000118f17864 
_ZNK9binaryurp15IncomingRequest13execute_throwEPNS_9BinaryAnyEPNSt3__16vectorIS1_NS3_9allocatorIS1_EEEE
 + 2068
    CE>         48  binaryurp.uno.dylib                 0x0000000118f16b4b 
_ZNK9binaryurp15IncomingRequest7executeEv + 155
    CE>         49  binaryurp.uno.dylib                 0x0000000118f1b7af 
request + 15
    CE>         50  libuno_cppu.dylib.3                 0x000000010fb69d76 
_ZN15cppu_threadpool8JobQueue5enterElh + 150
    CE>         51  libuno_cppu.dylib.3                 0x000000010fb6a171 
_ZN15cppu_threadpool14ORequestThread3runEv + 97
    CE>         52  libuno_cppu.dylib.3                 0x000000010fb6a0ce 
cppu_requestThreadWorker + 14
    CE>         53  libuno_sal.dylib.3                  0x000000010f5cd875 
osl_setThreadTextEncoding + 309
    CE>         54  libsystem_pthread.dylib             0x00007fff6801c305 
_pthread_body + 126
    CE>         55  libsystem_pthread.dylib             0x00007fff6801f26f 
_pthread_start + 70
    CE>         56  libsystem_pthread.dylib             0x00007fff6801b415 
thread_start + 13
    CE> )
    *CE> libc++abi.dylib: terminating with unexpected exception of type 
NSException*
    *RexxDispatcher.java*: Throwable of type 
'org.rexxla.bsf.engines.rexx.RexxException' thrown while invoking Rexx:
    getLocalizedMessage(): [BSF4ooRexx/routine/jniRexxRunProgram(), error 9:
           *-* Compiled routine "BSF".
    Error 40 running /usr/local/bin/UNO.CLS line 1843:  Incorrect call to 
routine.
    Error 40.900:  BSF4ooRexx/routine/BSF(), error 3: Java exception occurred: 
[org.apache.bsf.BSFException: BSF4ooRexx subfunction "invoke": 
        bean:        [class org.oorexx.uno.RgfReflectUNO] --> type: 
<org.oorexx.uno.RgfReflectUNO>
        method:      [FINDINTERFACEWITHMEMBER] not found or execution error!

        -> check method name=[FINDINTERFACEWITHMEMBER] (caseless o.k., but 
correct spelling?)
        -> check supplied arguments (correct number, correct types?):
                arg # 1: Rexx argument=[com.sun.proxy.$Proxy6@757942a1] --> 
Java 
value="[Proxy:1970881185,118ee9670;s5abi[0];cdafe8392c93469da813cccb46c..." 
type=<com.sun.proxy.$Proxy6>
                arg # 2: Rexx argument=[LOADCOMPONENTFROMURL] --> Java 
value="LOADCOMPONENTFROMURL" type=<java.lang.String>
                arg # 3: Rexx argument=[0] --> Java value="0" 
type=<java.lang.String>
                arg # 4: Rexx argument=[0] --> Java value="0" 
type=<java.lang.String>
                arg # 5: Rexx argument=[1] --> Java value="1" 
type=<java.lang.String>
    ].]
    wu114215:test rony$ 

Shall I reopen <https://bz.apache.org/ooo/show_bug.cgi?id=117961> or create a 
new issue and supply
this information with it? Or is it sufficient to just bring this up here?

---rony



Reply via email to