bugGNU Octave - Bugs: bug #66032, double clicking in Documentation...

 
 

bug #66032: double clicking in Documentation tab hangs Octave 9.2.0

Submitter:  Dennis Cote <dennisc_hi>
Submitted:  Fri 26 Jul 2024 08:41:28 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Need Info Assigned to:  None
Originator Name:  Dennis Cote Open/Closed:  * Open
Release:  * 9.2.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 22 Oct 2024 02:16:11 PM UTC, comment #14: 

comment #10:

> The program's behavior (or better stability) should not depend on arbitrary dialogs shown early enough at startup.


I fully agree. However, we don't know how to correct the issue at this point, so minimizing or eliminating the resulting effects would be an improvement.

I have been thinking this could be handled gracefully with another configuration option somewhat like the "global_skip_welcome_wizard". Let's call it "show_startup_version_dialog" with a default value of false to ensure the new dialog isn't displayed unless specifically enabled for backward compatibility. This flag would be checked immediately after the welcome wizard flag, and if it were set to true, it would cause Octave to display a simple modal dialog with an Octave icon, its version information, and an OK (or Close) button. The OK button would be simpler than setting up timers to close the dialog automatically after a fixed delay.

On the first run after installation, the welcome wizard would be displayed and the problem would be mitigated. On Windows installations where there is an issue, the new preference flag could be toggled by the user to mitigate the problem for future runs. Users on other platforms would not see the dialog unless they specifically asked for it.

Since this issue has already shown up in the file dialogs as well, it is possible, if not likely, that it will show up in other places until the underlying issue is identified and resolved. So this simple workaround may prevent other hangs as well.

Dennis Cote <dennisc_hi>
Tue 22 Oct 2024 01:38:32 PM UTC, comment #13: 


comment #12:

> Does your Windows user name contain any non-ASCII characters or spaces by any chance?


No, it does not. It is "DennisC".

Dennis Cote <dennisc_hi>
Tue 22 Oct 2024 09:06:16 AM UTC, comment #12: 

Not sure if this can be related: Octave stores some configuration files (e.g., for the GUI layout) somewhere inside the user folder.
The path to that user folder usually contains the Windows user name. Windows allows many characters (including spaces or non-ASCII characters) in Windows user names. However, sometimes they cause issues with some tools, dependencies or assumptions in Octave itself.

@dennisc_hi: Does your Windows user name contain any non-ASCII characters or spaces by any chance?

Markus Mützel <mmuetzel>
Group administrator
Mon 29 Jul 2024 07:59:22 PM UTC, comment #11: 


comment #10:

> That's understood, but would this be a solution? For me, this is exactly as if the Doctor says "don't do that" and therefore, only a workaround. The program's behavior (or better stability) should not depend on arbitrary dialogs shown early enough at startup.


I believe a work-around that allows Octave to operate correctly is infinitely better than a broken Octave that hangs and exhausts all available memory.

That doesn't mean that you shouldn't keep looking for the fundamental cause and a better solution, but Octave's users shouldn't have to suffer with hangs while waiting an indeterminate amount of time while developers ponder a problem they don't fully understand. Without a work-around, this issue may persist for a very long time if not forever.

Dennis Cote <dennisc_hi>
Mon 29 Jul 2024 07:44:48 PM UTC, comment #10: 

comment #9:

> I repeat, displaying a Qt dialog, any dialog, early in the startup process (as when the welcome wizard displays its dialogs) completely prevents the hangs in the Qt File Dialogs and the documentation tab (and likely other places that have not been discovered yet). After that, everything works as expected.


That's understood, but would this be a solution? For me, this is exactly as if the Doctor says "don't do that" and therefore, only a workaround. The program's behavior (or better stability) should not depend on arbitrary dialogs shown early enough at startup.

Torsten Lilge <ttl>
Group Member
Mon 29 Jul 2024 05:44:12 PM UTC, comment #9: 


comment #8:

> Showing the welcome wizard or not obviously trigger different paths in Qt- and/or Windows-libs.


