https://bugs.documentfoundation.org/show_bug.cgi?id=153177

            Bug ID: 153177
           Summary: Libre Office API example HelloTextTableShape.hangs
                    repeatedly when running on Mac OS.
           Product: LibreOffice
           Version: 7.4.3.2 release
          Hardware: ARM
                OS: macOS (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Context and references

I have LibreOffice 7.4.3.2 installed on an Apple Mac Mini M1 (ARM architecture)
machine running Mac OS version 13.1 (Ventura)

My intention is to achieve Java access to Libre Office using the SDK

I am working through the examples set out at
https://api.libreoffice.org/examples/DevelopersGuide/examples.html and
specifically
https://api.libreoffice.org/examples/DevelopersGuide/examples.html#FirstSteps 

I have successfully got FirstUnoContact and FirstLoadComponent to work.

Broken bootstrap

Firstly, the bootstrap provided does not work on Mac OS.  Bootstrap.java lines
around 334 are broken for Mac OS. Attachment 1 is my replacement that does
work.

Using the revised bootstrap (see attachment) for Mac I then got examples
FirstUnoContact and FirstLoadComponent to work.

I have been using NetBeans as my IDE.

Crib sheet

A crib sheet to make it easier for other people is as follows:

1.      In MacOS the libpipe library is located at
/Applications/LibreOffice.app/Contents/Frameworks/libjpipe.jnilib.  Add the
following run time parameter to project VM Options:

-Djava.library.path=/Applications/LibreOffice.app/Contents/Frameworks

2.      Add a dependency to the maven project forGroup Id org.libreoffice,
artifact ID  libreoffice, version say 7.4.1 or later if available.
3.      Add a dependency to the maven project forGroup Id org.libreoffice,
artifact ID  unoloader, version say 7.4.1 or later if available.

5       Repeating the hang

Then when running HelloTextTableShape. newDocComponent it gets as far as 

xComponentLoader.loadComponentFromURL(loadUrl, "_blank", 0, loadProps);
and hangs at:

Object.wait     
JobQueue.removeJob:210  
JobQueue.enter:308      
JobQueue.enter:281      
JavaThreadPool.enter:81 
java_remote_bridge.sendRequest:619      
ProxyFactory$Handler.request:145        
ProxyFactory$Handler.invoke:129 
Hidden Source Calls     
$Proxy3.loadComponentFromURL    
HelloTextTableShape.newDocComponent:462 





Steps to Reproduce:
1.      Install LibreOffice on your Mac OS machine.
2.      Download FirstUnoContact create IDE project and make fixes described
above so that it will run on MacOS.  This proves that your overall setup works
OK.
3.      Download FirstLoadComponent create IDE project and make fixes described
above so that it will run on MacOS.  This confirms that your overall setup
works OK.
4.      Download HelloTextTableShape. create IDE project and make fixes
described above so that it will run on MacOS.
5.      Trace through code until it enters newDocComponent.  Trace into
xComponentLoader.loadComponentFromURL and note that it hangs at Object.wait as
above.

This is 100% repeatable.


Actual Results:
Libre Office Hangs.  

Expected Results:
The test program should have worked in the same way as the first two test
programs ran successfully.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version 7.4.3.2
Mac OS X 13.1

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to