Compilation "App" Failed

  1. ‹ Older
  2. 2 weeks ago

    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.

    -image-

    Screenshot link

  3. Richard A

    Oct 6 Pre-Release Testers, Xojo Pro

    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.

  4. Just try it mate...

  5. Norman P

    Oct 6 Xojo Inc

    Feedback Case #49147

  6. Richard A

    Oct 6 Pre-Release Testers, Xojo Pro

    Can't seem to login to feedback.

  7. 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).

  8. Richard A

    Oct 6 Pre-Release Testers, Xojo Pro Answer
    Edited 2 weeks ago by Richard A

    I did try what you said. Seemed to work.

  9. I'm glade your solved it Richard.

    Cheers!

  10. Justin E

    Oct 10 Pre-Release Testers, Xojo Pro State College, PA

    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:

    dim mAppPath as string
    
    mAppPath = "~/FullPathToProject/MyApp.debug.app"
    
    Call DoShellCommand("rm -R " + mAppPath)
  11. Richard A

    Oct 11 Pre-Release Testers, Xojo Pro

    Where do I find the build script?

  12. Sascha S

    Oct 11 Pre-Release Testers, Xojo Pro Germany/W'haven
    Edited 2 weeks ago by Sascha S

    -image-

    Code

  13. last week

    Stephen D

    Oct 13 Pre-Release Testers

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

    PS - Don't accidentally type

    mAppPath = "~/FullPathToProject/"

    It does bad things. :P

  14. Justin E

    Oct 13 Pre-Release Testers, Xojo Pro State College, PA

    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.

  15. Sascha S

    Oct 13 Pre-Release Testers, Xojo Pro Germany/W'haven

    Always be carefull when Coding anyway, or? ;)

    @Stephen D This script doesn't seem to work for me. Anyone else have luck?

    And, this?

    '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

    Taken from the Link posted below the GIF.

  16. Scott G

    Oct 13 Pre-Release Testers, Xojo Pro
    theCommand = "rm -rf " + ProjectPath + appNameForShell
    theResult = DoShellCommand(theCommand)

    These need to be dimmed

  17. Stephen D

    Oct 15 Pre-Release Testers

    Do you mean like

    '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

    Still seems to fail to delete the debug app...

  18. 6 days ago

    Stephen D

    Oct 18 Pre-Release Testers

    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)
  19. 4 days ago

    Philip C

    Oct 19 Pre-Release Testers, Xojo Pro Cooroy, QLD, Australia

    Stephen
    I found the same problem
    I replaced: Dim appNameForShell As String = PropertyValue("App.OfficeTime") + ".debug.app"
    with: Dim appNameForShell as string = "*.debug.app"

    It seems the PropertyValue isn't loading the app name
    Add: print appNameForShell
    To check
    Best wishes
    Phil

  20. Philip C

    Oct 19 Pre-Release Testers, Xojo Pro Cooroy, QLD, Australia

    Also, I came across this from Beatrix Willius Sep 26 Pre-Release Testers Europe (Germany), and must acknowledge her help.
    (https://forum.xojo.com/member/51493-beatrix-w )

    This is her script, which includes a section to kill the running process:

    'kill app if running
    dim theCommand as String
    dim theNextCommand as String

    theCommand = "ps -axwwopid,command | grep '" + PropertyValue("App.MacOSXAppName") +"' | grep -v grep | awk '{print $1}'"
    dim theResult as String
    theResult = DoShellCommand(theCommand)
    if theResult <> "" then
    theCommand = "kill " + theResult
    theResult = DoShellCommand(theCommand)
    end if

    'get path and app name
    'dim appNameForShell as string = PropertyValue("App.MacOSXAppName") + ".debug.app" // HERE I SUBSTITUTE THE NEXT LINE
    dim appNameForShell as string = "*.debug.app" // THIS WORKS FOR ME
    dim appNameForBuild as String = "./""Builds - HH.xojo_project/Mac OS X (Cocoa Intel)""/*.app"

    appNameForShell = getShellString(appNameForShell)

    'print 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

    //======== STILL NEED TO FIGURE OUT HOW TO DELETE THE BUILD, AS THE SAME PROBLEM HAPPENS WHEN I TRY TO BUILD

  21. Philip C

    Oct 19 Pre-Release Testers, Xojo Pro Cooroy, QLD, Australia

    Also.... Once one gets to the point of repeatedly building the app for different platforms, there is the same problem of having to delete the Builds prior to generating a new build.
    On Mac using High Sierra, the following seems to work, but MUST be run as a debug 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)

    /// Many thanks to Greg O'Lone for his contribution to Case #49147

or Sign Up to reply!