I maintain a macOS application. Some users (but not all) report an issue (I suspect, those running Catalina), where the first time the app is launched, it crashes. All future launches work okay.
I've managed to reproduce this, and it's crashing in the argument parsing code. My suspicion is that Gatekeeper is passing some unusual argument on the first launch (the one where it shows the 'this is an application downloaded from foo.com' dialog).
The argument-parsing code is pretty robust : it already rejects bogus arguments, so there must be something very unusual being passed. The problem is my local builds don't show the problem, and I don't know to reset the quarantine flag to trigger the fault again. (Also of course the crashes are in release builds, so the crash trace doesn't give me an exact location)
If I could trigger the quarantine warning artificially, by marking a local debug build as 'newly downloaded', I suspect this would be trivial to debug.