bugGNU Octave - Bugs: bug #48378, native doInvoke() fails from Java...

 
 

bug #48378: native doInvoke() fails from Java method called from Octave

Submitted by:  L. Stevens <carcachute>
Submitted on:  Sat 02 Jul 2016 06:03:30 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Justin D.Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 03 Jul 2016 06:57:08 PM UTC, comment #2:

Thanks for the bug report. Confirmed here on Debian on the default branch and version 3.8.2 as well.

I don't think we can call this a regression because the Java functionality was only added to Octave in version 3.8, so if it didn't work there, it just has never worked properly (and hasn't been noticed or reported properly until now).

I can confirm that it does work in the old java package on Octave 3.6, so something must have been lost when it was imported into Octave proper.

I think we need something like the following line in Octave.java

In addition the java package started the JVM with a -Doctave.java.path=DIR argument, so the above path could be resolved.

We'll need some similar mechanism to pass the path to liboctinterp.so into Java so the library can be loaded to resolve these native library routines.

Mike Miller <mtmiller>
Project Administrator
Sat 02 Jul 2016 10:30:51 PM UTC, comment #1:

Java_org_octave_Octave_doInvoke() function exists in liboctinterp.

L. Stevens <carcachute>
Sat 02 Jul 2016 06:03:30 PM UTC, original submission:

I have a Java class that accepts Octave function handles (OctaveReferences) for performing callbacks. The class loads without issue but is unable to call doInvoke() to execute the callback functions. The following error appears verbatim on the Octave console.

error: [java] java.lang.UnsatisfiedLinkError: org.octave.Octave.doInvoke(I[Ljava/lang/Object;)V

This was issue was originally noted on the help-octave list in June 2014, with Octave 3.8:
https://lists.gnu.org/archive/html/help-octave/2014-06/msg00061.html
The post suggests that Octave 3.6 does not have this issue.

The attached Java class reproduces the problem. Call it with:

x = javaObject('foo')
x.callBack(@(x) (disp(x)) )

I have reproduced the problem using the pre-built Win32 package as well as the OS X package built using Homebrew.

I did search several different ways to see if this was submitted previously and did not find any matches. I apologize if this is a duplicate.

L. Stevens <carcachute>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #37671:  Foo.java added by carcachute (149B - application/octet-stream - Simple Java source code that replicates the problem)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by carcachute (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 03 Jul 2016 06:57:08 PM UTCmtmillerItem GroupRegression=>Incorrect Result
      StatusNone=>Confirmed
      Release4.0.2=>dev
    Sat 02 Jul 2016 06:03:30 PM UTCcarcachuteAttached File-=>Added Foo.java, #37671

    Back to the top


    Powered by Savane 3.1-cleanup1