bugGNU Octave - Bugs: bug #45372, crash on zoom using imshow with...

 
 

bug #45372: crash on zoom using imshow with uint8 data (also image and imagesc)

Submitted by:  Hartmut <hardy>
Submitted on:  Mon 22 Jun 2015 10:42:01 AM UTC  
 
Category: Plotting with OpenGLSeverity: 4 - Important
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating 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)

Fri 09 Jun 2017 03:33:49 PM UTC, comment #9:

Upgrade to the latest stable version of Octave, 4.2.1.

Rik <rik5>
Project Administrator
Fri 09 Jun 2017 01:17:33 PM UTC, comment #8:

Dear all, i'm sorry, but could kindly someone explain me hoe to resolve the problem?

In particular how have i to procede?
Install, which command do in the command line, etc... sorry, it's my forst time...
I've got OpenSuse.

Many thanks

Luca <bastia>
Mon 22 Jun 2015 08:01:09 PM UTC, comment #7:

I am the one to blame :-), so I may try to explain the oddity.
As the octave_value class may store such types as function handles, I hadn't thought that it could feature array specific methods like rows/columns. Hence I first (blindly) turned the octave_value into an array type.

I pushed the fix here:
http://hg.savannah.gnu.org/hgweb/octave/rev/dc74b700cdec

Pantxo Diribarne <pantxo>
Project Member
Mon 22 Jun 2015 07:58:02 PM UTC, comment #6:

For me this patch works fine as well. It eliminates the crashes with imshow, image and imagesc. (Tested only on Ubuntu 14.04)

Hartmut <hardy>
Mon 22 Jun 2015 07:35:56 PM UTC, comment #5:

The patch works for me. I don't know why the code was casting to a double matrix value just to get the number of rows. Very odd.

The fix should definitely go on stable.

Rik <rik5>
Project Administrator
Mon 22 Jun 2015 07:15:12 PM UTC, comment #4:

BTW, the bug can be triggered just using a right click on the image which triggers the selection process (for eventual context menu execution).
However, when in zoom mode, I don't expect that the left mouse button triggers object selection as it is already used for drawing the zoom-box.

Pantxo Diribarne <pantxo>
Project Member
Mon 22 Jun 2015 07:03:52 PM UTC, comment #3:

Hi,

I attached a patch that fixes the issue for me.

(file #34295)

Pantxo Diribarne <pantxo>
Project Member
Mon 22 Jun 2015 04:45:32 PM UTC, comment #2:

Confirmed on dev. Running with the debugger is not very informative. See below.

Rik <rik5>
Project Administrator
Mon 22 Jun 2015 04:16:12 PM UTC, comment #1:

Thanks for the bug report, I can confirm the crash here on both 4.0.0 and dev.

Mike Miller <mtmiller>
Project Administrator
Mon 22 Jun 2015 10:42:01 AM UTC, original submission:

Here is a little script to show the behavior:

To reproduce the crash, do the following few steps:
1. in the figure window, press the zoom button "+Z"
2. use the left mouse button inside the plot region to the select a zoom region
3. CRASH, Octave closes

The resulting error messing, when using Octave in CLI mode is:

A few observations that might help:

  • This happens only with the qt plotting toolkit. Fltk and gnuplot are fine.
  • This happens only with integer data (uint8 in the above example). Double data is fine.
  • This happened with the 4.0.0 release. I had the crash on a self compiled version on Ubuntu 14.04 as well as on the official Windows installer.
  • If you use image(I) instead of imshow(I) you get error messages (wich is a bug in itself) but no crash.
  • If you use imagesc(I) instead if imshow, you get error messages (another bug in itself) but no crash.

This behavior is very disturbing, because image data very often IS uint8 data (and not double data). The imread function returns uint8 data normally.

Hartmut <hardy>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34295:  fix_image_select.patch added by pantxo (1KiB - text/x-diff)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by bastia (Posted a comment)
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by hardy (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 22 Feb 2016 06:02:17 PM UTCmtmillerDependencies-=>bugs #46104 is dependent
    Mon 22 Feb 2016 06:01:30 PM UTCmtmillerDependencies-=>bugs #46277 is dependent
    Mon 22 Feb 2016 05:59:38 PM UTCmtmillerDependencies-=>bugs #46885 is dependent
    Mon 22 Jun 2015 08:01:09 PM UTCpantxoStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Mon 22 Jun 2015 07:03:52 PM UTCpantxoAttached File-=>Added fix_image_select.patch, #34295
    Mon 22 Jun 2015 04:16:12 PM UTCmtmillerSeverity3 - Normal=>4 - Important
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1