bugGNU Octave - Bugs: bug #53802, octave deadlocks with deletefcn...

 
 

bug #53802: octave deadlocks with deletefcn callback that calls graphical function

Submitted by:  Guillaume <gyom>
Submitted on:  Tue 01 May 2018 11:12:16 AM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  3 - Low Item Group:  Segfault, Bus Error, etc.
Status:  Confirmed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 02 May 2018 06:34:47 AM UTC, comment #2:

We addressed something similar to this in the past, but I think that was merely a simple C++ fix:

https://savannah.gnu.org/bugs/?func=detailitem&item_id=52666

However, Rik is probably correct here.

To explain the freeze, keep in mind that the hand-shaking for the Qt input dialog class of functions is programmed to put the worker thread to sleep when the user is engaged in responding to the dialog box. That was my crude way of doing thread-safe sequential programming when at the time the Qt input dialog class was added there was no designed cross-thread protocol.

So, what could be happening is that the figure-closing graphics operations are interfering with the display of the question-dialog. Rather than freezing, think of this one as Octave core (worker thread) waiting for the user to answer a question when there is no dialog box and button to click showing on the screen.

Notice the CPU monitor shows ostensibly 0% whereas for a freeze there is typically some sort of infinite loop with 100% CPU usage.

Dan Sebald <sebald>
Tue 01 May 2018 10:40:08 PM UTC, comment #1:

Confirmed. It probably isn't a very common occurrence so I lowered the priority, but this should work. I actually wrote a little m-file mydel.m for testing

I then used

and finally closed the figure.

stepping through the code, the problem was the call to questdlg.

Incidentally, using the FLTK toolkit a dialog was correctly shown so this is likely to be a cross-thread issue with Qt.

Rik <rik5>
Project Administrator
Tue 01 May 2018 11:12:16 AM UTC, original submission:

Incidentally found that the following freezes Octave when closing the figure:

It's a rather odd construct (I meant to use CloseRequestFcn) so it might be a low priority corner case.

Guillaume <gyom>

 

(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 sebald (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by gyom (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-01 rik5 Priority5 - Normal => 3 - Low
    2018-05-01 mtmiller CategoryPlotting => Plotting with OpenGL
        StatusNone => Confirmed
        SummaryFreeze with deletefcn callback => octave deadlocks with deletefcn callback that calls graphical function

    Back to the top


    Powered by Savane 3.3