Hangs on quit almost solved!

Post bugreports for the Mac OSX version here
User avatar
Piero
Addict
Addict
Posts: 917
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Hangs on quit almost solved!

Post 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
Last edited by Piero on Fri Jul 04, 2025 4:23 am, edited 1 time in total.
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Hangs on quit almost solved!

Post 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.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Piero
Addict
Addict
Posts: 917
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: Hangs on quit almost solved!

Post 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!
User avatar
Piero
Addict
Addict
Posts: 917
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Update!

Post 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:
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Hangs on quit almost solved!

Post by mk-soft »

Because error not really found, but a patch found...

Show ReadME
Download PB-IDE v6.21 Patch 1: purebasic-ide OneDrive
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Hangs on quit almost solved!

Post 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:
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Piero
Addict
Addict
Posts: 917
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Too many hangs?

Post 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…
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Hangs on quit almost solved!

Post by mk-soft »

All too elaborate ...

You can also load the PureBasicIDE from GitHub and search for the error yourself in debug mode.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Piero
Addict
Addict
Posts: 917
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: Hangs on quit almost solved!

Post 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)
User avatar
Piero
Addict
Addict
Posts: 917
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Update

Post 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
Post Reply