bugGNU Octave - Bugs: bug #62352, Octave GUI crashes immediatley...

 
 

bug #62352: Octave GUI crashes immediatley after loading

Submitter:  None
Submitted:  Fri 22 Apr 2022 01:09:14 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Need Info Assigned to:  None
Originator Name:  Tiago Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 01 Mar 2023 10:04:27 PM UTC, comment #41: 

@Nicholas I tried creating an exception twice with avast. I tried doing both just the GUI and the whole folder neither worked. Even after following the steps for an advanced exception. Octave did not open until I completely uninstalled avast from my computer. After working on Octave I downloaded avast back onto my computer to see if octave would act up again and the white screen issue returned.

Charles Kirkland III <thatguycarlo>
Wed 01 Mar 2023 11:49:10 AM UTC, comment #40: 

@Charles - when you tried creating an exception, did you just do so for the primary executable or did you try to except.the entire octave folder? Assuming you followed steps like those written at https://support.avast.com/en-us/article/antivirus-scan-exclusions/#android,  did you try any of the "advanced" options?

Nicholas Jankowski <nrjank>
Group Member
Wed 01 Mar 2023 06:29:30 AM UTC, comment #39: 

Thank you for your help <nrjank> and <mmuetzel> unfortunately after creating an exception on avast nothing changed but after following the prompts on the forum link posted uninstalling avast completely has solved the problem. Thanks again

Charles Kirkland III <thatguycarlo>
Wed 01 Mar 2023 06:21:03 AM UTC, comment #38: 

If it is just closing after a few seconds, I don't see how it could be related to plotting.
The Avast issue didn't look like some file was flagged. It more looked like Avast inserted itself in the library loading and messed things up...

Markus Mützel <mmuetzel>
Group administrator
Wed 01 Mar 2023 06:00:16 AM UTC, comment #37: 

the user on the linked discourse conversation supposedly did disable AV without success and it wasn't until uninstalling that the problem went away. Additionally, as avast was previously marking octave as 'clear', it would be useful to find out if there is an executable or library specifically getting flagged, and that didn't come out of that conversation. it took months of whitelisting requests to get 7.2.0 cleared by most AVs.

secondly, from the user's crosspost at bug #63809, it seems he's actually getting a segfault. doesn't that make the graphics issues a more likely culprit?

Nicholas Jankowski <nrjank>
Group Member
Wed 01 Mar 2023 05:51:30 AM UTC, comment #36: 

@Nik: I'm not sure if making affected users jump through the hoops of using gdb and consorts if the alternative test is the same as the potential solution: Exclude Octave from the antivirus/malware scanner.

Markus Mützel <mmuetzel>
Group administrator
Wed 01 Mar 2023 05:22:24 AM UTC, comment #35: 

see the following discussion for troubleshooting steps and how that one identified Avast Antivirus as being the issue:
https://octave.discourse.group/t/octave-gui-crashes-when-i-tried-to-open-it/4016

recommend continuing any discussion/troubleshooting over on that forum. it would be useful to know if any similar troubleshooting would produce similar results on your system.

Nicholas Jankowski <nrjank>
Group Member
Wed 01 Mar 2023 05:07:12 AM UTC, comment #34: 

Try to exclude Octave's installation folder from your antivirus scanner.

Markus Mützel <mmuetzel>
Group administrator
Wed 01 Mar 2023 04:54:23 AM UTC, comment #33: 

Hi, I have Octave 7.3.0 and I am having the same problem octave worked before, and now no matter how many times I uninstall and reinstall or no matter how many times I delete the octave-gui.ini file Octave still opens as a white screen and then closes after a few seconds.

Charles Kirkland III <thatguycarlo>
Mon 17 Oct 2022 06:27:27 AM UTC, comment #32: 

We have been receiving reports like this one for a while now. The underlying issue probably needs more investigation.
While it would be nice to find out what causes these corrupt settings files and find a way to avoid that corruption, I don't think we should block Octave 7.3 on this now.

Moving release target to "dev".

Markus Mützel <mmuetzel>
Group administrator
Mon 05 Sep 2022 01:46:59 PM UTC, comment #31: 

I grafted those changes to the release branch of MXE Octave:
https://hg.octave.org/mxe-octave/rev/d5e6775fb3bc
https://hg.octave.org/mxe-octave/rev/10d35dbdf84b

This will probably help to recover from those crashes.
Ideally, we could somehow determine what is corrupting the configuration file, so these crashes won't happen in the first place.

Markus Mützel <mmuetzel>
Group administrator
Sun 04 Sep 2022 02:32:23 PM UTC, comment #30: 

I pushed an additional change to check version numbers rather than assume the regenum returns in version order

I dont have 8 installed but it doesnt seem to have broken the versioning for what I do have at least.

