XojoFramework Error #104 when running/building MAC OS 64-bit

I am consistently receiving a XojoFramework Error #104 when running/building MAC OS 64-bit apps. I even created a new project with just a window and rectangle – no code. Same error. I deleted all Xojo libraries and the app and rebooted, then reinstalled from a fresh download – Same problem.

Suggestions?

< Scott >

What version of Xojo are you using?

Googling this error led me to threads that suggest this was an issue they fixed a long time ago:
https://forum.xojo.com/34926-error-104-when-debugging
https://forum.xojo.com/43595-compilation-failure-error-104/0

what platform are you on ?

Latest version on Mac (2019 1.1). This only started occurring when I shifted from 32 bit to 64 bit complies.

< Scott >

probably icon services is holding one of the files busy in the debug build and then when the IDE goes to rebuild it cant completely remove everything

odd as that should have been fixed by using a much newer api for removing files on macOS

It’s more than a little annoying. How the heck do I get around it without rebooting every time I run/build?

really depends on what process it is thats holding the file busy

you’re not debugging a project saved on Dropbox or similar drive are you ?

if so dont - it will be hell like this

if not and its on a local drive then when you go to run & get this error navigate to where the debug build would have been (or if there is an only one left after you quit you can do this)

open terminal, type in "lsof +D " and the drag one of the FOLDER (+D only works on folders) that has this problem and it will tell you what process is holding it
for a FILE you can use "lsof " then drag the file into the terminal window so its path gets entered
the result of that will tell you what process is holding the file busy

You are a developer. “rm” the offending stuff away. Or use below AppleScript with the main folder changed:

[code]#!/usr/bin/env osascript

on run
set DocumentsFolder to path to documents folder as string
set CodeFolder to DocumentsFolder & “Development:Mail Archiver:code current” – change here!!!
set theFolder to (CodeFolder as alias)
doSomethingWith(theFolder)
checkFolder(theFolder)
return true
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 "mail archiver")
		delete (every item of aFolder whose name ends with "app" and name starts with "index helper")
		delete (every item of aFolder whose name ends with "dmg")
		if name of aFolder starts with "OS X 64 bit" or name of aFolder starts with "Mac OS X (Cocoa Intel)" or name of aFolder starts with "final" then
			delete (files of aFolder)
			delete aFolder
		end if
	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

on checkFolder(aFolder)

tell application "Finder"
	set subFolders to every folder of aFolder
	repeat with eachFolder in subFolders
		my checkFolder(eachFolder)
	end repeat
end tell

try
	tell application "Finder"
		
		repeat with singleFile in aFolder
			set NewFile to singleFile as alias
			if (name of NewFile ends with "dmg") or (name of NewFile ends with application and name starts with "mail archiver") or (name of NewFile ends with application and name starts with "index helper") then
				display alert "old app found"
				return false
			end if
			
		end repeat
		
	end tell
on error error_message number error_number
	--ignore
end try

end checkFolder[/code]

Thanks for all the help. I just don’t understand why Xojo doesn’t clean up after itself properly. I didn’t have this problem until I switched to 64-bit compile.