IDE won't quit

Mac OSX specific forum
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

IDE won't quit

Post by WilliamL »

PB was acting odd so I restarted my computer and now every time I run PB I get 'A previous IDE session seems to have ended improperly. Do you want to open the session history to recover unsaved changes?' I say no and the code compiles and runs fine. When I go to quit PB it just hangs. I deleted the purebasic.plist file and it didn't help. In fact, when I ran PB again it appears that the plist file wasn't re-created and now I don't have any plist.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: IDE won't quit

Post by Fred »

Try looking for a .prefs file in your home/.purebasic folder. Plist file should not be deleted
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: IDE won't quit

Post by WilliamL »

Hi Fred,

I found an old plist file and put it back in my Preferences file. Oddly enough, it is PureBasic.0.plist that has the latest creation date*.

I found the .purebasic/purebasic.prefs file and put it in the trash and ran PB and all the settings were reset but I still couldn't quit the IDE. It said it couldn't save the pref (?) file and now I'm back in the cycle of force quitting.

Would re-installing the latest version of 6.12LTS clean things up? No, it didn't help. Still said it couldn't save prefs. and hangs.

I put the old prefs file back in so I can keep working on my project. I just have to force quit the IDE.

Oh, I just discovered if I use the Menu and select Quit it actually quits. The next run does not have the 'A previous.." message. Only using the short cut (cntrl+Q) does it hang... and now I have PureBasic.7.plist (as of this morning). I restarted my computer and got the 'A previous IDE session seems to have ended improperly' again and cntrl+Q still hangs.

Well, I have a work-around (using the Menu).

* (there is a .1 & .2 & .3 also) and now I have a .7. Which of these can be thrown away?
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: IDE won't quit

Post by WilliamL »

I'm wondering if Command Line Tools need to be upgraded to the latest version of 16 to work with Sequoia 15.0.1? I don't have XCode installed so I don't know an easy way to get which version of CLT I have.

No, I ran 'pkgutil --pkg-info=com.apple.pkg.CLTools_Executables' in Terminal and it said I was using 16.

So that's not the answer
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
User avatar
mk-soft
Always Here
Always Here
Posts: 6204
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: IDE won't quit

Post by mk-soft »

I still have CLT version 15.x

During the last major update, the Command Line Tools were automatically updated from v14 to v15.
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: 865
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: IDE won't quit

Post by Piero »

WilliamL wrote: Sat Oct 12, 2024 1:35 pmIt said it couldn't save the pref (?) file
Oh, I just discovered if I use the Menu and select Quit it actually quits. The next run does not have the 'A previous.." message.
Only using the short cut (cntrl+Q) does it hang...
1st of all (no sequoia here):
Are you on an admin user account?
Does PB have "full disk access" or similar?

I had similar problems testing IDE tools that needed to run /Applications/PureBasic.app/Contents/MacOS/PureBasic (with parameters): it caused a SECOND instance of PB to open, and then "A previous IDE session seems to have ended improperly…"

Also, it seems PB uses a "secondary/auxiliary process" for menu shortcuts, and maybe also when running some IDE tools (non-PB apps?)………
If I'm right, it may not have, e.g., the same perms of PB………
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: IDE won't quit

Post by WilliamL »

Piero,
Thanks for your comments. I don't really understand all of what you said but I go get the message that something is messed up on my end. I'm getting the 'A previous...'' message every time is start PB, after 'sleep' or 'restart' or 'force quit', and if I quit with the menu command it does not happen the next time I open PB. It still won't do the short cut quit.

It's odd that, after all this time, it just pops up. I have a habit of using the 'quit' short-cut...
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
User avatar
Piero
Addict
Addict
Posts: 865
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: IDE won't quit

Post by Piero »

WilliamL wrote: Sun Oct 13, 2024 5:32 pm I don't really understand all of what you said
System preferences:

"Allow user to administer this computer" (users & groups)

