Post

Replies

Boosts

Views

Activity

Reply to Xcode project that runs only once under xcode
I don't know if this is of any interest anymore, but I thought I would follow up on some related problems. I finished debugging the app (it is not intended to be submitted to the app store and is signed locally) and went to create a release version for my own personal use.. Then I got a repeat of the failed try in FileManager. I switched back to the debug version and again the try failed. I turned off debugging and tried again. No try failure. I turned back on the debugging and the try failure was still gone. So this looks like this is an xcode problem related to debugging. In any case, I have my release verrsion installed and it works fine.
May ’25
Reply to Xcode project that runs only once under xcode
Well, now I'm totally confused. I tried the app this morning and got the same results. Then I added your little code snippet to the library, ran all the tests (which succeeded), updated the app and ran it. I would have sworn it stayed in the true loop forever, but now I'm not so sure. I closed the app out of xcode, then reopened it and tried the app. It ran fine! This was with your code snippet. Then I decided to simply to go back to my original code and try it. Again, I checked all the tests, and each time I set the appropriate breakpoints to make sure the expected code was being run. Lo and behold I can't get the app to fail now. Just. tried it agaiin and it worked fine. The only difference now to the oriiginal problem is some commented out code. (your snippet). If I had to guess now, I'd say this is an xcode problem, but I have no way to reproduce or test it. Any thoughts on where to go from here? Rick
May ’25
Reply to Xcode project that runs only once under xcode
I will try to submit a bug report shortly, but I'd like to fiddle with the code a bit more. The code is in a swift package library that has been stable for several years and there is no do/catch block - the containing method is an initialization that throws and the final code piece is just a property in an @observable class in a containing app having a try! to initialize the class. I am using the. url version.of contentsOfDirectory. The exact code piece where it throws is let contents = try fm.contentsOfDirectory(at: suburl, includingPropertiesForKeys: [.isDirectoryKey], options: [.skipsHiddenFiles]) but I've also tried the path version with the same results, and I know it dies there by putting a breakpoint there and single stepping through it. One other interesting fact is that if I open the products group and run the debug version directly from the finder, it never fails. Finally, I don't know what you mean by 'retry the call'? Rick
Apr ’25
Reply to Xcode project that runs only once under xcode
Okay, by "it" I mean that xcode is running and I open the app. I then run it within xcode and it runs fine. I then try to run it again and it fails. reporting the EINTR. Then I put a breakpoint at the first line in the code of the app and run it, again within xcode. And I then start to single step through the code. The first single step brings the app up fine, time over time. It always works in that case. I think I understand EINTR, it's been around since the beginnings of unix. How do I determine, in a windows type app, where something is occuring? I know the error is associated with an initialization of one of my classes. If I put a breakpoint there, it clearly throws when invoking foundatiion's "contentsOfDirectory". But how can I tell why? The directory exists and I. can read it in finder, and it clearly works some of the time.
Apr ’25
Reply to Xcode messages
I'll try to put together a minimal app displaying these messages. Note however that no writing is being done to the user defaults. It has been stable and unchanged for several years (that is, the plist suite file.), and in the past I have never gotten these messages.
Sep ’24
Reply to Userdefaults performance validation
That still doesn't answer the question. I have a user defaults (preferences) file with few entries and when running tests I keep getting messages like "Not updating lastKnownShmemState in CFPrefsPlistSource<0x600000358360> (Domain: org.Home.MoviesDB, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes): 1169 -> 1181" Is there something wrong?
Topic: App & System Services SubTopic: General Tags:
Sep ’24