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

 
 

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

Submitted by:  None
Submitted on:  Wed 10 Jun 2015 10:17:55 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: T HerzkeOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.0
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by philipnienhuis
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Jun 2015 01:11:35 AM UTCcarandraugStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 12 Jun 2015 07:42:09 PM UTCphilipnienhuisCarbon-Copy-=>Added carandraug
    Wed 10 Jun 2015 02:04:43 PM UTCmtmillerItem GroupIncorrect Result=>Regression
      StatusNone=>Confirmed
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1