bugGNU Octave - Bugs: bug #40609, "octave --no-gui" can't...

 
 

bug #40609: "octave --no-gui" can't run QtHandles

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Sun 17 Nov 2013 04:55:47 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 17 Nov 2013 08:53:53 PM UTC, comment #4: 
Michael Goffioul <goffioul>
Sun 17 Nov 2013 08:26:25 PM UTC, comment #3: 

Yes you are right. Adding this switch and replacing QCoreApplication by QApplication fixes the issue. I attached  a patch.

(file #29643)

Pantxo Diribarne <pantxo>
Group Member
Sun 17 Nov 2013 06:56:31 PM UTC, comment #2: 

It's possible that the second problem is simply due to the QApplication exiting because it detects that the last window is being closed.

Try to add the following to the created QApplication object (assuming "app" is the application object):


app.setQuitOnLastWindowClosed (false);


Michael Goffioul <goffioul>
Sun 17 Nov 2013 05:33:24 PM UTC, comment #1: 

Using QCoreApplication instead of QApplication was a misunderstanding on my part.  It should be changed.

I'm not sure what the fix is for the other problem.  What is the difference between what we are doing now and what the QtHandles wrapper program did with older versions of Octave?

John W. Eaton <jwe>
Group administrator
Sun 17 Nov 2013 04:55:47 PM UTC, original submission:  

AFAIU, the "--no-gui" option of octave is aimed at running Qt based graphics_toolkits without the needing the complete GUI.

Currently the use of QCoreApplication in no-gui mode, prevents QtHandles from working. The following error is returned before crash:


octave:1> graphics_toolkit ("qt")
octave:2> plot (1:10)
Fatal: QWidget: Cannot create a QWidget when no GUI is being used
panic: Aborted -- stopping myself...


This is consistent on mac os x 10.7 and linux mint 14.

Simply replacing QCoreApplication by QApplication is not a solution. It lets figures be created and work properly ... until you want to close theim :


octave:1> graphics_toolkit ("qt")
octave:2> plot (1:10)
octave:3> sombrero
octave:4> close (1)
Warning: QThread: Destroyed while thread is still running
octave:5>pantxo@dibona ~/dev/QtHandles $


After that octave silently crashes.

Pantxo Diribarne <pantxo>
Group Member

 

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

Attach Files:
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by pantxo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-17 goffioul Open/ClosedOpen Closed
    2013-11-17 pantxo Attached File- Added fix_bug40609.diff, #29643

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code