Yes, that's obvious. That may be caused by using one or both libraries incorrectly. Error handling is often notoriously bad.

As the old story goes: If I go to the doctor and say "It hurts when I do this", he may just say "Stop doing that".

In Octave's case, it hurts when there is no Qt dialog displayed before switching sessions, so perhaps Octave should stop trying to switch sessions without first displaying a Qt dialog.

Since this is only a problem on Windows because Octave only switches Windows Sessions on Windows OS, the work-around dialog should only be displayed on Windows systems. It could be shown on all platforms for cross-platform compatibility.

I repeat, displaying a Qt dialog, any dialog, early in the startup process (as when the welcome wizard displays its dialogs) completely prevents the hangs in the Qt File Dialogs and the documentation tab (and likely other places that have not been discovered yet). After that, everything works as expected.


Dennis Cote <dennisc_hi>
Mon 29 Jul 2024 05:16:59 PM UTC, comment #8: 


comment #7:

> Both Qt and my system remain the exactly the same whether Octave executes the Welcome Wizard or not.


Showing the welcome wizard or not obviously trigger different paths in Qt- and/or Windows-libs.

Torsten Lilge <ttl>
Group Member
Mon 29 Jul 2024 04:17:22 PM UTC, comment #7: 


comment #6:

> But the problem might also be caused by Qt or by your system. Both issues show up where no Octave GUI code is directly involved (native file dialogs and Qt help system).


Both Qt and my system remain the exactly the same whether Octave executes the Welcome Wizard or not.

The problem occurs with the Qt based file dialogs, not the native file dialogs.

> We just do not know what exactly breaks during the code sequence where the hidden console in the terminal is prepared.


That is likely the problem. I have tracked the problem down to that area by having Octave display a dialog before that call, which prevents the hangs in all subsequent execution. If there are no Qt based dialogs displayed before that call then the Qt based file dialogs hang and the documentation system hangs. I think it will require someone to understand the purpose of that section of Octave's code to fix the problem. But ultimately this is Octave code making Windows OS calls.

I suspect there may be some interaction with Qt where Qt caches a handle to the original Windows Session which perhaps prevents it from being released even though Octave tries to switch to a new Windows Session. I think Qt may continue to use the original session through its cached handle. When the first dialog is displayed after the session switch, Qt seems to use the new session which sometimes fails.

The rapid increase in memory usage indicates that something gets stuck in a loop allocating memory, or perhaps it is in an infinite recursion allocating stack space.

> Btw, have you tried to set flag HIDDEN_CONSOLE in the terminal to false?


No, I haven't been able to spend time with local builds for a while. I have been trying to use the official 9.2.0 release. I try to remember to clear the welcome wizard flag by editing the GUI ini file before starting Octave to prevent these hangs.

I have also suggested a work-around which is to have Octave display a dialog (any Qt-based dialog will do) like a splash screen in the non welcome wizard path. This prevents all the hangs as far as I can tell.

Dennis Cote <dennisc_hi>
Mon 29 Jul 2024 03:45:48 PM UTC, comment #6: 

comment #5:

> ... My system may be unique in that it exposes the problem in Octave ...


Yes, this is one possible explanation. But the problem might also be caused by Qt or by your system. Both issues show up where no Octave GUI code is directly involved (native file dialogs and Qt help system).

We just do not know what exactly breaks during the code sequence where the hidden console in the terminal is prepared. Btw, have you tried to set flag HIDDEN_CONSOLE in the terminal to false?


Torsten Lilge <ttl>
Group Member
Mon 29 Jul 2024 01:52:47 PM UTC, comment #5: 


comment #1:

> I can only imaging that the documentation tab is also running into similar file navigation issues loading the file for the selected help page on your system.


The fact that displaying the Welcome Wizard (or any other Qt dialog) causes Octave to operate correctly on the same system indicates that the problem lies within Octave. The rest of the environment (computer, OS, graphics, file system, etc.) remains the same regardless of what Octave does. My system may be unique in that it exposes the problem in Octave, but all the hangs are prevented by displaying the Welcome Wizard, so the problematic behavior changes only with the change in Octave's execution.

