bugGNU Octave - Bugs: bug #45860, Many stacked uipanels crashes the...


bug #45860: Many stacked uipanels crashes the qt gui in Windows 8

Submitted by:  -X- <jsh>
Submitted on:  Tue 01 Sep 2015 11:00:55 PM UTC  
Category:  Plotting with OpenGL Severity:  4 - Important
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

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)

Fri 13 Apr 2018 08:44:50 AM UTC, comment #21: 

With Octave-5.0.0 (from a few days ago) I cannot reproduce this on Win10.
Even with n = 25 I get a good-looking picture.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 13 Apr 2018 07:21:26 AM UTC, comment #20: 

Issue still present in Octave 4.3.9 alpha on Windows 10

Sat 10 Mar 2018 05:09:18 PM UTC, comment #19: 

On my Win7 and Win10 systems I cannot reproduce this bug anymore.

Closing report.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 09 Mar 2018 10:29:47 PM UTC, comment #18: 

I don't see the crash for the original example when using a recent build from mxe-octave on a Windows 10 system.

Is anyone else still able to reproduce this problem with the current development sources (4.3.0+)?

Can this report be closed?

John W. Eaton <jwe>
Project Administrator
Tue 24 Jan 2017 09:55:11 PM UTC, comment #17: 

Still crashes with the example in the original report on 4.2.0 and
Changing status to "In Progress".

Avinoam Kalma <avinoam>
Project Member
Fri 26 Aug 2016 09:07:57 PM UTC, comment #16: 

With Octave-4.1.0+ hg id 0ca341841198 (3 days ago), 32bit Octave on Win-10,
Octave still crashes with the example in the original report for n=12. It doesn't crash for n=11.

Avinoam Kalma <avinoam>
Project Member
Fri 26 Aug 2016 10:31:42 AM UTC, comment #15: 

With octave-4.1.0+ hg id 6cbbd550aa91 ("allow subsasgn.."), Octave still crashes with the example in the orginal report for n=12.

FWIW, Octave crashes while still only the first complete blue rectangle has been drawn. But maybe that is a red herring due to multithreading?

Philip Nienhuis <philipnienhuis>
Project Member
Thu 25 Aug 2016 07:35:51 PM UTC, comment #14: 

Still the same crash with a windows 64bit (--enable-windows-64) version from Aug. 21. Is that recent enough?

Tomorrow I hope to make a newer build.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 24 Aug 2016 01:50:10 PM UTC, comment #13: 

@Philip: Can you re-test for this bug?  There has been a lot of cleanup to the graphics functions, and I think this issue may have disappeared.  This is still listed as severity 4 which is impeding the 4.2 release.

Rik <rik5>
Project Administrator
Mon 08 Aug 2016 08:45:40 PM UTC, comment #12: 

Bug #46501 has been patched by jwe and closed and this bug may have been fixed with it.

@Philip: Can you build a version for Windows via MXE and re-test?

Changing Status to "Need Info".

Rik <rik5>
Project Administrator
Wed 13 Jul 2016 12:47:52 PM UTC, comment #11: 

Ok, see attached gdb.txt

