Page 1 of 1

Hangs on quit almost solved!

Posted: Thu Jul 03, 2025 10:07 pm
by Piero
I closed all tabs, click-closed PB window (to be sure to quit properly) and voila'!
Now always quits properly (after """reopening""" files, when using ⌘Q etc.)!!!

Note: STILL HANGS if I close all tabs and then use ⌘Q !!! (621 sequoia)
Please also read posts below!

If you often keep many tabs open, see viewtopic.php?t=86769

Re: Hangs on quit almost solved!

Posted: Thu Jul 03, 2025 10:59 pm
by mk-soft
PB v6.21 und macOS Sequoia 15.5

If no files are open and only one or more empty tabs are open, the IDE crashes when quitting with the keyboard.

Re: Hangs on quit almost solved!

Posted: Fri Jul 04, 2025 3:05 am
by Piero
Weird… here it also hangs if I close all tabs and open a file that's NOT in the source directory, even if I try to quit closing the window!

If the "1st opened" file is in the source directory (top level) and I keep it open, then I can open files from anywhere without quit problems!

Update!

Posted: Fri Jul 04, 2025 2:32 pm
by Piero
It happened again (sometimes restarting Mac helped… but later hangs came back………)

So ( :x ): I assigned ⌘Q to Quit on PB prefs/shortcuts (it was empty)

Now ⌘Q does nothing :shock: but closing the window and quitting via menu always work…
…at least for now… :lol:

Re: Hangs on quit almost solved!

Posted: Sat Jul 05, 2025 12:52 am
by mk-soft
Because error not really found, but a patch found...

Show ReadME
Download PB-IDE v6.21 Patch 1: purebasic-ide OneDrive

Re: Hangs on quit almost solved!

Posted: Sat Jul 05, 2025 9:47 am
by mk-soft
One more small adjustment patch 2
From the logic, the error should not occur. Guess it's because of the external scintilla library callback when the parent window is closed.

Only for macOS Intel ...
Download: OneDrive purebasic-ide

Create pull request on GitHub :wink:

Too many hangs?

Posted: Sat Jul 05, 2025 3:14 pm
by Piero
mk-soft wrote: Sat Jul 05, 2025 9:47 ammacOS
It seems it's the "1st opened" of the current files that counts, and that files can get """corrupted"""
I guess PB sometimes "marks" them (on file beginning?) in a way that makes them """behave like a new empty file""" on quit………
It must also have to do with the menu-shortcut-windowClose-quit events management; probably PB "hijacks" the """default OS ⌘Q""" improperly, sometimes causing "event chaos": I tried assigning ⌃Q (ctrl-Q) and it STOPPED WORKING very soon………

If you did a lot of testing like me, better clean PB hang logs into /Library/Logs/DiagnosticReports and
run Disk Utility's First Aid AT LEAST TWICE IF IT FINDS SOMETHING (use/read "show details", even if it says it's OK when finished)
Pay special attention to the Data volume report (see below if you cannot find it)

If warnings (or errors) don't get fixed:
Boot into Recovery Mode
Open Disk Utility
From the menu, select View -> Show All Devices
In the side bar, unhide all clicking the little ">"s and select the Data volume
Run First Aid
Once finished, run First Aid on the other Volumes, then their parent Container, and then the Disk itself
Run First Aid again on the user data volume to check if the warning persists

I had just a warning, and I think/hope the hangs/bug do not cause bad file corruption, but sometimes a mac restart did help for *SOME* files, probably because they were left as "busy" on force quit: another thing to consider for debugging…

Re: Hangs on quit almost solved!

Posted: Sat Jul 05, 2025 5:17 pm
by mk-soft
All too elaborate ...

You can also load the PureBasicIDE from GitHub and search for the error yourself in debug mode.

Re: Hangs on quit almost solved!

Posted: Sat Jul 05, 2025 5:57 pm
by Piero
mk-soft wrote: Sat Jul 05, 2025 5:17 pm All too elaborate ...

You can also load the PureBasicIDE from GitHub and search for the error yourself in debug mode.
I understand you, but IF I'm right, this is a nasty bug that causes a cascade of bad consequences, making debug hard:
⌘Q —> """corrupted""" files —> IDE problems……
…and really fixing all this kind of problems MAY require a big revision of the Mac IDE (weird example: ⌘V does not work on PB save dialogs)

Update

Posted: Sat Jul 12, 2025 3:02 pm
by Piero
I noticed some other things I hope will be useful:

"Quit (PureBasic)" and "Preferences (Settings…)" seem to be on "File" menu when you assign a shortcut, but they are not…
Maybe that's why you cannot assign a (different) shortcut to them and/or weird things may happen…

Also:
I have ⌘H assigned to "Edit/Replace…"
I see "⌘H" in MENU "PureBasic/Hide PureBasic", but NOT in "Edit/Replace…"
If I use ⌘H, after closing the replace dialog, I see "⌘H" in "Edit/Replace…"
After Quitting and Reopening PB, IT HAPPENS AGAIN!
If I remove "⌘H" in preferences, it just hides PB as supposed…
Reminder (already reported): I see ⌥/ as ⌥D (US keyboard, on MENU) but it works and it's shown as "alt-divide" on prefs