Post

Replies

Boosts

Views

Activity

Reply to NSDateFormatter MM/dd/yy problem with 2000 january 1
Amazing and sad that this bug still exists in the OS today. The reason @pdm didn't reproduce the bug is because his timezone was likely set to +0 or less. Since it appears they work for Apple we're going to assume that their timezone is likely -7 or -8 depending on the time of year. The reason why it occurred for @BlixLT is because their timezone is +1 or greater. This bug doesn't occur if one uses 4 digit years.
Oct ’21
Reply to App crashes while creating instance of WebView in Apple silicon macs
@eskimo Interestingly I'm in the process of finishing up getting an app compiling for Apple Silicon. When I first got it compiling yesterday I ran it in debug mode with a debugger attached. When a view that uses the deprecated WebView class attempted to come on screen during the initialization of the window it crashed immediately with an EXC_BAD_ADDRESS. The function at the top of the crashed stack is: void JSC::LinkBuffer::copyCompactAndLinkCodeunsigned int(JSC::MacroAssembler&, JSC::JITCompilationEffort). At this point the WebView hasn't been given a URL or any content. It is simply trying to come on screen during the initialization of the window from a nib. I tried replacing the view in the nib with a custom view and class set to WebView but that didn't help. I decided to try a debug build compiled for using Rosetta (Intel) in debug mode with the debugger attached. No crash. I then tried a debug build compiled for Apple Silicon (arm) without the debugger attached. No crash. This is strange. 🤔 I then compiled in release mode and properly code signed instead of ad hoc in debug. No crash. A teammate suggested I turn off the JIT and so in my scheme for debug build I put JSC_useJIT=false as an environment variable did a debug build compiled for Apple Silicon. No crash. Still very strange. But clearly by not using the JIT we avoid the crash in this situation. So I tried to reproduce the problem by creating a new app that just throws up a WebView in a window. Tried to create as best a representation as I could with all the settings. Disappointingly no crash. I discovered JSC_useLLInt=false and thought maybe that would force the use of the JIT in release mode or without the debugger attached and cause the crash but it didn't. After a lot of Googling I found something about JIT and the hardened runtime. So I went and looked and saw the Allow Execution of JIT-compiled Code and decided to give it a whirl. With allowing that exception (I also have Disable Library Validation enabled for debug builds) I did a debug build compiled for Apple Silicon with the debugger attached. This time there was NO crash. So this brings up lots of questions for me. I can possibly understand why this exception is required. However, the results appear to be all over the place with little reason between them. Where it is working in some situations and in other not as described above. I would expect if this truly was the problem I should be hitting it in more situations especially when disabling JSC_useLLInt. Also, I talked with someone else who has the old WebView in their app and they have never seen this behavior. Given all that... Does using the old style WebView require that we include the Allow Execution of JIT-compiled Code? If not, why might I be hitting these different results? Thank you for any insight you might have!
Feb ’21