"Grant PB full disk access" (security & privacy -> full disk access)

PS: may not be exactly the same on sequoia…
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: IDE won't quit

Post by WilliamL »

Piero,

That's interesting. Under 'Full Disk Access' I only have PureBasic-604LTS (my naming for that version) and it's unchecked. So how do I get the newest version of PB to show up here in 'Full Disk Access'?

I'll check it and see if it makes any difference.

No, difference. I even ran PB-604LTS and it did all the same thing (problems).
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
User avatar
Piero
Addict
Addict
Posts: 865
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: IDE won't quit

Post by Piero »

WilliamL wrote: Sun Oct 13, 2024 6:01 pm Piero,

That's interesting. Under 'Full Disk Access' I only have PureBasic-604LTS (my naming for that version) and it's unchecked. So how do I get the newest version of PB to show up here in 'Full Disk Access'?

I'll check it and see if it makes any difference.

No, difference. I even ran PB-604LTS and it did all the same thing (problems).
I just wanted you to test if that solved; it seems a PB bug (IMHO probably caused by the "things you don't really understand" ;) )

PS: I don't have the time to explain all about calling/monitoring/… a "standards-compliant?" process on mac, so I just hope Fred & C understand what I mean, if I'm right, or at least that it can help them spot the "cause of the bug"………………
User avatar
Piero
Addict
Addict
Posts: 865
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: IDE won't quit

Post by Piero »

Edited:

applescript apps as IDE tools seem to make PB IDE "lose focus" sometimes (needs a call to regain source focus after running ide tools?)

if I call "unix stuff" directly, PB acts weird if I use some quoting (directly on IDE tool parameters)
I had to make an intermediate PB app (using my "simpleShell" procedure) to make things more manageable…
Last edited by Piero on Tue Oct 15, 2024 5:20 pm, edited 1 time in total.
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: IDE won't quit

Post by WilliamL »

Since I'm on a new system (Sequoia) and new Command Line Tools (16) I'm wondering if there is a small problem with the 'short-cut'. Maybe something changed in CLT and short-cuts. It seems that everything is happening because of the short-cut, like it isn't giving PB a chance to save the pref (or whatever). Actually, PB may be frozen trying to save the preferences.

Not something I can do anything about but report it. Maybe this thread should be moved to bugs?
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
User avatar
Piero
Addict
Addict
Posts: 865
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: IDE won't quit

Post by Piero »

WilliamL wrote: Tue Oct 15, 2024 5:11 pmbugs?
Did you try to check PB prefs permissions (⌘I)? Are them weird?
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: IDE won't quit

Post by WilliamL »

Info for PB
vering2 (Me) Read & Write
admin Read Only
everyone Read Only

Info for .prefs file
vering2 (Me) Read& Write
staff Read only
everyone Read only

Settings are the same for PB 6.04 I tried earlier.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: IDE won't quit

Post by WilliamL »

Ok, it finally occured to me to look in the IDE Bugs and found a link that I thought applied to my problem. https://www.purebasic.fr/english/viewtopic.php?t=84373 I saw Fred's comment to 'Could you try to deactivate session history to see if it's the root cause ?' and I didn't know you could do that. So I got into Setting and deactivated 'Session History' and tried it and it didn't stop the freezes when I used the Quit shortcut (quits fine using the Menu).

That doesn't seem to be the answer to my problem.

[added 2/4/25]

The Quit short-cut seems to be working sometimes but I can't figure out when it will work. When it hangs it seems to be trying to save the pref(?) during the quit process.

Although it appears that I am the only one with this problem, I'm wondering if this thread should be moved to the IDE Bugs forum?

[added 4/1/25]
Using 15.4 now (and updated CLT) and still having the same problem. I haven't been able to 'Quit' with the 'cmd+Q' for a while now.
Last edited by WilliamL on Tue Apr 01, 2025 6:01 pm, edited 4 times in total.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
Post Reply