SDKManager is not initialized - Mini 3 crash

Completed

Comments

17 comments

  • DJI Developer Support
    Where will you use DeviceHealthManager.getInstance().addDJIDeviceHealthInfoChangeListener?
    0
    Comment actions Permalink
  • DroneControl

    It will be used in the Preflight check view, just before you enter Ground Control Station. But regardless, I've managed to trigger another crash with Mini 3 without even using the DeviceHealthManager.getInstance(), therefore it must be something due to another issue connected to Mini 3.

    0
    Comment actions Permalink
  • DJI Developer Support
    I would like to inquire about the stability of the crash you mentioned. Is it consistently occurring? If so, could you please provide us with the steps to reproduce the crash?
    0
    Comment actions Permalink
  • DJI Developer Support
    According to the error message "SDKManager is not initialized", are you using other functions of the SDK after DJISDKInitEvent = INITIALIZE_COMPLETE?
    0
    Comment actions Permalink
  • DroneControl

    I would like to inquire about the stability of the crash you mentioned. Is it consistently occurring? If so, could you please provide us with the steps to reproduce the crash?

    Yes it is occurring consistently, but with a different rate. Sometimes it happens only after 1~2 minutes and another time it happens after 10 minutes. Not sure how would you try to repeat it, as there are many changes that we did from the stock UXSDK project.

    According to the error message "SDKManager is not initialized", are you using other functions of the SDK after DJISDKInitEvent = INITIALIZE_COMPLETE?

    Yes we are using many other functions and we're also checking for INITIALIZE_COMPLETE before registering app, e.g.:

    if (event == DJISDKInitEvent.INITIALIZE_COMPLETE) {
    // starts connection between DJI product and SDK
    // https://developer.dji.com/api-reference/android-api/Components/SDKManager/DJISDKManager.html#djisdkmanager_startconnectiontoproduct_inline
    SDKManager.getInstance().registerApp();
    }
    0
    Comment actions Permalink
  • 叶落无声

    这个好像没有什么影响

    0
    Comment actions Permalink
  • DJI Developer Support
    I have confirmed this error with the engineer. If you call SDKManager.init and receive the INITIALIZE_COMPLETE status before calling registerApp, this issue will not occur.
    0
    Comment actions Permalink
  • DroneControl

    Hello DJI Developer Support!

    We're calling init method with registration callback:

    SDKManager.getInstance().init(StartUpActivity.this, registrationCallback);

    And that registration callback has the following logic to register app:

    @Override
    public void onInitProcess(DJISDKInitEvent event, int totalProcess) {
    if (event == DJISDKInitEvent.INITIALIZE_COMPLETE) {
    // starts connection between DJI product and SDK
    // https://developer.dji.com/api-reference/android-api/Components/SDKManager/DJISDKManager.html#djisdkmanager_startconnectiontoproduct_inline
    SDKManager.getInstance().registerApp();
    }
    }

    But we're still getting this issue.

    0
    Comment actions Permalink
  • DJI Developer Support
    Can you provide us with a stable reproduction method or a minimal project? Does it only occur consistently on certain devices? Does MSDK V5 sample also experience the same crash.? If you are willing to provide us with the minimum project that causes the crash, here is the upload address.:https://pan-sec.djicorp.com/s/5E2MGFZZ3cpEZcw
    0
    Comment actions Permalink
  • DroneControl

    Hello DJI Developer Support!

    Sorry for late reply, will test it again today on the Mini 3 using the default UXSDK project and see if it crashes. But otherwise I never experienced this crash on M30T and M3T.

    0
    Comment actions Permalink
  • DJI Developer Support
    We have received information that using a remote controller with a screen does not cause this crash. However, the DJI MINI 3 series can be controlled using a smartphone, so we have received reports of crashes on this aircraft.
    1
    Comment actions Permalink
  • DroneControl

    That makes sense! We're using smartphone connected to the RC-N1 controller. Is there any estimation for the fix in the SDK?

    0
    Comment actions Permalink
  • DJI Developer Support
    Currently, we are unable to determine the cause of the issue. Based on the crash logs, it appears that the problem is caused by the SDKManager not being initialized. Therefore, we would like to gather more information, such as whether there is a reliable way to reproduce the issue and if it only occurs on certain models of phones.
    1
    Comment actions Permalink
  • DroneControl

    Hello!

    One of our users managed to trigger this now also on the M30 RC Plus controller. We're also investigating if there is any other potential issue, but it seems it's not isolated only to the smartphones.

    0
    Comment actions Permalink
  • DJI Developer Support
    Thank you for reaching out to us. We would like to know if the user mentioned the method and scenario to reproduce the issue. If the SDKManager cannot be used, it will affect the overall usage of the SDK. We are eager to resolve this issue as soon as possible.
    0
    Comment actions Permalink
  • DroneControl

    We've seen it for now only during the call to:

    DeviceHealthManager.getInstance().addDJIDeviceHealthInfoChangeListener

    We've just released a new version where we are catching that exception now. We'll report back if we see any other issue related to SDKManager popping up somewhere else.

    0
    Comment actions Permalink
  • DJI Developer Support
    Under what circumstances are you using `DeviceHealthManager.getInstance().addDJIDeviceHealthInfoChangeListener`? Could you provide us with the sequence of calls or this small portion of code? We will try to analyze it. If we cannot find a solution from it, I will have to wait for you to provide more information as we cannot reproduce the issue or find the cause from the logs. Here is the upload address where you can upload the file: https://pan-sec.djicorp.com/s/5E2MGFZZ3cpEZcw password:dji123
    0
    Comment actions Permalink

Please sign in to leave a comment.