bugGNU Octave - Bugs: bug #46933, imshow crashes on int16 images

 
 

bug #46933: imshow crashes on int16 images

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Mon 18 Jan 2016 09:41:45 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  Lachlan Andrew <lachlan>
Originator Name:  Avinoam Open/Closed:  Closed
Release:  dev 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)

Mon 15 Feb 2016 07:07:48 PM UTC, comment #7: 
Rik <rik5>
Project Administrator
Fri 29 Jan 2016 09:36:33 AM UTC, comment #6: 

Thanks,

The patch solves the crash problem.
I have added a line in http://wiki.octave.org/Status_of_bugs.

Avinoam Kalma <avinoam>
Project Member
Thu 28 Jan 2016 06:33:24 AM UTC, comment #5: 

The attached patch is (IMHO) a better solution.

The problem was that throwing an error caused some of the FLTK objects not to be initialized properly -- perhaps it was a callback.

Now, it simply issues a warning indicating what types are valid (uint16, not int16) and sets everything to black.

I'm not sure if it is a good idea to allow signed colours, so I'm inclined to disregard the first patch.

What do you think?

(file #36188)

Lachlan Andrew <lachlan>In charge of this item.
Thu 28 Jan 2016 05:30:06 AM UTC, comment #4: 

I take that back.  When I use the GUI instead of the CLI, I get an "abort" (signal 6), which crashes Octave before I get a chance to read any output.

I'll keep probing.

Lachlan Andrew <lachlan>In charge of this item.
Thu 28 Jan 2016 05:16:50 AM UTC, comment #3: 

I've tried reproducing this, but can't.

I get the "unsupported type" error (which is easy to fix; just a couple more lines of CONVERT_CDATA_1 in libinterp/core/graphics.cc), but none of the octave_value errors, and certainly no crash (segfault or whatever).

When I move the mouse over the figure, I get line upon line of

octave:4> error: unsupported type for cdata (= int16 matrix)
error: parse error
octave:4> error: unsupported type for cdata (= int16 matrix)
error: parse error
octave:4> error: unsupported type for cdata (= int16 matrix)
error: parse error
octave:4> error: unsupported type for cdata (= int16 matrix)

Do you actually get a segmentation fault?

I'd like to fix the parse errors and octave_value errors etc. before "hiding" them by handling int16 properly.

(file #36187)

Lachlan Andrew <lachlan>In charge of this item.
Thu 21 Jan 2016 07:16:02 PM UTC, comment #2: 

No, I am using 16-bit 4.1.0+ version.

Avinoam Kalma <avinoam>
Project Member
Wed 20 Jan 2016 09:20:34 PM UTC, comment #1: 

Same with 4.1.0+ on Windows (cross-built from tip three days ago)

Might be due to GraphicsMagick built w. 8-bit width?

Philip Nienhuis <philipnienhuis>
Project Member
Mon 18 Jan 2016 09:41:45 PM UTC, original submission:  

A = zeros (3,3,'int16');
imshow (A);

crashes Octave (default branch).

in 4.0.0 and 4.0.1-rc1 I get:

error: unsupported type for cdata (= int16 matrix)
error: octave_base_value::double_value (): wrong type argument '<unknown type>'
error: octave_base_value::convert_to_str_internal (): wrong type argument '<unknown type>'
error: octave_base_value::convert_to_str_internal (): wrong type argument '<unknown type>'
error: octave_base_value::convert_to_str_internal (): wrong type argument '<unknown type>'
error: octave_base_value::convert_to_str_internal (): wrong type argument '<unknown type>'
error: octave_base_value::matrix_value(): wrong type argument '<unknown type>'
error: octave_base_value::matrix_value(): wrong type argument '<unknown type>'
error: unsupported type for cdata (= int16 matrix)

Avinoam Kalma <avinoam>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #36187:  bug_46933.patch added by lachlan (677B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by avinoam (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-15 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2016-02-08 lachlan StatusConfirmed => Ready For Test
        Assigned toNone => lachlan
    2016-01-28 lachlan Attached File- => Added bug_46933_better_solution.patch, #36188
    2016-01-28 lachlan Attached File- => Added bug_46933.patch, #36187
    2016-01-20 philipnienhuis StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.5