Dennis Cote <dennisc_hi>
Mon 29 Jul 2024 01:40:26 PM UTC, comment #4: 


comment #3:

> @OP: how did you install Octave-9.2.0?


Using the Octave installer octave-9.2.0-w64-installer.exe from https://octave.org/download#ms-windows

Dennis Cote <dennisc_hi>
Sat 27 Jul 2024 08:42:40 PM UTC, comment #3: 

FWIW, I can't reproduce this either w. OCtave-9.2.0 (w64_64) on Windows 10.
@OP: how did you install Octave-9.2.0?

Philip Nienhuis <philipnienhuis>
Group Member
Fri 26 Jul 2024 09:20:08 PM UTC, comment #2: 


comment #1:

> can similar debugging of the offending system call be done as I think you had help when trying to track down that other issue? perhaps this is slightly different or highlights some in-common function call?


What I did with the other issue was track down the location where displaying a dialog (rather than the welcome wizard's dialogs) no longer prevented the hangs from happening. I am fairly certain this will occur at the same location, as described in the forum discussions, since it is all in the initialization of the Command Window. This all happens before any user interaction.


Dennis Cote <dennisc_hi>
Fri 26 Jul 2024 09:12:09 PM UTC, comment #1: 

i cannot recreate this issue on a similar setup, similar to how i can't recreate the other issue with the file browser.  I can only imaging that the documentation tab is also running into similar file navigation issues loading the file for the selected help page on your system.

can similar debugging of the offending system call be done as I think you had help when trying to track down that other issue? perhaps this is slightly different or highlights some in-common function call?

Nicholas Jankowski <nrjank>
Group Member
Fri 26 Jul 2024 08:41:28 PM UTC, original submission:  

I'm running Octave 9.2.0 GUI on Windows 10. I have the control (4.0.1) and signal (1.4.5) packages loaded from ~./octaverc.

If I click on the Documentation tab I see the Contents of the GNU Octave Manual. If I double-click on the heading for Chapter 31 Signal Processing in the left-hand list, the Octave GUI hangs and becomes Non-Responding (Windows adds the "Not Responding" text to the window's title bar). See the attached screenshot.

The memory usage of the Octave GUI starts climbing quite quickly. I captured two screenshots of the Windows task manager showing the memory usage about 5 seconds apart. See the attached screenshots which show that memory usage is increasing at about 100 MB/s.

I must click on the close box of the Octave GUI window to get a dialog where I can select to kill the program or wait for it to respond. I must kill the program before it exhausts all free memory on my PC to prevent many bad things from happening.

This behavior with the GUI becoming non-responsive and memory usage growing rapidly is very similar to the issue I have seen with the File Dialogs becoming non-responsive and memory usage growing. See the forum discussion discussing testing of that issue at https://octave.discourse.group/t/octave-9-1-file-dialogs-not-responding-on-windows-10/5413

In both cases, these issues are eliminated if the Octave GUI displays the Welcome Wizard (or any other dialogs early enough). I can force the Welcome Wizard to display its dialogs by editing the octave-gui.ini file and setting global_skip_welcome_wizard=false before starting Octave. In this case, the documentation for Signal Processing is displayed correctly, and in the other case, the File Dialogs work correctly and allow navigation.

Dennis Cote <dennisc_hi>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #56318:  GUI@memory@usage.png added by dennisc_hi (24KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by dennisc_hi (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-10-22 mmuetzel StatusNone Need Info
    2024-07-26 nrjank Carbon-Copy- Added ttl
    2024-07-26 dennisc_hi Attached File- Added GUI@Not@Responding.png, #56317
        Attached File- Added GUI@memory@usage.png, #56318
        Attached File- Added GUI@memory@usage@5@seconds@later.png, #56319

    Back to the top

    Powered by Savane 3.14-79a4.
    Corresponding source code