Runtime Error build only?

I am trying to aquire the contents of a folder I copy in a build script to the App Parent Folder. This works just fine in debug and I have the GetFolderItem in a Try Catch but it gives this error and the options to Continue or Quit:

Location: Universal/FolderItemImp/FolderItemImpMac2.cpp:435
Condition: GetMacAppParentFSRef(&parentRef)

Has anyone else seen ths or have any ideas? I have looked in the build contents and the folder is in there just as it is in the debug build

Update, soooo wierd - I just ran it again hoping to see something new and now my try/cxatch ios trapping the Nil FolderItem and exiting the sub, and giving me the expected error message; it cant load the sub folders of that folder but I have no idea why not.

So confused - any ideas appreciated!

So Jim McKay helped me solve this using the Resources Directory instead of the App Parent. Not exactly sure why it happends but Mac64 runtime builds cant always access items in that App Parent Folder.

  • Note to anyone; use the Resources Folder. I may also refactor the code around this to use the Xojo.IO.SpecialFolder

probably because under some circumstances the executing app is MOVED… so its “parent” folder is no long what you think it is.