Problem with High Sierra and debug

Debug app is not deleted after quitting run. I must manually delete the the debug app before run or I get a error message ‘Compliation … failed’

rm the d.a.m.n. thing away:

[code]'get path and app name
dim appNameForShell as string = PropertyValue(“App.MacOSXAppName”) + “.debug.app”
appNameForShell = getShellString(appNameForShell)
dim CountSlashes as Integer = CountFields(ProjectShellPath, “/”)
dim ProjectName as string = NthField(ProjectShellPath, “/”, CountSlashes)
dim ProjectPath as String = Left(ProjectShellPath, Len(ProjectShellPath) - Len(ProjectName))

'delete app
theCommand = "rm -rf " + ProjectPath + appNameForShell
theResult = DoShellCommand(theCommand)
if theResult <> “” then print theResult

function getShellString(theString as String) as string
Return ReplaceAll(theString, " ", "\ ")
end Function[/code]

I suspect that this bug is also the reason why quitting in debug mode takes so long on High Sierra.

Got the same problem here since upgrading to High Sierra. Unfortunately deleting the debug file does not always help – compilation often fails even though I removed the debug file. Then I have to reboot the machine, compilation will work two or three times and then the game begins again. That makes developing an app quite annoying…

@Jens Knipp: your problem clearly is a different problem. But I would say that nobody else has this issue or it would have been discussed earlier. Did you do the usual troubleshooting like clearing the cache or tried with a different user on the same computer?

Yes, I cleared the cache. But I don’t have a different user account on my Mac (and never needed one) …

I’m surprised there are not more comments about this here. It’s fairly annoying as I have to remember (and often forget) to delete the debug app before running and I also need to delete the Builds folder before building.

I would appreciate clear instructions as to how to implement this in code: " to delete the debug app before running and I also need to delete the Builds folder before building."
Thank you
Phil

A couple of days ago I posted - again - my build script for rm-ing the app into the ether.

[quote=352079:@Philip Cumpston]I would appreciate clear instructions as to how to implement this in code: " to delete the debug app before running and I also need to delete the Builds folder before building."
Thank you
Phil[/quote]

Add a new Xojo Skript to the project and paste the above Code. Make sure the Skript runs for Debug Runs only and it runs BEFORE the Build Step.

The only issue I experience is that when I used Xojo running macOS10.13, my MBP shutdown very slowly (black screen with a small waiting wheel). Sometimes it takes a minute.
When I do not launch Xojo, my system shuts down in 1-2 secs.
Could be related with the caches (already tried to delete the cache myself - which doesn’t help).

Maybe this will helps since on my end works well and till know no more this kind of issues.

This issue is common and for High Sierra and Sierra as well. On Sierra even restarting a Mac doesn’t helps but renaming a project filename does.

Best way to handle it so far with what I got is:

In Xojo,in debug settings part select folder location to be some temp folder under your account home folder where your account have full access where Xojo will put temp files.

e.g. …/yourusername/temp/

Restart Xojo and give a try.

Updates:
Screen shot to solve this:
Screen shot

feedback://showreport?report_id=49147

Thanks to Greg O’Lone

This removes the Builds if you need to in order to create new ones, but must be run in DEBUG script
// KillBuilds script

// Get the path of the project and strip off the project name

Dim projectPath as String = ProjectShellPath
// replace any “/” with empty string to fix path
projectPath = Replace(projectPath,"","")
'print projectPath
dim pa() as string = split(projectPath,"/")

// now remove the last item (Project name), leaving the project folder items as an array
pa.Remove(UBound(pa))
// Now create a string which holds the project folder
dim projectFolder as String = join(pa,"/")
'print projectFolder

Dim appPath As String = ProjectFolder + “/”“Builds - HH.xojo_project”""
Dim cmd As String = "rm -Rf " + AppPath
'print appPAth
'print cmd
Call DoShellCommand(cmd)

I found it is a problem with overwriting application icon when rebuilding debug app. When you delete application icon from your project - the bug is not triggered. You can add application icon just prior building final application. I guess applications’ icons are “in use” by High Sierra and that’s why Xojo cannot delete it during rebuilding debug app (and that’s why restarting High Sierra helps…)

Thanks for the feedback. I had a suspicion the icon might be a problem but didn’t get around to trying that out.