smartdevicelink / sdl_ios

Get your app connected to the 🚙, make your users feel like a 🌟
www.smartdevicelink.com
BSD 3-Clause "New" or "Revised" License
169 stars 105 forks source link

NSInternalInconsistencyException: Invalid state machine SDLStateMachine transition of target SDLLifecycleManager occurred from Reconnecting to Connected #1172

Open ashwink11 opened 5 years ago

ashwink11 commented 5 years ago

Bug Report

NSInternalInconsistencyException: Invalid state machine SDLStateMachine transition of target SDLLifecycleManager occurred from Reconnecting to Connected

Reproduction Steps

Received crash report from released app, no steps know.

Expected Behavior

App should not crash

Observed Behavior
OS & Version Information
Test Case, Sample Code, and / or Example App

issue_695_crash.txt

rosscintelematics commented 5 years ago

After our FordSync library was integrated in a third party app and released to production a significant number of these exceptions was recorded in one day - approximately 130. I have attached Crashlytics reports forwarded to us, these unfortunately aren't fully symbolicated crash logs though.

NSInternalInconsistencyException.zip

joeljfischer commented 5 years ago

Unfortunately, there's not much we can do without symbolicated crash logs.

justingluck93 commented 5 years ago

I was able to recreate a similar issue:

Reproduction Steps: Install Objective C example app on device Plug phone into TDK Launch app so it starts to look for an IAP connection unplug re plug - repeat a few times and it should crash at some point.

Logs: 1180.txt

rosscintelematics commented 5 years ago

@justingluck93 Out of curiosity, which version of the library are you using? Also 6.1.2?

justingluck93 commented 5 years ago

@rosscintelematics no I was trying to reproduce the timer crash issues you are having and happen to come across this instead. I was testing on 4.7.5, I have been unable to reproduce the issue on the newest version of the SDL

theresalech commented 5 years ago

@ashwink11 we believe PR #1236 resolved this issue. Can you please review and confirm? Thanks!

theresalech commented 5 years ago

We are closing this issue as resolved via PR #1236. @rosscintelematics if you experience the issue after updating to the latest version of the SDL iOS Library, please let us know and we will re-open the issue. Thanks!

rbright55 commented 5 years ago

I have still seen this issue appear with a few apps on SDL v6.4, v6.3.1 and v6.2.3

joeljfischer commented 5 years ago

Okay, I'll reopen the issue. We have never been able to reproduce it and additional information would be helpful. We would like to know if at all possible:

  1. Reproduction steps that cause the issue.
  2. The module you're connecting to while the issue occurs.
  3. Logs set to verbose when the crash occurs.
rbright55 commented 4 years ago

1) Issue occurs when connecting, reconnecting or changing transports. Not 100% on how to reproduce. 2) SYNC 3 MY19 & MY20 Lincoln Way(v6.4.1).txt Slacker Crash(v5.2).txt City Seeker Crash(v6.1.2).txt

E-SAITO-TMC commented 4 years ago

@joeygrover -san @theresalech -san This issue is a top priority for Toyota. I would like know if it will be reproduced in the latest version.

joeljfischer commented 4 years ago

@E-SAITO-TMC This issue has not been directly addressed in the latest release. If you have reproduction steps, logs, or fuller crash reports, those would be helpful in addressing this issue.

E-SAITO-TMC commented 4 years ago

@joeljfischer -san Thank you for your reply. I understand that this issue is not solved. I have not been able to reproduce it too. So, I have no data such as logs, crash reports.

E-SAITO-TMC commented 4 years ago

@joeljfischer -san We tried 50 times, and could not reproduce this issue. Would you like to keep this issue open?

joeljfischer commented 4 years ago

@E-SAITO-TMC Because there was activity on this in February, we will keep this open for now to see if additional information can be gathered.

E-SAITO-TMC commented 4 years ago

@joeljfischer -san I understand. Thank you for your cooperation.

djbrooks111 commented 3 years ago

This has become a top crash for a good amount of our users. From what I can gather with our own logs, this is occurring when users are connecting to CarPlay and then SDL crashes. We just updated to 6.7.0 of SDL, but I do not think this will resolve the issue because of the @throw exception inside of SDLStateMachine's transitionToState:(SDLState *)state. My assumption is that a user is connecting their phone to a headunit that supports both CarPlay and Ford Sync. CarPlay is launching and SDL is crashing. Unfortunately, without modifying the SDL code, we have no way to catch this throw and handle it properly.

B_1Ec_JHsN6LmzPZx5LQjS.xccrashpoint.zip

joeljfischer commented 3 years ago

@djbrooks111, thank you for the crash report. What version of sdl_ios are you using? Some of the lines in the crash report don't make sense based on the current version. If you are ever able to capture an SDL debug log when this occurs that would also help tremendously. We have never been able to repro this issue.

djbrooks111 commented 3 years ago

Unfortunately, I only found the crash logs via Xcode/Firebase so I can't get any debug logs. We are on 6.7.0 of sdl_ios. My initial thought does have to do with a CarPlay connection somehow interfering with SDL

djbrooks111 commented 3 years ago

I would suggest that if the SDL tries to transition and the states in invalid, that it doesn't throw so the SDK/app doesn't crash