bugGNU Octave - Bugs: bug #40545, Opening preferences causes the GUI...

 
 

bug #40545: Opening preferences causes the GUI to hang forever on OSX 10.9

Submitter:  Carlo de Falco <cdf>
Submitted:  Mon 11 Nov 2013 10:39:39 AM UTC
   
 
Category:  GUI Severity:  5 - Blocker
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 20 Oct 2015 07:32:21 PM UTC, comment #30: 

Using Fink for dependencies and running Mac OS 10.10.5, I'm able to open the preferences without hanging.

Ben Abbott <bpabbott>
Group Member
Tue 20 Oct 2015 04:21:25 PM UTC, comment #29: 

Is this bug relevant anymore?  Seems like the GUI is behaving bettor on Mac platforms these days.

Rik <rik5>
Group administrator
Thu 10 Jul 2014 02:04:16 PM UTC, comment #28: 

I recently switched to Qt 4.8.6 (from fink) and this bug doesn't occur anymore.

Pantxo Diribarne <pantxo>
Group Member
Thu 15 May 2014 06:01:48 AM UTC, comment #27: 

Sure, it is attached.

(file #31375)

Pantxo Diribarne <pantxo>
Group Member
Thu 15 May 2014 12:15:48 AM UTC, comment #26: 

Pantxo,

Can you attach a patch for the default branch?

Ben Abbott <bpabbott>
Group Member
Wed 14 May 2014 03:29:02 PM UTC, comment #25: 

Oups, I had omitted to make the required modifications to settings-dialog.ui. Everything works on default also. Sorry for the noise.

Pantxo Diribarne <pantxo>
Group Member
Wed 14 May 2014 07:53:40 AM UTC, comment #24: 

The problem is indeed fixed when applying the patch #29697 to stable. As I said the patch doesn't apply on default so I only could manually replicate it. I will double check that I didn't forget any modifications while copying the patch but there seems to be a new issue that has appeared in default (thus in gui-release).

Pantxo Diribarne <pantxo>
Group Member
Tue 13 May 2014 08:23:19 PM UTC, comment #23: 

I'll take time in the coming days to rebuild.

Pantxo Diribarne <pantxo>
Group Member
Tue 13 May 2014 06:15:17 PM UTC, comment #22: 

Does the freeze also shows up in the stable version?

Torsten Lilge <ttl>
Group Member
Tue 13 May 2014 05:50:52 PM UTC, comment #21: 

I built default.
 
AFAIR I've always seen this freeze (on my builds) but I didn't care. Now I would like to test the shortcut_manager so I become more interested in trying to fix it.

Pantxo Diribarne <pantxo>
Group Member
Tue 13 May 2014 05:36:18 PM UTC, comment #20: 

Pantxo, which branch is affected?

Torsten Lilge <ttl>
Group Member
Tue 13 May 2014 02:44:31 PM UTC, comment #19: 

Hi,

I am not able to open preference dialog under mac os: it freezes as described in this bug. I can't directly apply the patch but trying to replicate it in the current src tree did does not fix the freezing problem for me.

I use fink for most dependencies

Pantxo Diribarne <pantxo>
Group Member
Tue 03 Dec 2013 12:58:41 PM UTC, comment #18: 

I've migrated to Mac OS 10.9 and am also seeing the message below when I start the gui.


013-12-02 22:27:14.530 octave-gui[51697:d07] CoreText performance note: Client called CTFontCreateWithName() using name "Courier New" and got font with PostScript name "CourierNewPSMT". For best performance, only use PostScript names when calling this API.
2013-12-02 22:27:14.530 octave-gui[51697:d07] CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.
2013-12-02 22:27:14.593 octave-gui[51697:d07] CoreText performance note: Client called CTFontCreateWithName() using name "Courier New" and got font with PostScript name "CourierNewPSMT". For best performance, only use PostScript names when calling this API.
2013-12-02 22:27:17.214 octave-gui[51697:d07] CoreText performance note: Client called CTFontCreateWithName() using name "Menlo" and got font with PostScript name "Menlo-Regular". For best performance, only use PostScript names when calling this API.


Ben Abbott <bpabbott>
Group Member
Tue 26 Nov 2013 02:19:14 PM UTC, comment #17: 

Ben,

I just received feedback to my report about the prototype
portfile for Octave 3.8 in the Macports tracker, seems the
portfile maintainer is at work on these issues, let's see if he has better luck than me.

c.

Carlo de Falco <cdf>
Group Member
Tue 26 Nov 2013 01:28:28 PM UTC, comment #16: 

Re: Should we really disable selecting new fonts?

Carlo's binaries won't be a problem, but I'm concerned about the Octave packages from Fink, Macports, & Homebrew.   Would it be sufficient to bring the patch to the attention of the package maintainers?

Ben Abbott <bpabbott>
Group Member
Tue 26 Nov 2013 10:57:04 AM UTC, comment #15: 
  • How to proceed now? Should we really disable selecting new fonts?


well, that's an ugly workaround I intend to use to build preview binaries that do not freeze, not a real fix so I think this shouldn't be applied in the repository, what do you think?

  • After changeset b001d9e9fd17 the font names used for terminal and editor are taken from the systems at runtime. Does this prevent the warning messages?


no, I still see the warning messages

  • Do you see the warning when clicking "Cancel", too?

Yes, I see the same warning if I click cancel

Carlo de Falco <cdf>
Group Member
Tue 26 Nov 2013 05:54:18 AM UTC, comment #14: 

In reply to comment #12:
How to proceed now? Should we really disable selecting new fonts?
Building the gui with Qt 5 does not work at the moment.

After changeset b001d9e9fd17 the font names used for terminal and editor are taken from the systems at runtime. Does this prevent the warning messages?

In Reply to comment #13:
Do you see the warning when clicking "Cancel", too?

Torsten Lilge <ttl>
Group Member
Sun 24 Nov 2013 06:23:08 PM UTC, comment #13: 

For the track record, when I exit the preferences dialog by pressing "esc" I see the following warning:


2013-11-24 19:17:30.021 octave-gui[17565:d07] modalSession has been exited prematurely - check for a reentrant call to endModalSession:


Carlo de Falco <cdf>
Group Member
Sun 24 Nov 2013 06:16:50 PM UTC, comment #12: 

Thanks Torsten!

With this patch applied the preferences
dialog opens without causing the freeze.

I have to do more thorough testing but at
a first look it seems all other preferences
work.

I still see the annoying warning about using
postscript font names, but that is just a warning.

c.

Carlo de Falco <cdf>
Group Member
Sun 24 Nov 2013 11:32:16 AM UTC, comment #11: 

This is not complicated. Attached the patch.

(file #29697)

Torsten Lilge <ttl>
Group Member
Sun 24 Nov 2013 06:13:03 AM UTC, comment #10: 

Torsten,

Would it be very complicated to create
a patch to disable font selectors in the
preferences dialog?

Could you give me some hints about where to
look to do this?


Carlo de Falco <cdf>
Group Member
Sat 23 Nov 2013 06:13:52 PM UTC, comment #9: 

Just an update, some ggolgling around [1,2] seems to show that at least the PostScript font part is due to a known QT bug.

[1] http://successfulsoftware.net/2013/10/23/fixing-qt-4-for-mac-os-x-10-9-mavericks/
[2] https://bugs.kde.org/show_bug.cgi?id=62054

Carlo de Falco <cdf>
Group Member
Tue 19 Nov 2013 06:31:32 AM UTC, comment #8: 

Maybe this coud be related to this Qt bug?
https://bugreports.qt-project.org/browse/QTBUG-31803

The report is for Qt5 but someone in the discussion says it also affects Qt4. The fix seems to be for Qt5 only though ...

Does octave-gui build with QT5?

c.

Carlo de Falco <cdf>
Group Member
Mon 18 Nov 2013 10:17:35 PM UTC, comment #7: 

Also,
with that line commented,
changing most settings in
the dialog works but if
I click on a font name selection
menu (in the editor or terminal tab)
I get a gui freeze again.

c.

Carlo de Falco <cdf>
Group Member
Mon 18 Nov 2013 10:00:36 PM UTC, comment #6: 

Torsten,

Thanks for the useful directions.
Adding debug messages to the file you suggested I tracked down the problem to this line:


terminal_fontName->setFontFilters(QFontComboBox::MonospacedFonts);


commenting out this line the preferences dialog opens without freezing.

I don't know if this is related, but I also noticed that
when running the gui I get lots of messages in the console log like this one:


18/11/2013 22:54:37.011 octave-gui[87971]: CoreText performance note: Client called CTFontCreateWithName() using name "Courier New" and got font with PostScript name "CourierNewPSMT". For best performance, only use PostScript names when calling this API.


c.

Carlo de Falco <cdf>
Group Member
Mon 18 Nov 2013 09:07:18 PM UTC, comment #5: 

This is really strange, setupUI is a function that is automatically generated when compiling the ui-file (settings-dialog.ui) of the settings dialog. The ui-file is in turn generated by qt4-designer where the dialog box is graphically composed. All program code involved is generated by qt itself.

But you can put the fprintf-messages into the function setupUI in order to isolate the issue. The function can be found in ui-settings-dialog.h in build-dir/libgui/src. Be careful, the file is overwritten when the ui-file settings-dialog.ui in the source-dir is recompiled.


Torsten Lilge <ttl>
Group Member
Mon 18 Nov 2013 12:27:00 PM UTC, comment #4: 

Hi,
Thanks for the new patch.

With your patch, I see no file "settings.log"
in the current directory but if I move the creation
of the file up one instruction, i.e.


settings_dialog::settings_dialog (QWidget *p, const QString& desired_tab):
   QDialog (p), ui (new Ui::settings_dialog)
 {

FILE *log = fopen("settings.log","w");
   ui->setupUi (this);


The file is created. As it remains empty, can I conclude the freeze occurs in


ui->setupUi (this);


?

Carlo de Falco <cdf>
Group Member
Mon 18 Nov 2013 12:02:49 PM UTC, comment #3: 

As I found out, the debug output only appears when the dialog creation has finished (in your case never). The attached patch immediately writes the messages into the file "settings.log" in the current directory.


(file #29650)

Torsten Lilge <ttl>
Group Member
Sat 16 Nov 2013 06:31:40 PM UTC, comment #2: 

with the patch applied
the gui freezes when I
select "preferences" from
the menu or press cmd-,
I see no messages during the
freeze neither in the command
prompt in the gui nor in the
terminal.


Carlo de Falco <cdf>
Group Member
Mon 11 Nov 2013 06:02:50 PM UTC, comment #1: 

Maybe also a qsci-lexer problem?

Attached a patch that prints out messages during creation of the settings dialog. Could you please post a copy of the messages you are seeing before the freeze?


(file #29595)

Torsten Lilge <ttl>
Group Member
Mon 11 Nov 2013 10:39:39 AM UTC, original submission:  

when running 3.7.7+ on OSX Mavericks, if I open the preferences dialog I see a spinning beach ball and Octave remains blocked,
I can only unblock it by killing both "octave" and "octave-gui".

I don't know what other info I could provide to help debug this as Octave does not really crash, just remains idle, so I don't get a crash report.


Carlo de Falco <cdf>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29697:  font_settings.patch added by ttl (3KiB - text/x-diff)
file #29595:  debug_settings_dialog.diff added by ttl (5KiB - 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 pantxo (Posted a comment)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by ttl (Updated the item)
  • -email is unavailable- added by cdf (Submitted the item)
  • -email is unavailable- added by cdf
  • -email is unavailable- added by cdf
  •  

    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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-20 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2014-05-15 pantxo Attached File- Added bugpref_default_40545.patch, #31375
    2013-11-24 ttl Attached File- Added font_settings.patch, #29697
    2013-11-18 ttl Attached File- Added debug_settings_dialog_02.diff, #29650
    2013-11-15 ttl StatusNone Need Info
    2013-11-11 ttl Attached File- Added debug_settings_dialog.diff, #29595
    2013-11-11 cdf Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code