AvdLee / RocketSimApp

Enhancing the iOS simulator for productivity
571 stars 20 forks source link

SVGLength Crash at first launch #548

Open emrdgrmnci opened 4 days ago

emrdgrmnci commented 4 days ago

Describe the bug The app crashes on first launch after adding the #DEBUG code from the RocketSim Simulator app to track network requests. The error message indicates an issue with determining PPI values for the current device, which affects SVG rendering.

To Reproduce Steps to reproduce the behavior:

  1. Add the #DEBUG code from RocketSim Simulator app to the project
  2. Build and run the app
  3. App crashes immediately on launch

Error Message: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot determine the PPI values for current device; returning 0.0f - hopefully this will crash your code (you CANNOT run SVG's that use CM/IN/MM etc until you fix this)'

Expected behavior The app should launch successfully with the added debug code for tracking network requests.

Desktop (please complete the following information):

AvdLee commented 4 days ago

@emrdgrmnci are you sure this crash doesn't happen when you disable RocketSim Connect?

I can see RocketSim's swizzle methods, but they shouldn't influence any behavior. For full clarity: the error message:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot determine the PPI values for current device; returning 0.0f - hopefully this will crash your code (you CANNOT run SVG's that use CM/IN/MM etc until you fix this)'

Is not from RocketSim Connect and somewhere else in your code.

emrdgrmnci commented 4 days ago

Yeah, I know it doesn't look like related but when I add the RocketSim Connect setup code it directly crashing at first launch of the app and affecting SVGLength finding device size ridiculously.