.debug file not getting deleted

  1. ‹ Older
  2. 2 years ago

    I am having this problem too after upgrading to High Sierra. Never had it in Sierra. I have no idea how to setup a build script.

  3. Jens K

    30 Sep 2017 near Cologne, Germany

    @Charles F I am having this problem too after upgrading to High Sierra. Never had it in Sierra. I have no idea how to setup a build script.

    Same here. After reading the user guide, I did the following steps:

    1. Add a new script via Insert > Build Step > Script.
    2. Copy the mentioned code to the script.
    3. Drag the script in the navigator to macOS in the Build Settings section of the navigator.
    4. Your script has to be above the Build entry in order to be executed before building; drag it there, if it is unter the Build entry.

    This works perfectly for running a debug application, but I have the additional problem, that my application is not built as long as there is already an application build in the Builds folder. So I would like to add some lines of code to my build script to remove the Builds folder of my application before building it again.
    By now I have no working result. Is there a way to extend Beatrix' script for that?

  4. Beatrix W

    30 Sep 2017 Pre-Release Testers, Third Party Store Europe (Germany)

    AppleScript to the rescue:

    #!/usr/bin/env osascript
    
    on run
    	set DocumentsFolder to path to documents folder as string
    	set CodeFolder to DocumentsFolder & "xxxxx path to main projects folder"
    	set theFolder to (alias CodeFolder)
    	doSomethingWith(theFolder)
    end run
    
    on doSomethingWith(aFolder)
    	tell application "Finder"
    		set subFolders to every folder of aFolder
    		repeat with eachFolder in subFolders
    			my doSomethingWith(eachFolder)
    		end repeat
    	end tell
    	
    	try
    		tell application "Finder"
    			delete (every item of aFolder whose name ends with "app" and name starts with "your app name")
    			delete (every item of aFolder whose name ends with "dmg")
    		end tell
    	on error error_message number error_number
    		display alert ("YIKES! Something's wrong!") message error_message & (" Error number ") & error_number & "."
    	end try
    end doSomethingWith

    This is called in an IDE communicator script:

    dim basePath as string
    basePath = "/Users/xxx/Documents/xxx"
    
    'delete old apps and dmg
    dim theCommand as string = "osascript " + basePath + "xxxxxxxxx"
    dim theResult as String = DoShellCommand(theCommand)

    Change the paths and in the AppleScript the name of the app. Or take the condition out if you think that you don't need it.

  5. Jens K

    30 Sep 2017 near Cologne, Germany
    Edited 2 years ago

    Thanks for your code!
    In the meantime I found a simpler solution. I just added the following lines to your pre-build script:

    theCommand = "rm -rf [PATH TO MY XOJO FILES]/Builds\ -\ " + PropertyValue("App.MacOSXAppName") + _
        ".xojo_binary_project/OS\ X\ 64\ bit/" + PropertyValue("App.MacOSXAppName") + ".app"
    theResult = DoShellCommand(theCommand)
    If theResult <> "" Then Print theResult

    That's all I need for now. My code didn't work at first because I forgot to escape the whitespaces, but now I can work with Xojo as usual again…

  6. Derk J

    30 Sep 2017 Pre-Release Testers, Xojo Pro

    I’m using macos high sierra and never had this issue. Suspecting a simple setting or cache problem in macos here.

  7. Beatrix W

    30 Sep 2017 Pre-Release Testers, Third Party Store Europe (Germany)

    @Derk J: not a setting. Seems to be a problem with the macOS hanging on to the icon file. I suspect that this is also the reason why quitting the debug app takes so very very long on High Sierra.

  8. Derk J

    1 Oct 2017 Pre-Release Testers, Xojo Pro

    @Beatrix W @Derk J: not a setting. Seems to be a problem with the macOS hanging on to the icon file. I suspect that this is also the reason why quitting the debug app takes so very very long on High Sierra.

    Mine is not slow in High Sierra, not sure why an icon file should be a problem as it’s suppose to be in memory as a copy

  9. Beatrix W

    1 Oct 2017 Pre-Release Testers, Third Party Store Europe (Germany)

    Oh, Normal (ah, the fingers can't type Norman) has fixed the bug. Very nice!!!!

    Shouldn't I have gotten a notification from Feedback?

    @Derk Jochems: from the Feedback case:

    When running lsof on the left over file I get the following result:

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    iconservi 35313 beatrixwillius txt REG 1,5 255172 8610053725 /Users/beatrixwillius/Documents/Development/Mail Archiver/code current/Mail Archiver X.debug.app/Contents/Resources/App.icns

  10. Derk J

    1 Oct 2017 Pre-Release Testers, Xojo Pro

    Does that mean you have multiple applications using that same file resource? What if that icns is copied to another folder them re-insert them into the ide. See what happens?

  11. Beatrix W

    1 Oct 2017 Pre-Release Testers, Third Party Store Europe (Germany)

    @Derk J : nope, just an ordinary icon file.

  12. @Jens K Same here. After reading the user guide, I did the following steps:

    1. Add a new script via Insert > Build Step > Script.
    2. Copy the mentioned code to the script.
    3. Drag the script in the navigator to macOS in the Build Settings section of the navigator.
    4. Your script has to be above the Build entry in order to be executed before building; drag it there, if it is unter the Build entry.

    This works perfectly for running a debug application, but I have the additional problem, that my application is not built as long as there is already an application build in the Builds folder. So I would like to add some lines of code to my build script to remove the Builds folder of my application before building it again.
    By now I have no working result. Is there a way to extend Beatrix' script for that?

    I tried that initially but for some reason I can't drag the script into the build setting section of the left side panel. Unless I'm doing it wrong. When I try to drag it there it bounces back to where it started from.

  13. Sam R

    1 Oct 2017 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    @Beatrix W How can I whack iconservices into behaving? Or is this a MacOS bug?

    Most likely the later

    @Beatrix W @Derk J: not a setting. Seems to be a problem with the macOS hanging on to the icon file. I suspect that this is also the reason why quitting the debug app takes so very very long on High Sierra.

    I am seeing this also... it takes a really looooooooonnnnngggggggg time.

    I tried to transfer the project from the HS machine to my El Cap machine, but HS won't see my network shares, won't see other machine in AirDrop and it's a USB-C machine so I can't just plug a USB stick or SD card in. I'd disabled iCloud because it ate half my bookmarks. Sometimes I really wonder if Apple do any QA anymore or if it's simply left to the beta testers.

  14. Beatrix W

    1 Oct 2017 Pre-Release Testers, Third Party Store Europe (Germany)

    Here is the link for the issue with the slow quit: Feedback Case #48295 . I plan to revisit this after the next version of Xojo.

    @Sam Rowlands: As for the rest: it's just you. The computers know that you hate them.

  15. Tom I

    27 Oct 2017 Pre-Release Testers, Xojo Pro Chicago, IL

    @Beatrix W Here is the link for the issue with the slow quit: Feedback Case #48295 . I plan to revisit this after the next version of Xojo.

    That feedback case regarding the slow quit of debugging was closed. Is there another case somewhere for the bug that I can sign onto that is still open?

  16. Beatrix W

    27 Oct 2017 Pre-Release Testers, Third Party Store Europe (Germany)

    @Tom Iwaniec: Since beta testing was halted and I have a crash-on-start bug I wasn't able to test if this is fixed for 2017r3.

  17. Howard W

    2 Nov 2017 Pre-Release Testers, Xojo Pro, XDC Speakers Coeur d'Alene, ID

    I wonder if this is this due to APFS in High Sierra?

  18. Norman P

    2 Nov 2017 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    It seems to be other changes apple introduced before APFS
    At least what I've seen

  19. Paul S

    2 Nov 2017 Pre-Release Testers, Xojo Pro Europe (Netherlands, Den Haag)

    @Howard W I wonder if this is this due to APFS in High Sierra?

    I have High Sierra om a Mac Mini with a 1 TB Fusion Drive.
    The Fusion Drive isn’t converted to APFS and therefore still HFS+.
    The debug file isn’t deleted here either.

  20. Norman P

    2 Nov 2017 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    Yeah its NOT APFS - there are other Apple processes that frequently have some file in the debug app open

    lsof will tell you which processes (see way above where I mentioned this previously)

  21. Howard W

    7 Nov 2017 Pre-Release Testers, Xojo Pro, XDC Speakers Coeur d'Alene, ID
    Edited 2 years ago

    Here is something interesting ...

    This may not be the issue but Iwas debugging an app with the entire project folder on <gasp> Dropbox (a cloud file sharing service). I think there was some hints below that the .debug file issue may be a timing thing. So, as a test, I moved my project to a local drive and the .debug file is deleted as it should be. The next debug session comes up without error this time.
    So perhaps some odd timing or sharing nuance may be causing this? The failure was on the same system and the OS has been updated (macOS 10.13.1).

  22. Newer ›

or Sign Up to reply!