Comments (7)
Hey @ianbytchek
I've played with this a little and it seems like it is not the crashes module. If you call start
with Analytics module, and i presume any other module, it will happen also. The reason is that while sendind start service log, sdk tries to determine screen size here. And after this call NSRunningApplication.current
is assigned a new object. You can reproduce this by inserting call to NSScreen.main
between print statements, like this:
Swift.print(NSRunningApplication.current.processIdentifier)
NSScreen.main
Swift.print(NSRunningApplication.current.processIdentifier)
from appcenter-sdk-apple.
Thanks for figuring this out! This is interesting! My curiosity is 💯 satisfied.
from appcenter-sdk-apple.
This is also observed when changing application type via ApplicationServices api, main.swift
file below shows what happens. The same affect can be achieved with creating a copy of NSApplication
, which does this internally.
// main.swift
import AppKit.NSRunningApplication
import ApplicationServices.HIServices
Swift.print(NSRunningApplication.current)
var psn: ProcessSerialNumber = .init(highLongOfPSN: 0, lowLongOfPSN: UInt32(kCurrentProcess))
TransformProcessType(&psn, UInt32(kProcessTransformToBackgroundApplication))
// _ = NSApplication() // Or just do this for the same effect…
Swift.print(NSRunningApplication.current)
AppCenter and PLCrashReporter don't appear to use the above api. What's the catch?
from appcenter-sdk-apple.
Hi @ianbytchek,
this is interesting. We need to look at this more closely.
Any chance you can send us a full stacktrace through support(intercom, the blue button on the App Center portal)?
from appcenter-sdk-apple.
There's no crash – if I understood you correctly about the stacktrace? What I'm saying is starting AppCenter with crashes changes the application type in some untraceable way. To check this behaviour simply create a console app and put this inside the main.swift
:
Swift.print(NSRunningApplication.current) // <NSRunningApplication: 0x608000111040 ((null) - -1)>
MSAppCenter.start(MSAppCenter.identifier, withServices: [MSCrashes.self])
Swift.print(NSRunningApplication.current) // <NSRunningApplication: 0x6040001049b0 (com.my.app - 52214)>
I'd like to know how AppCenter does it without any obvious api calls.
from appcenter-sdk-apple.
Oooops, I somehow misunderstood your message here. Sorry.
I didn't find the time to check this last week, we'll get back in touch as soon as I know more. Making the process available might actually be unintentional but we need to check 😇
from appcenter-sdk-apple.
Hi @ianbytchek,
sorry for the long wait. I've meant to investigate but just didn't find the time. I've created a bug for this and we will triage it accordingly.
from appcenter-sdk-apple.
Related Issues (20)
- Update App Center SDK to include privacy manifest HOT 10
- Spawning lots of short lived threads when initialising `MSACCrashes` instance HOT 15
- Enable App Center will cause SwiftUI's accent color to disappear. HOT 7
- error: Signing for "AppCenter_AppCenterDistribute" requires a development team. HOT 3
- Unclear how to determine current AppCenter Distribute project HOT 4
- Add documentation for dataResidencyRegion HOT 3
- Crash at launch on macOS 11 ARM64 - setupLogBuffer HOT 3
- Crashes.trackError always shows MSACExceptionModel.initWithError: as the exception HOT 5
- trackError and trackException do not parse call stack correctly HOT 2
- Protobuf: could not find object file symbol for symbol HOT 17
- Slow network requests HOT 1
- Freeze on iOS Platform When App Crashes in KMM Project HOT 3
- AppCenter metrics and crash report errors. HOT 2
- Callbacks for PLCrashReporter are not exposed, resulting in an inability to flush logs HOT 1
- Need a way to push log immediately HOT 1
- Missing NSPrivacyAccessedAPITypeReasons in App Privacy Manifest. HOT 1
- AppCenter Podspec doesn't include the xcprivacy files HOT 7
- Build failed due to AppCenter not found error HOT 1
- Any Crash Report/Analytics Alternatives? HOT 2
- Privacy manifest formats are invalid and use wrong codes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appcenter-sdk-apple.