bugGNU Octave - Bugs: bug #45290, calling java from octave:...

 
 

bug #45290: calling java from octave: NullPointerException in parameter conversion of string array (cellarray -> String[])

Submitter:  None
Submitted:  Wed 10 Jun 2015 10:17:55 AM UTC
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  T Herzke Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Mon 15 Jun 2015 05:28:42 PM UTC, comment #6: 

Thank you for the very fast fix, Carnë

Philip Nienhuis <philipnienhuis>
Project Member
Mon 15 Jun 2015 01:11:35 AM UTC, comment #5: 

It should be fixed now with http://hg.savannah.gnu.org/hgweb/octave/rev/137f183b7dee

It will be part of the next patch release, i.e., 4.0.1 release.

Carnë Draug <carandraug>
Project Member
Sun 14 Jun 2015 08:00:59 PM UTC, comment #4: 

Be careful please, as the one I found may not be the one at fault but only uncover the actual problem introduced in an earlier changeset.
Perhaps speculation but it has happened before.

Philip Nienhuis <philipnienhuis>
Project Member
Sat 13 Jun 2015 09:10:58 PM UTC, comment #3: 

Thanks for finding that commit.

Based on this comment in that commit

// Note that we do NOT handle char here because they are unboxed
// into a String[], not into a char array

I'd guess that the first if-clause in that commit needs an additional check like

    && ! val.is_char_type()

But as I know nothing about octave internals this is a wild guess.

T H

Anonymous
Fri 12 Jun 2015 07:42:09 PM UTC, comment #2: 

A little "bisecting" ("hg update <cs>" until catching the offending changeset) shows that it is this changeset by Carnë:

http://hg.savannah.gnu.org/hgweb/octave/rev/81fcf4aa9e03
Automatically convert octave vectors into java primitive arrays (bug #44882)

that broke this.
I'll cc Carnë

Philip Nienhuis <philipnienhuis>
Project Member
Wed 10 Jun 2015 02:04:43 PM UTC, comment #1: 

Thanks for your bug report, I can confirm this regression on 4.0.0.

Mike Miller <mtmiller>
Project Administrator
Wed 10 Jun 2015 10:17:55 AM UTC, original submission:  

This was working fine in octave 3.8.2, but produces an error in octave 4.0.0. Tested on Linux with self-compiled executable and also on windows using the official binaries.

Steps to reproduce:

runtime = javaMethod('getRuntime','java.lang.Runtime');
process = runtime.exec({'echo','x'})

expected result:
process =
<Java object: java.lang.ProcessImpl>

actual result:
error: [java] java.lang.NullPointerException

The octave error is triggered in libinterp/octave-value/ov-java.cc line 715, where a java exception in the parameter conversion code is detected and reported.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by philipnienhuis
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-15 carandraug StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-06-12 philipnienhuis Carbon-Copy- Added carandraug
    2015-06-10 mtmiller Item GroupIncorrect Result Regression
        StatusNone Confirmed
        Operating SystemGNU/Linux Any

    Back to the top


    Powered by Savane 3.9