Post

Replies

Boosts

Views

Activity

Reply to EXC_BAD_INSTRUCTION SIGILL
The ATTR_CMN_ERROR is not triggered. As as soon as we hit this particular folder boom, we manage to collect ATTR_CMN_NAME, ATTR_CMN_FSID and ATTR_CMN_OBJTYPE and than as soon as we attempt to fetch the ATTR_CMN_MODTIME, boom. So we are crashing on the same darn portion. Maybe I should revert this module back to the c version.             let modTimeInSeconds: Int32 = {                 if (returned.commonattr & attrgroup_t(bitPattern: ATTR_CMN_MODTIME)) != 0 {                     aligningBuffer.copyMemory(from: UnsafeRawBufferPointer(start: field, count: MemoryLayout<timespec>.size))                     let time = aligningBuffer.baseAddress!.load(as: timespec.self)                     // the following will fails cause of memory misalignment                     // let time = field.load(as: timespec.self)                     field += MemoryLayout<timespec>.size                     return Int32(time.tv_sec)                 }                 return 0             }()
Topic: App & System Services SubTopic: General Tags:
Nov ’21
Reply to EXC_BAD_INSTRUCTION SIGILL
I could share some more code on a direct message basis, it you are up for a challenge. My pain is that I can't reproduce it. It just happens on a few 'lucky' customer machines. And these machines are recent. No old software or old file systems. I will add the 'ATTR_CMN_ERROR' and see if that will prevent me from digging deeper into trouble. It is possible these troubled folders are returning some error and instead of bailing out early I'm continuing to read the rest of the pointer. This class, the one that uses the getattrlistbulk was my last one to move to swift. The previous version using Objective-C was working. Mixing both obj-c and swift requires much more mental effort. Imagine speaking English and French in the same conversation randomly. Maybe I should eat it and revert this back the C base implementation. Again thank you very much for the tips. Klajd Deda let myEmail = "kdeda" + "@" + "mac.com"
Topic: App & System Services SubTopic: General Tags:
Nov ’21
Reply to EXC_BAD_INSTRUCTION SIGILL
Went through the entire process of fully symbolicating a crash. And I was rewarded with some more gold nuggets. NodeFactory.appendChildren(_:_:_:_:_:_:) (in com.id-design.v7.whatsizehelper) (NodeFactory.swift:256) let modTimeInSeconds: Int32 = {}() is obviously crashing. Also another clue, it crashes always on the same folder. So the meta data for this folder is 'wrong' ?             let modTimeInSeconds: Int32 = {                 if (returned.commonattr & attrgroup_t(bitPattern: ATTR_CMN_MODTIME)) != 0 {                     aligningBuffer.copyMemory(from: UnsafeRawBufferPointer(start: field, count: MemoryLayout<timespec>.size))                     let time = aligningBuffer.baseAddress!.load(as: timespec.self)                     // the following will fails cause of memory misalignment                     // let time = field.load(as: timespec.self)                     field += MemoryLayout<timespec>.size                     return Int32(time.tv_sec)                 }                 return 0             }()
Topic: App & System Services SubTopic: General Tags:
Nov ’21
Reply to open(/var/db/DetachedSignatures) - Undefined error:0
This is not an answer. I wanted to note that my errors stem from the use of NSTask. I have created some helper build scripts in swift to automate a new app build. These are compiled and can be run from within Xcode as well or as useful command lines. It will spawn an NSTask (Now renamed Process in swift) where I would do something like this /usr/bin/codesign --remove-signature "/my file....." If I ran this command in terminal, all works well. Buy if I ran under my script, using an NSTask I see errors like the harmless [logging-persist] and others It seems as if the apple tools are not happy running as child processes under my NSTask. Any advice on how to configure NSTask properly.
Topic: Privacy & Security SubTopic: General Tags:
Aug ’21
Reply to How to make a scrollable multi-line Text
Unfortunately all these tips, July 2021, BigSur 11.4 and the Text refuses to fill its parent's Size. We could really do pixel perfection in AppKit. struct ContentView : View {     var message: String          var body: some View {         ScrollView {             VStack {                 Text(message)                     .font(.subheadline)                     .lineLimit(nil)                     .background(Color(.sRGB, white: 0.86, opacity: 1))             }.frame(maxWidth: .infinity)         }         .border(Color.red)     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’21