For the Mac version of a longstanding project, which downloads image files, I am desiring to add the option of seamlessly depositing them in the Photos Library. The linked example simply imports a local file of the user’s choosing.
This project works perfectly on my M1 Mac (current Tahoe beta), but on neither of my Intel machines (15.6.1.)
This puzzled Christian, who saw no issue at his end, though he did not explicitly say that he ran “my” project.
For me, on Intel the changeCompletionHandler reports success, but in the debugger, with breakpoints and logging in the change block, it appears as if the change block does not fire at all. Again, all appears as expected when I debug on the M1.
On my daily driver iMac Pro, I had had the Photos library on an external drive. I have returned it to the main SSD, and even subsequently repaired the library. This did not help.
I am here instead of TOF because I know there is a lot of talent here. I’m just running the risk that Thorsten will tell me all about Java.
The example project is available at here, at my website. I will appreciate and acknowledge any help. And if it DOES work for you on Intel, that will really blow my mind.
Edit: This project is on Xojo 2025r2.1, and requires the 25.4 MBS plugins. Christian did fix a crashing bug for me. But that still leaves silent failure on Intel.
To me proposed solution feels wrong, I think stack overflow exception should be unrecoverable. Correct solution would be to figure out the cause and maybe increase the stack size, if code is recursive.
The change block runs on a non-Xojo thread. I’m just going to guess that running it, on Intel, makes the Xojo framework throw a fit and a false positive here. I’m sticking to that till someone sets me straight.
Xojo are not going to fix it, I had a feedback for it, but they closed it.
I was complaining that more and more of Apple’s API uses blocks and this makes it harder to stick with Xojo while supporting newer versions of the macOS.
This is something like the stack checking function looking up the stack size for the thread, but since it doesn’t find it in some table, the stack size is always zero and you always get an exception raised there, that you can’t catch.
this issue hasn’t been fixed for 10+ years, so just use the pragma.