(file #37851)

-X- <jsh>
Wed 13 Jul 2016 11:34:05 AM UTC, comment #10: 

Great.  In gdb, can you type

thread apply all bt full

to get a stack trace of all threads?  That will tell us which part of Octave called the system library where the actual crash occurred.

Lachlan Andrew <lachlan>
Wed 13 Jul 2016 10:53:20 AM UTC, comment #9: 

I can't compile Octave for Windows but just running gdb on the binary gave this:

warning: Invalid parameter passed to C runtime function.

[New Thread 6312.0x13d4]
[New Thread 6312.0x1180]
[New Thread 6312.0x13c0]
[New Thread 6312.0xbdc]
[New Thread 6312.0x668]
[New Thread 6312.0x1d78]

Program received signal SIGSEGV, Segmentation fault.
0x77099947 in ntdll!RtlImageNtHeaderEx () from C:\WINDOWS\SYSTEM32\ntdll.dll

-X- <jsh>
Wed 13 Jul 2016 10:23:02 AM UTC, comment #8: 

jsh, if you have gdb available on the system, then the attached patch might work.

(I personally think Octave should do a stack trace in the signal handler by default, for cases such as this, but others have disagreed.)

(file #37842)

Lachlan Andrew <lachlan>
Wed 13 Jul 2016 07:59:56 AM UTC, comment #7: 

Running without Gui doesn't result in any error messages, just crash. Is there a way to run gdb with Octave on Windows?

Some more testing revealed that the issue seems to be the nested parents, as in the code below:

n = 24;
h = uipanel( );
for i=1:n
  % uipanel( 'parent', h );   % Works
  h = uipanel( 'parent', h );   % Crashes

-X- <jsh>
Wed 13 Jul 2016 07:29:12 AM UTC, comment #6: 

Philip and jsh, does file #37622 from bug #46501 prevent the crash?

(To apply it, the "application" variable has to be replaced by "qt_app".  I'll post an updated patch there soon.)

As Mike said, a stack trace would help.  Also, just running it from the command line will allow any error messages to be captured.

Lachlan Andrew <lachlan>
Wed 13 Jul 2016 05:51:44 AM UTC, comment #5: 

This is still the case with dev Octave  :-(

$ hg -v summary
parent: 22097:5ad67277b007 tip
 include builtin-defun-decls.h as needed
branch: default

Status back to "Confirmed"

Philip Nienhuis <philipnienhuis>
Project Member
Tue 12 Jul 2016 10:32:03 PM UTC, comment #4: 

Still crashes for me in 4.0.3

-X- <jsh>
Tue 12 Jul 2016 04:17:31 PM UTC, comment #3: 

In any case, we need a re-test since this bug was originally confirmed back in September, 2015 by Philip and there have been a lot of changes since then.

I'm changing the status back to "Need Info" until/if it can be confirmed again.

Rik <rik5>
Project Administrator
Tue 12 Jul 2016 04:03:05 PM UTC, comment #2: 

A gdb backtrace of this crash would be useful to identify where the problem is.

Mike Miller <mtmiller>
Project Administrator
Wed 02 Sep 2015 11:25:08 AM UTC, comment #1: 

I can confirm this with an --enable-windows-64 Octave-4.1.0+ on Win7 64-bit.
Up until n=11 goes OK, n=12 will reliably crash Octave.

Philip Nienhuis <philipnienhuis>
Project Member
Tue 01 Sep 2015 11:00:55 PM UTC, original submission:  

I found that when I run the script below with n>=12 Octave with the qt gui will crash (it works fine in linux though).

n = 12;

h = figure;
h = uipanel( 'parent', h, 'backgroundcolor', 'b' );
for i=1:n
  h  = uipanel( 'parent', h, 'units', 'normalized', 'position', [0 0 .9 .9], 'backgroundcolor', 'r' );
  h  = uipanel( 'parent', h, 'units', 'normalized', 'position', [0 0 .9 .9], 'backgroundcolor', 'g' );

-X- <jsh>


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

Attach Files:

Attached Files
file #37851:  gdb.txt added by jsh (29KiB - text/plain - Stack trace)
file #37842:  stacktrace.cset added by lachlan (5KiB - text/x-diff)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by philipnienhuis
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by jsh (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 16 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-10 philipnienhuis StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2017-01-24 avinoam StatusReady For Test => In Progress
    2016-08-24 rik5 StatusNeed Info => Ready For Test
    2016-08-08 rik5 StatusConfirmed => Need Info
    2016-07-13 jsh Attached File- => Added gdb.txt, #37851
    2016-07-13 lachlan Attached File- => Added stacktrace.cset, #37842
    2016-07-13 philipnienhuis StatusNeed Info => Confirmed
    2016-07-12 rik5 StatusConfirmed => Need Info
    2016-07-12 mtmiller CategoryGUI => Plotting with OpenGL
        Release4.0.1 => dev
    2016-07-01 philipnienhuis Carbon-Copy- => Added philipnienhuis
    2016-07-01 rik5 Severity3 - Normal => 4 - Important
    2016-05-16 lachlan Release4.0.0 => 4.0.1
    2016-05-16 lachlan Dependencies- => bugs #47931 is dependent
    2015-09-02 philipnienhuis StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.7