John Donoghue <lostbard>
Group Member
Sun 04 Sep 2022 12:56:00 PM UTC, comment #29: 

I tried a pkg install from a local build I did last night and it appeared to work ok for me. I'll have to try build bot one

John Donoghue <lostbard>
Group Member
Sun 04 Sep 2022 12:27:47 PM UTC, comment #28: 

It should be fine to apply those changes to release.

John Donoghue <lostbard>
Group Member
Sun 04 Sep 2022 12:24:23 PM UTC, comment #27: 

OT: Installing a package with, e.g., `pkg install -forge io` currently fails for me (with that build from the default branch of MXE Octave). I have to download the tarball and install from it locally.
Maybe a broken SSL or curl?

Markus Mützel <mmuetzel>
Group administrator
Sun 04 Sep 2022 12:20:03 PM UTC, comment #26: 

I tested again with the installer from Kai's buildbots from today:
https://www.octave.space/data/stable/414/octave-2022-09-04-00-11-default-w64-installer.exe

With it, the settings and packages are successfully removed on uninstall. 👍
I tested both with an installation for all users and for the local user.

While that doesn't fix the underlying issue, it would most probably help users to recover from a situation where only manually deleting files helps currently.

Would it make sense to cherry-pick these two changes to the release branch of MXE Octave? Or are there risks in doing so?

Markus Mützel <mmuetzel>
Group administrator
Sat 03 Sep 2022 11:55:28 PM UTC, comment #25: 

@philipnienhuis

Looking at the code again for working out the latest version, I am betting its actually getting the last installed version rather than the largest version.

I'm basing on the guess that the EnumRegKey call is getting in order inserted to the registry rather than actual sorted string order.

AT the time it looked like it was in sorted order, but I had probally installed in order so it just happened to be the same.

I'll look at adding an actual numeric compare for the version.

John Donoghue <lostbard>
Group Member
Sat 03 Sep 2022 11:45:13 PM UTC, comment #24: 

It seems to matter from what I could tell - I pushed some additional changes that should help

John Donoghue <lostbard>
Group Member
Sat 03 Sep 2022 07:51:05 PM UTC, comment #23: 

Maybe related to comment #17:

I also have several Octave versions / releases installed next to each other. What I more or less consistently find is that when I install e.g., a dev version (using nsis-installer), the new desktop shortcut points to the latest stable release (7.2.0) instead of 8.0.0. I always have to fix that manually.
I noted the code searching for other Octave installations in <mxe-octave>/tools/make_install_script.sh (-.in), I suppose there's some not-yet-perfect stuff there, but I never bothered to investigate.

