Comments (22)
Problem is still here with SDK 4.16.2
from mobile-sdk-ios.
It does not happen in our end, so it this problem also occurs in iOS 4.16.1 for you?
from mobile-sdk-ios.
Thanks for the quick reply. Yes the issue happens for both versions. Here are the screenshots at the moment the app crashes:
from mobile-sdk-ios.
I'm not sure if it is related but the LED appear red on both remotes, and I sometimes need to plug the cable off then on for the connection to happen
from mobile-sdk-ios.
Are you using Object-C or Swift demo?
from mobile-sdk-ios.
Swift
from mobile-sdk-ios.
Swift demo has some problem, maybe try Object-C demo. We just update the demo yesterday, you can clone the latest code. What do you mean by red LEDs for bot remotes? You should only have a single controller.
from mobile-sdk-ios.
I tried the Obj-C version (from latest commit 071cd3e), again with the same crash when I click "Register APP".
I'm not using two RC at the same time, but I thought the problem might be due to one of them so I tested with both, without any difference
from mobile-sdk-ios.
The LED will not make this effect, it is very hard to tell what happens through this. The question is you havn't change the app and what conditions has changed to make this happened, we don't know about that yet. The code hasn't change, but it starts crashing.
from mobile-sdk-ios.
Yes it's really weird, because I was developping the app and it worked fine, then I changed one line of code completely unrelated to the SDK, and the bug appeared. Do you know what the SDKCache
Thread is doing ?
from mobile-sdk-ios.
I see something strange in the logs, could it be related ?
2022-10-27 11:55:43.888443+0200 DJISDKSwiftDemo[1257:99826] open on /var/mobile/Containers/Data/Application/CA1CC13F-233B-40A7-A7C8-43152FFAA48B/Library/.space_db/flysafe_areas_djigo_en.db: No such file or directory
2022-10-27 11:55:44.638202+0200 DJISDKSwiftDemo[1257:100114] fopen failed for data file: errno = 2 (No such file or directory)
2022-10-27 11:55:44.638295+0200 DJISDKSwiftDemo[1257:100114] Errors found! Invalidating cache...
2022-10-27 11:55:45.328270+0200 DJISDKSwiftDemo[1257:99826] SDK Registered with error
from mobile-sdk-ios.
It seems like missing a database. Will the SDK successfully register without connecting to RC? Just only on the iPad?
from mobile-sdk-ios.
Yes the app works fine as long as no device is plugged in, with a successful registration.
It's not related to the ipad either as the bug happens with a different one too.
After googling, it seems that the fopen failed for data file
is related to Metal API and probably unrelated. I believe it's been there all along.
Any idea what the SDK is doing in the SDKCache
thread?
from mobile-sdk-ios.
SDKCache thread is the thread that operate the DJIKeys. E.g. If you call a SDK method, it will operate the DJI Key in SDKCache thread.
from mobile-sdk-ios.
Ok thanks. Do you have any idea what could be causing this issue, or how to resolve it ? Or what test wa can perform to understand the source ?
from mobile-sdk-ios.
Is it possible to get the crash log for us? We would like to see where and which function crashes.
from mobile-sdk-ios.
Sure, how do I do that ? As I mentionned already, it happens in a different thread, so I don't have a stack trace for you. I can only show the assembly line that crashes the code, which is the image I've put in the description above
from mobile-sdk-ios.
After the crash happens, connect your mobile device to the Xcode, in Xcode->window->devices and simulators->view device logs, find the corresponded log for your app at the crash time and export.
from mobile-sdk-ios.
Even look at the log, we cannot guarantee the issue is fix. Perhaps you can try connect your aircraft and RC to the Assistant 2 to re-download and install the latest firmware and try again.
from mobile-sdk-ios.
Here is the crash report, as I downloaded it from XCode.
DJISampleApp_M300_crash.crash.zip
h.crash.zip)And here are the full logs from the console
2022-11-02 12:11:09.887073+0100 DJISDKSwiftDemo[5288:410977] IAPAppRegisterClient: capabilities 0x8020
2022-11-02 12:11:09.887217+0100 DJISDKSwiftDemo[5288:410977] IAPAppRegisterClient: __eaClientRegisterediapd 0 -> 1
2022-11-02 12:11:09.887263+0100 DJISDKSwiftDemo[5288:410977] IAPAppRegisterClient: __eaClientRegisterediap2d 0 -> 1
2022-11-02 12:11:09.887578+0100 DJISDKSwiftDemo[5288:410977] IAPDHasLaunched: kIAPAvailableNotification iapdAvailableState 100 -> 0
2022-11-02 12:11:09.887654+0100 DJISDKSwiftDemo[5288:410977] IAPAppRegisterClient: __eaiapdHasClientID 0, IAPDHasLaunched 0
2022-11-02 12:11:09.888006+0100 DJISDKSwiftDemo[5288:410977] IAP2DHasLaunched: kIAP2AvailableNotification iap2dAvailableState 100 -> 0
2022-11-02 12:11:09.888063+0100 DJISDKSwiftDemo[5288:410977] IAPAppRegisterClient: __eaiap2dHasClientID 0, IAP2DHasLaunched 0
2022-11-02 12:11:09.888262+0100 DJISDKSwiftDemo[5288:410977] IAPAppRegisterClient: registerWasSuccessful 0
2022-11-02 12:11:09.888620+0100 DJISDKSwiftDemo[5288:410977] -[EAAccessoryManager _initFromSingletonCreationMethod] initializing (0x282aec3c0) with uuid 1BEBA3E8-AC94-44FC-8518-33C86771CC7A
2022-11-02 12:11:09.888686+0100 DJISDKSwiftDemo[5288:410977] -[EAAccessoryManager _initFromSingletonCreationMethod] isRunningOnMac
2022-11-02 12:11:09.893740+0100 DJISDKSwiftDemo[5288:410977] initialConnectedAccessories count 0
2022-11-02 12:11:09.893793+0100 DJISDKSwiftDemo[5288:410977] _connectedAccessories (0)
2022-11-02 12:11:09.893841+0100 DJISDKSwiftDemo[5288:410977] Done attaching initialConnectedAccessories
2022-11-02 12:11:09.893903+0100 DJISDKSwiftDemo[5288:410977] IAPAppConnectedAccessories: __eaClientHasCheckedForConnectedAccessories 0 -> 1
2022-11-02 12:11:09.894191+0100 DJISDKSwiftDemo[5288:410977] IAPAppConnectedAccessories: IAPDHasLaunched 0, IAP2DHasLaunched 0
2022-11-02 12:11:09.895221+0100 DJISDKSwiftDemo[5288:410977] On: 1045 RegisteredForLocalNotifications Count: 1
2022-11-02 12:11:09.895281+0100 DJISDKSwiftDemo[5288:410977] Returning connectedAccessories count 0
2022-11-02 12:11:09.895330+0100 DJISDKSwiftDemo[5288:410977] Returning connectedAccessories count 0
2022-11-02 12:11:09.895850+0100 DJISDKSwiftDemo[5288:410977] Returning connectedAccessories count 0
2022-11-02 12:11:09.895930+0100 DJISDKSwiftDemo[5288:410977] Returning connectedAccessories count 0
2022-11-02 12:11:09.896003+0100 DJISDKSwiftDemo[5288:410977] Returning connectedAccessories count 0
2022-11-02 12:11:10.564741+0100 DJISDKSwiftDemo[5288:410977] SDK Registered with error
2022-11-02 12:11:10.565445+0100 DJISDKSwiftDemo[5288:411305] Returning connectedAccessories count 0
2022-11-02 12:11:11.062615+0100 DJISDKSwiftDemo[5288:411280] Metal API Validation Enabled
2022-11-02 12:11:11.712937+0100 DJISDKSwiftDemo[5288:411334] Returning connectedAccessories count 0
2022-11-02 12:11:11.713137+0100 DJISDKSwiftDemo[5288:411336] Returning connectedAccessories count 0
2022-11-02 12:11:11.765044+0100 DJISDKSwiftDemo[5288:411339] Returning connectedAccessories count 0
2022-11-02 12:11:44.022544+0100 DJISDKSwiftDemo[5288:410977] CoreAccessories accessoryInfo for arrival = {
ACCExternalAccessoryPPIDKey = "<null>";
ACCExternalAccessoryPrimaryUUID = "EA5DA820-7E2C-44BD-84B0-B378976C9005";
ACCExternalAccessoryProtocolDetailsKey = {
"com.dji.common" = {
ACCExternalAccessoryMatchAction = 1;
ACCExternalAccessoryProtocolEndpointUUID = "24CBBBF7-CFB4-4684-A519-FCED0323764B";
ACCExternalAccessoryProtocolIndex = 0;
ACCExternalAccessoryProtocolType = 2;
ACCExternalAccessorySessionUsesSocketInterfaceKey = 1;
};
};
ACCExternalAccessoryRegionCodeKey = "<null>";
IAPAppAccessoryCapabilitiesKey = 1;
IAPAppAccessoryCertDataKey = "607 bytes";
IAPAppAccessoryCertSerialNumberKey = "16 bytes";
IAPAppAccessoryDockTypeKey = "";
IAPAppAccessoryFirmwareRevisionKey = "V03.00.01.63";
IAPAppAccessoryFirmwareRevisionPendingKey = "<null>";
IAPAppAccessoryHardwareRevisionKey = "V01.02.03.02";
IAPAppAccessoryManufacturerKey = DJI;
IAPAppAccessoryModelNumberKey = "RM500-ENT";
IAPAppAccessoryNameKey = "DJI Smart Controller Enterprise";
IAPAppAccessoryProtocolsKey = {
"com.dji.common" = 0;
};
IAPAppAccessorySerialNumberKey = 1ZMBHC900300NW;
IAPAppAccessoryTransportType = 8;
IAPAppAccessoryVehicleInfoInitialDataKey = {
};
IAPAppConnectionIDKey = 34903018;
}
2022-11-02 12:11:44.026836+0100 DJISDKSwiftDemo[5288:410977] _externalAccessoryConnected: userInfo {
ACCExternalAccessoryPPIDKey = "<null>";
ACCExternalAccessoryPrimaryUUID = "EA5DA820-7E2C-44BD-84B0-B378976C9005";
ACCExternalAccessoryProtocolDetailsKey = {
"com.dji.common" = {
ACCExternalAccessoryMatchAction = 1;
ACCExternalAccessoryProtocolEndpointUUID = "24CBBBF7-CFB4-4684-A519-FCED0323764B";
ACCExternalAccessoryProtocolIndex = 0;
ACCExternalAccessoryProtocolType = 2;
ACCExternalAccessorySessionUsesSocketInterfaceKey = 1;
};
};
ACCExternalAccessoryRegionCodeKey = "<null>";
IAPAppAccessoryCapabilitiesKey = 1;
IAPAppAccessoryCertDataKey = {length = 607, bytes = 0x3082025b 06092a86 4886f70d 010702a0 ... b43a944e a1003100 };
IAPAppAccessoryCertSerialNumberKey = {length = 16, bytes = 0x284c29f3738f9201f61a2ec714498e76};
IAPAppAccessoryDockTypeKey = "";
IAPAppAccessoryFirmwareRevisionKey = "V03.00.01.63";
IAPAppAccessoryFirmwareRevisionPendingKey = "<null>";
IAPAppAccessoryHardwareRevisionKey = "V01.02.03.02";
IAPAppAccessoryManufacturerKey = DJI;
IAPAppAccessoryModelNumberKey = "RM500-ENT";
IAPAppAccessoryNameKey = "DJI Smart Controller Enterprise";
IAPAppAccessoryProtocolsKey = {
"com.dji.common" = 0;
};
IAPAppAccessorySerialNumberKey = 1ZMBHC900300NW;
IAPAppAccessoryTransportType = 8;
IAPAppAccessoryVehicleInfoInitialDataKey = {
};
IAPAppConnectionIDKey = 34903018;
}
2022-11-02 12:11:44.027224+0100 DJISDKSwiftDemo[5288:410977] For DJI Smart Controller Enterprise - 34903018 (transport 8), Found initialVehicleInfoDictionary {
}
2022-11-02 12:11:44.027297+0100 DJISDKSwiftDemo[5288:410977] eaAccessory CoreAccessoryPrimaryUUID = EA5DA820-7E2C-44BD-84B0-B378976C9005
2022-11-02 12:11:44.027391+0100 DJISDKSwiftDemo[5288:410977] Added accessory connectionID 34903018, UUID EA5DA820-7E2C-44BD-84B0-B378976C9005
2022-11-02 12:11:44.027493+0100 DJISDKSwiftDemo[5288:410977] On: 1550 Accessory Connected with UUID EA5DA820-7E2C-44BD-84B0-B378976C9005 connectionID 34903018 createdByCoreAccessories 1. RegisteredForLocalNotifications Count: 1
2022-11-02 12:11:44.027626+0100 DJISDKSwiftDemo[5288:411278] On: 1589 Accessory Connected. InternalNotPresentIniAPAccArray: 0
2022-11-02 12:11:44.027714+0100 DJISDKSwiftDemo[5288:410977] On: 1614 Posting EA DidConnect Notification for Accessory with UUID: EA5DA820-7E2C-44BD-84B0-B378976C9005 connectionID 34903018 createdByCoreAccessories 1
2022-11-02 12:11:45.033743+0100 DJISDKSwiftDemo[5288:411305] Returning connectedAccessories count 1
2022-11-02 12:11:45.034107+0100 DJISDKSwiftDemo[5288:411336] Returning connectedAccessories count 1
2022-11-02 12:11:45.034445+0100 DJISDKSwiftDemo[5288:411334] Returning connectedAccessories count 1
2022-11-02 12:11:45.034736+0100 DJISDKSwiftDemo[5288:411339] Returning connectedAccessories count 1
2022-11-02 12:11:45.045222+0100 DJISDKSwiftDemo[5288:411339] accessoryd sessionResult = 1, useSocketInterace = 1, sessionID = 0x34
2022-11-02 12:11:45.045408+0100 DJISDKSwiftDemo[5288:411339] socketPath from app = /var/mobile/Library/ExternalAccessory/ea.4989905789723005288
2022-11-02 12:11:45.056961+0100 DJISDKSwiftDemo[5288:411299] upgrade component: 1107, server_version: , device_version: , state: 255
2022-11-02 12:11:45.057793+0100 DJISDKSwiftDemo[5288:411299] upgrade component: 1107, server_version: , device_version: , state: 255
2022-11-02 12:11:45.058064+0100 DJISDKSwiftDemo[5288:411299] upgrade component: 1209, server_version: , device_version: , state: 255
2022-11-02 12:11:45.058384+0100 DJISDKSwiftDemo[5288:411299] upgrade component: 1209, server_version: , device_version: , state: 255
2022-11-02 12:11:45.063151+0100 DJISDKSwiftDemo[5288:410977] Product is connected but DJISDKManager.product is nil -> something is wrong
2022-11-02 12:11:45.201574+0100 DJISDKSwiftDemo[5288:411299] upgrade component: 1107, server_version: , device_version: , state: 2
I have already reinstalled the latest firmware, without a change. Can we agree that this bug is not caused by us but is related to the hardware / firmware ? The stack trace from above was obtained from the DJI Sample App (Swift version), without changing one line of code
from mobile-sdk-ios.
Try under DJI Pilot, reset the RC Settings and set C1 and C2 to undefined. Seems to be some firmware issues on the M300 RC.
from mobile-sdk-ios.
Thanks, problem solved by setting the buttons to undefined
. Related issue on DJI's forum here.
from mobile-sdk-ios.
Related Issues (20)
- Warning: "Error creating LLDB target at path... using an empty LLDB target which can cause slow memory reads from remote devices" using Xcode and MacBook with Apple M1 processor HOT 1
- The sdcard is always busy after call refreshFileList HOT 7
- Please remove bitcode support in FFmpeg as soon as possible HOT 6
- DJIWaypointMissionOperator block Camera functions? HOT 1
- Is there a way to extend the object tracking?
- Mavic 2 Enterprise Advanced drone model isn't included in list of devices HOT 3
- DJISDKManager.startconnToProd.. doesn't work properly HOT 2
- MediaManager and playVideo function HOT 8
- How should DJIUASRemoteIDManager be used by 3d-party developers? HOT 1
- Swift demo crashes on device connection on iOS 16 HOT 5
- Cannot fetch camera serial number/firmware on M300 RTK (P1 camera) failed HOT 5
- Mavic mini 2 uploadMission error: Execution of this process has timed out HOT 2
- How to check if compass is calibrated using iOS SDK HOT 1
- Confirm gimbal attitudeInDegrees "North Pole" reference HOT 1
- Latest XCode version: Library not found for -lDJIWidget Linker command failed with exit code 1 (use -v to see invocation) HOT 6
- DJI Assistant 2 no longer works for Mac OS 11 or later? HOT 1
- DJISDK 4.16.2 + M300RTK FW 06.01.0100 Fails to recover mission HOT 2
- DJI-SDK 4.16.2 - crash when exiting our app HOT 1
- Cannot run the swift demo on M1 Macbook pro HOT 1
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 mobile-sdk-ios.