bugGNU Octave - Bugs: bug #56143, gui hangs on osx when switching...


bug #56143: gui hangs on osx when switching between windows

Submitted by:  None
Submitted on:  Tue 16 Apr 2019 06:16:14 PM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  None Assigned to:  None
Originator Name:  eflister Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  5.1.0
Operating System:  Mac OS

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 22 May 2020 05:32:21 PM UTC, comment #14: 

Still seeing this. Octave installed with Mac ports.

GNU Octave, version 5.2.0
Copyright (C) 2020 John W. Eaton and others.
This is free software; see the source code for copying conditions.

Octave was configured for "x86_64-apple-darwin19.4.0".

Wed 17 Apr 2019 10:35:09 PM UTC, comment #13: 

the tabs that switch among open files in the editor also sometimes miss the mouse up.  i suspect whatever is handling mouse/keyboard events is slow and buggy.

eflister <eflister>
Wed 17 Apr 2019 05:01:54 PM UTC, comment #12: 

Oh, I forgot that we made that change.  I think it was done because the interpreter processes events when waiting for input, but only if readline is used so we decided to require it.


I guess maybe it is time for my plans to replace the terminal widget to become less of a long-term wish and more of a priority project...

John W. Eaton <jwe>
Project Administrator
Wed 17 Apr 2019 04:12:17 PM UTC, comment #11: 

> Can the hang on startup problem still happen if you start Octave with the --no-line-editing option?

Can't do this, apparently.

$ octave --gui --no-line-editing
error: --gui and --no-line-editing are mutually exclusive options

The hang never occurs in the CLI as far as I can tell, only in the GUI, so it's not meaningful to test it without --gui here.

Andrew Janke <apjanke>
Wed 17 Apr 2019 04:01:36 PM UTC, comment #10: 

maybe a longshot, but slow event handling makes me think it is related -- mouse up events seem to be missed very frequently. when clicking the mouse to place the cursor somewhere in the editor, it often acts as if i have started a selection but not finished it, so that a bunch of unintended code is highlighted as i move the mouse away as if it never got the up click.  similarly normal mousing around frequently unintentionally selects a bunch of code and drags it elsewhere.  typing is often very laggy as the completion popup menu struggles to keep up.

eflister <eflister>
Wed 17 Apr 2019 01:44:06 PM UTC, comment #9: 

Can the hang on startup problem still happen if you start Octave with the --no-line-editing option?  Disabling readline is not a real solution, but it could tell us if the problem really is due to attempting to write to the terminal at the wrong time.

John W. Eaton <jwe>
Project Administrator
Wed 17 Apr 2019 01:37:20 PM UTC, comment #8: 

I don't know whether it is causing Octave to hang, but it appears that readline has already read some character that is bound to forward-char, rl_dispatch_subseq has called the forward-char function but it can't move forward (already at EOL?) and is stopped when writing the bell character (using rl_ding) to the terminal.  If this happens on startup, then I'm not sure why.  Is Octave somehow picking up some spurious input when it doesn't expect to see anything and is then calling rl_ding at a point when writing output will block?

John W. Eaton <jwe>
Project Administrator
Wed 17 Apr 2019 10:04:14 AM UTC, comment #7: 

One more spindump; this one I got myself using a Homebrew-installed Octave 5.1.0 from homebrew/core instead of Octave.app: https://github.com/octave-app/octave-app/files/3088998/octave.5.1.0.beachball.on.startup.-.brewed.-.apjanke.-.spindump.txt.zip

Andrew Janke <apjanke>
Wed 17 Apr 2019 07:12:56 AM UTC, comment #6: 

> do i get that from running `port installed`?

Yep, that's what I was interested in.

Here's "octave 5.1.0 hang on launch spindumps - 2019-04-16.zip" which contains spindumps from eflister and another user who reported Octave.app 5.1.0 hangs. https://github.com/octave-app/octave-app/files/3088267/octave.5.1.0.hang.on.launch.spindumps.-.2019-04-16.zip (Too big to attach on Savannah.) Maybe these will help in the diagnosis. I've edited the files down to just the Octave-related processes, for readability.