In <mxe-octave>/tools/make_install_script.sh (-.in) I have commented out most of the commands that write to the windows registry (so my dev versions won't interfere with stable releases).
But the above observation was already made long before those adaptations; IIRC already with 5.x.x.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 02 Sep 2022 05:07:10 PM UTC, comment #22: 

In case that should matter: The user that I was logged in as for the test is member of the Administrators group.
I was asked to elevate the privileges for the install and uninstall process (which I confirmed). But I didn't install as a different user.

Markus Mützel <mmuetzel>
Group administrator
Fri 02 Sep 2022 04:48:22 PM UTC, comment #21: 

Ill try adding a display of profile folder to the page and run again on computer to see if thats the case

John Donoghue <lostbard>
Group Member
Fri 02 Sep 2022 04:44:06 PM UTC, comment #20: 

ok - i had tested local, not install for all - my guess will be its removing from admin user profile at that point rather than the user running the unistall

John Donoghue <lostbard>
Group Member
Fri 02 Sep 2022 03:21:30 PM UTC, comment #19: 

I let it install for all users and left most of the other options on their defaults (e.g., installation into `C:\Program Files\GNU Octave\...`).
The only options that I changed was to not install the desktop icon and to not register the .m file extension.

IIUC, the config file is installed at `%APPDATA%\octave\octave-gui.ini`. That resolves to `C:\Users\Markus\AppData\Roaming\octave\octave-gui.ini` for me.

I also tried to restart after uninstalling (in case the deletion was delayed for some reason). But that didn't make a difference.

Markus Mützel <mmuetzel>
Group administrator
Fri 02 Sep 2022 03:07:07 PM UTC, comment #18: 

When installing was it installed as local user or admin ?

I beleive the app dir changes depending on which.

For local APPDATA is user\appdata\roaming

The only thing it should do in terms of other installs is if the file is currently opened or loaded, then it wont be able to delete it, so will silently leave it.

I could add a field showing where its attempting to delete the fields from, but I dont think it can log anything currently

John Donoghue <lostbard>
Group Member
Fri 02 Sep 2022 02:32:36 PM UTC, comment #17: 

I downloaded and installed today's nightly build from Kai's buildbot:
https://www.octave.space/data/stable/413/octave-2022-09-02-00-10-default-w64-installer.exe

After that I ran the test suite (all fine btw) and installed the io package.

When uninstalling, the page appears like you described it.
I additionally selected the checkbox in front of "Remove user settings" (so both check boxes are selected) before clicking "Uninstall".
I expected that this would remove (at least) the "octave-gui.ini" from `%APPDATA/octave`. But that doesn't seem to happen.
I also expected that the folder `%APPDATA%/octave/api-v57+` would be purged. But that didn't happen either.

I have several different versions of Octave installed (including 7.2.0). IIUC, at least version 7.2.0 is sharing that configuration file with version 7.2.1 that I installed for this test.
No Octave was running while I uninstalled version 7.2.1.
Does the installer somehow detect that other Octave versions are installed and "spare" the files in this case? Did I do something wrong?

Are there any logs that might help in debugging?

Markus Mützel <mmuetzel>
Group administrator
Wed 31 Aug 2022 12:13:40 PM UTC, comment #16: 

I pushed up https://hg.octave.org/mxe-octave/rev/8fe292548edf
to default which adds options to delete the local packages (selected by default) and local settings (not selected)

John Donoghue <lostbard>
Group Member
Mon 29 Aug 2022 08:47:58 PM UTC, comment #15: 

I'll take a look - but yeah, we should be able to add something

Should the settings be per octave version to help with potential changes between versions from messing things up ?


John Donoghue <lostbard>
Group Member
Mon 29 Aug 2022 02:30:16 PM UTC, comment #14: 

CC'ing lostbard: Would it be possible to add an option to the uninstaller to remove the configuration file(s)?
That option should probably be de-activated by default. But it could help users that experience issues because of a problematic .ini file.

Markus Mützel <mmuetzel>
Group administrator
Mon 29 Aug 2022 12:54:09 PM UTC, comment #13: 

Hi all, the real bad thing is that even uninstalling and reinstalling Octave won't fix the issue, because the .ini file will stay in your AppData folder. This can cost the user valuable time before finding this bug report.

Anonymous
Mon 13 Jun 2022 09:06:01 PM UTC, comment #12: 

Whoops, I seem to have confused the attachment comment field with the general comment field.




I have attached the working and non-working versions of octave-gui.ini so you can reproduce or diff the and see what the issue could possibly be. I took them from a friend's installation on Windows 10 where Octave would crash just like this issue describes.

seerlite
Thu 19 May 2022 05:17:55 PM UTC, comment #11: 

Is there an ini file after you have been running the version from octave? If not, could you open the preferences dialog, close it by "OK" and check again if there is an ini file?

If yes, try to reinstall the "normal" octave version and see if it normally starts with the existing ini file.

Torsten Lilge <ttl>
Group Member
Thu 19 May 2022 07:09:23 AM UTC, comment #10: 

Yes, deleting the ini file from its location somewhere in appdata/roaming causes the welcome wizard to reappear (rather, the wizard where 'Hi, we noticed it's your first time using GUI on this device!') BUT after 'successful' setup, the main window does not appear, but the welcome wizard appears again. the process repeats.

for now i've managed to finally run octave by 1) deleting the .ini file 2) renaming the octave directory 3) uninstalling again 4) reinstalling but this time through a packet manager (winget)

it doesn't seem to be a fully functioning octave however, as my supposedly-working-perfectly files provided by my lectures are showing errors left and right, plus heavy lagging

Anonymous
Mon 09 May 2022 07:35:12 PM UTC, comment #9: 

Reply to comment #8:

If I understand correctly, deleting the ini file results in Octave's welcome wizard at next start. Does the main window appear after the welcome wizard or does Octave quits even without showing the main window? From which location have you removed the ini-file?

Torsten Lilge <ttl>
Group Member
Mon 09 May 2022 03:44:19 AM UTC, comment #8: 

original submission:

> Hello,
> I downloaded octave from your website and the first time i have installed octave GUI it worked. Then i closed it, when i went to open it for the second time it never opened again. The screen gets all white for some seconds and then it returnes to the desktop. since then i have uninstalled and installed octave GUI countless times to try to fix it but it never worked again in my computer. I have also tried to install another versions of octave but none worked.
> I have a windows 10 x64 home operating system version 21H1.
>
>


Hello, I have also recently been facing the same problem. I have just tried to delete .ini file, but while GUI treats it as a fresh install, a new .ini file does not appear. I also have referred to bug #56795 for solutions but none have seemed to work. I tried installing through package managers (winget) also but to no avail.

Anonymous
Thu 28 Apr 2022 03:03:45 PM UTC, comment #7: 

I was wondering - what series of events acuatlly happen when the ini file is not found? We've examined ini files that were 'causing' crashes before (assumed because deleting the file allows the gui to open again), but haven't seen anything obviously wrong with those files.

is it possible there's something else wrong/changed, but deleting the ini file causes a corrected to that change even if the ini wasn't the problem? I noticed on the next startup octave acts as if it's a new install and opens the first start wizard.  does that do anything else that could actually be the corrective action?

Nicholas Jankowski <nrjank>
Group Member
Thu 28 Apr 2022 01:00:53 PM UTC, comment #6: 

Another possibility is to change Octave's exit code so that it attempts to record some status about a crash and then on startup to present some options at startup depending on whether a previous session crashed.  That could all be done within the GUI prior to loading the resources file.

John W. Eaton <jwe>
Group administrator
Thu 28 Apr 2022 12:52:02 PM UTC, comment #5: 

Hah, yes i was also wondering about the CLI. A “restore gui to defaults” command that just deletes the ini. Is there a location for such platform specific M files? Or would it be cross platform form?

Nicholas Jankowski <nrjank>
Group Member
Thu 28 Apr 2022 06:05:09 AM UTC, comment #4: 

Oh yes, this was a genius idea: "If you are not able to start octave, just start octave and use the menu entry to remove the ini file". But maybe we can provide a function which can be called from the cli version.

Torsten Lilge <ttl>
Group Member
Wed 27 Apr 2022 07:15:42 PM UTC, comment #3: 

since the issue usually prevents loading of the gui, I'm not sure how that option would be executed to help the issue? or do you mean Windows Start menu entry?

Nicholas Jankowski <nrjank>
Group Member
Wed 27 Apr 2022 07:05:52 PM UTC, comment #2: 

OT regarding this specific bug, but would it be helpful to add an emergency menu entry which backups and removes the current ini file and restarts Octave?

Torsten Lilge <ttl>
Group Member
Fri 22 Apr 2022 02:17:46 PM UTC, comment #1: 

this has happened on occasion and it is not yet clear what is the exact cause or conflict. Since you said it worked previously, it may be some conflicting setting in the octave-gui.ini file. This file can persist even with uninstall/reinstall, so not surprising that alone didn't fix it.

Many people (including myslef) have found that deleting this file, forcing octave to rebuild a new file from defaults, allows octave to run normally again.

Please try the following and see if it works for you:

The octave-gui.ini file is located in:

C:\Users\<USERNAME>\AppData\Roaming\octave

where <USERNAME> is replaced by the name of your user profile.  The AppData folder is usually hidden, and not visible unless you've changed that visibility setting in windows.

The easiest way to navigate there is to open a Windows Explorer window (shortcut WindowsKey-E), and in the address bar click and type in %APPDATA%.  This should take you to the AppData or AppData/Roaming folder in your profile.  Find the octave folder, and the octave-gui.ini file should be in there.  Deleting this file, octave will treat the next launch as a fresh install.

Please let us know if that helps.  If you want, you can upload the ini file here as an attachment, although to date we haven't found anything in the ini files to explain why this problem is occurring on some windows systems.

if the problem persists even after clearing that file, please let us know.

Nicholas Jankowski <nrjank>
Group Member
Fri 22 Apr 2022 01:09:14 PM UTC, original submission:  

Hello,
I downloaded octave from your website and the first time i have installed octave GUI it worked. Then i closed it, when i went to open it for the second time it never opened again. The screen gets all white for some seconds and then it returnes to the desktop. since then i have uninstalled and installed octave GUI countless times to try to fix it but it never worked again in my computer. I have also tried to install another versions of octave but none worked.
I have a windows 10 x64 home operating system version 21H1.


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53296:  nonworking-octave-gui.ini added by seerlite (7KiB - application/octet-stream - I have attached the working and non-working versions of octave-gui.ini so you can reproduce or diff the and see what the issue could possibly be. I took them from a friend's installation on Windows 10 where Octave would crash just like this issue says.)
file #53297:  working-octave-gui.ini added by seerlite (4KiB - application/octet-stream - I have attached the working and non-working versions of octave-gui.ini so you can reproduce or diff the and see what the issue could possibly be. I took them from a friend's installation on Windows 10 where Octave would crash just like this issue says.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by thatguycarlo (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by mmuetzel
  • -email is unavailable- added by seerlite (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by None (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-17 mmuetzel Release7.2.0 dev
    2022-09-02 mmuetzel Release7.1.0 7.2.0
    2022-08-29 mmuetzel Carbon-Copy- Added lostbard
    2022-06-13 seerlite Attached File- Added nonworking-octave-gui.ini, #53296
        Attached File- Added working-octave-gui.ini, #53297
    2022-05-28 ineiev Carbon-CopyRemoved 0 -
    2022-04-22 nrjank CategoryNone GUI
        StatusNone Need Info
        SummaryOctave doesn't work Octave GUI crashes immediatley after loading

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code