Compilation "App" Failed

Suddenly running the newest version, I get the compilation failed. It’s doing this because the previously created debug file is still there. It was in the home folder of the app.

It used to put the build version in it’s own folder but I can’t seem to find that option.

Anybody know whats causing this?

Thanks

Hi Richard,

I posted bellow content in few other places on forum as well already.

Try it and it maybe will helps you.


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.

I don’t see anywhere you can designate a build folder?

Xojo is using beside app folder where your project is, another temp folder.

By default is set to be a system, xojo, temporary ones but when you change it as I already described then you will solve the issue.

In my case it works well and I don’t have such a problem anymore.

In your account home folder create some folder e.g. temp where you have full access and then set build unsaved apps in to that location. Restart your mac and give a try.

Here you go screen shot in steps.

Hope it will helps you. Also you can try before this, just to rename a main xojo project filename to something different e.g. simple add 1 on end of filename before file extension, and then load it in Xojo. For this also Xojo shouldn’t be started and if it, quit from it before doing this. This is short term solution. Other, first one, in my case is finale solution which do a job and it’s solving problems with it on my end.

Screenshot link

That is under Building, This happens when I try to run the app in the debugger.

There used to be a folder under the apps folder that the debug was built in.

Just try it mate…

<https://xojo.com/issue/49147>

Can’t seem to login to feedback.

Richard you can try my way how it’s helped me till updates don’t come.

Regarding to feedback app try to get last version of app from Xojo web site.

For this case, Norman is pointing that is bug which is solved this days (I think yesterday).

I did try what you said. Seemed to work.

I’m glade your solved it Richard.

Cheers!

I’m seeing this same issue after upgrading to High Sierra. First run works (Xojo creates the MyApp.Debug.app binary), second debug run fails with “Compilation of “MyApp” failed.”, “A file system error occured (#104) …” - It can’t delete the debug run file.

Based on other posts here on the forum I added this to a build script before the Build stage and it works for me:

[code]dim mAppPath as string

mAppPath = “~/FullPathToProject/MyApp.debug.app”

Call DoShellCommand("rm -R " + mAppPath)[/code]

Where do I find the build script?

Code

This script doesn’t seem to work for me. Anyone else have luck?

PS - Don’t accidentally type

mAppPath = "~/FullPathToProject/"

It does bad things. :stuck_out_tongue:

Always be careful when there’s a command deleting files, of course.

The reader should change the mAppPath string to the full path of where their debug app resides.

Always be carefull when Coding anyway, or? ;)[quote=354140:@Stephen Dodd]This script doesn’t seem to work for me. Anyone else have luck?[/quote]

And, this?

[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]

Taken from the Link posted below the GIF.

theCommand = "rm -rf " + ProjectPath + appNameForShell theResult = DoShellCommand(theCommand)
These need to be dimmed

Do you mean like

[code]'get path and app name
Dim appNameForShell As String = PropertyValue(“App.OfficeTime”) + “.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
Dim theCommand, theResult as String
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]

Still seems to fail to delete the debug app…

Looks like this code fixes the problem

Dim mAppPath As String mAppPath = ProjectShellPath mAppPath = Replace(mAppPath,"YOURAPPNAME.xojo_project", "YOURAPPNAME.debug.app") //Print(mAppPath) Call DoShellCommand("rm -R " + mAppPath)