Both of these spindumps are from when a hang occurred on program launch. They seem superficially similar. In both, in octave-gui, the DispatchThread seems to be wedged in the keypress handler for the terminal emulation in octgui, which I believe is the Command Window. SelfListener and QFileInfoGatherer both appear to be waiting on a QMutex, and QThread is stopped in a system call inside readline getting some input for the command window. I don't know Qt programming or the Octave codebase well enough to know what that means.

Downstream bug report is here: https://github.com/octave-app/octave-app/issues/24

Andrew Janke <apjanke>
Wed 17 Apr 2019 12:16:16 AM UTC, comment #5: 

do i get that from running `port installed`?  if so, the answer is:
  qt5-qtbase @5.12.2_0+openssl (active)
  qt5-qtdeclarative @5.12.2_0 (active)
  qt5-qtmacextras @5.12.2_0 (active)
  qt5-qtsvg @5.12.2_0 (active)
  qt5-qttools @5.12.2_0 (active)
  qt5-sqlite-plugin @5.12.2_0 (active)

yes this bug report refers to octave 5.1.0, i indicated that in the "release" field.

beta3 hung on launch: github.com/octave-app/octave-app/issues/24#issuecomment-483873826

4.4.1 hung after editing file while in debugger and hitting "save and run" without manually stopping the debugger: github.com/octave-app/octave-app/issues/24#issuecomment-483889052

would there be any value to trying the non-qt backends?

eflister <eflister>
Tue 16 Apr 2019 10:06:08 PM UTC, comment #4: 

@eflister: Also, can you confirm what version of Qt your MacPorts Octave installation is using?

Andrew Janke <apjanke>
Tue 16 Apr 2019 10:00:39 PM UTC, comment #3: 

on IRC apjanke  Andrew Janke  wrote:

Matlab Octave /Octave.app maintainer here. I'm seeing the same thing: frequent beachball hangs, especially when using the debugger and switching between widgets, regardless of whether editor is undocked.

No known cause yet. But it may be related to the Qt version: we originally built against the current Qt 5.12.x series, and got lots of beachballs. We recently tried building against Qt 5.11.x, and stability seems to be better there.

If you want to try our build using Qt 5.11, you can download Octave.app 5.1.0 beta 3 from http://octave-app.org/Developer-Downloads.html. (That way you don't have to wrangle Qt versions yourself; it has all its dependencies bundled in the .app file.)

eflister <eflister>
Tue 16 Apr 2019 10:00:31 PM UTC, comment #2: 

Schoeps and I are also seeing this behavior with our Octave.app builds. It seems to be new with Octave 5.1.0: 4.4.1 froze much less often.

@eflister: is this Octave version 5.1.0 you're referring to?

This may be related to the version of Qt that Octave is built against. Our 4.4.1 was built against Qt 5.11.x. With 5.1.0, we built against the current Qt 5.12.x. We've recently made a new "5.1.0 beta 3" build that is built against Qt 5.11.x, and it's too soon to tell, but it sure seems to freeze less often.

Our earlier 5.1.0 builds were made on macOS 10.13, and the new 5.1.0 beta 3 build with Qt 5.11 made on macOS 10.12, which conceivably affect the behavior too, but I doubt it.

@eflister: Would you mind downloading Octave.app 5.1.0 beta 3 from http://octave-app.org/Developer-Downloads.html and seeing if that works better for you? You can also try our 4.4.1 (vs Qt 5.11) from http://octave-app.org/Download.html and see how that behaves. It would be useful to have an additional user testing it here.

Andrew Janke <apjanke>
Tue 16 Apr 2019 09:03:39 PM UTC, comment #1: 

OP here, well it still happens even without ever undocking the editor.  it makes octave basically unusable for me.  please let me know if there's anything i can do to try to figure out the cause!

eflister <eflister>
Tue 16 Apr 2019 06:16:14 PM UTC, original submission:  

installed from macports on osx 10.14.4 configured for x86_64-apple-darwin18.2.0.  i use the gui+debugger, typically via "keyboard," and the gui is constantly beachball hanging when i switch between windows - i typically use the editor undocked.  is this a known problem?  any workarounds i should try?



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

Attach Files:

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 jwe (Posted a comment)
  • -email is unavailable- added by apjanke (Posted a comment)
  • -email is unavailable- added by eflister (Posted a comment)
  • -email is unavailable- added by None (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.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5