As far as I have tried, RenderDoc (which is one of the standard applications for debugging GUI apps) doesn't support x86-64 according to this issue
What are the alternatives to debug graphical apps in the ML2?
I tried looking into the docs and in the forums but could not find anything specific.
Hi @a.al-darraji, thanks for your post. Let me check with our engineers and report back asap.
There is mention I found here for renderdoc that it is not longer supported or Lumin OS, which made me hope there might be a support for such tools in the current release:
May 2022 - OS Release Notes | MagicLeap Developer Documentation
To add more context,
Radeon GPU profile, according to the page
MagicLeap Developer Documentation
says it only supports Vulkan app and I am using openGL
Hello, I confirmed with our engineers: Please install the latest version of The Magic Leap Hub. You will also need to download from the ML Hub our version of Renderdoc, which is required rather than the open source version of Renderdoc. Also, you'll need to set up Android Device Bridge. Please let me know if you've done these already and are still having trouble. Thank you for your post!
Yes, I followed all these steps and I still have a problem.
by default, any app I am launching is waiting for a debugger, (that is the case after the updating the MagicLeap2 to 1.0 version) and I don't see an option in the settings menu to disable that
and when I connect the renderDoc (that I launched from the ML Hub) I get this message
am generating a signed APKs through android studio (build -> generate signed apk)
there was also this thread , but it suggests that if this stage fails then I should not have access to apks, but I can actually so I am assuming this is just because we are using x64 and renderdoc by default only supports arm?
when I launch the RenderDoc, it says: Unstable release version 1.9 just in case you need the version number.
however, it is connected with no problem, then I go and launch any app (such as the controller sample app) from the RenderDoc UI, the app is launched but it is waiting for the debugger and if I try to connect a debugger to it fails (I read here that renderdoc is don't work with android studio debugging)
sometimes the app doesn't wait for debugger and just crashes with the following log
I got this log by doing:
adb logcat | Select-String controller
I also want to mention that my personal app (not the controller sample) is receiving frames through network, so the app first configures the network and then it starts to render (so there might be some timeout issues, I am not sure, but the configuration should finish pretty quickly, within less than a second roughly)
I was expecting it to record some frames. but it is empty.
Thanks for letting us know, let me re-confer with our engineers and I'll report back asap.
When you receive the pop-up "Problems installing RenderDoc server" when you connect RenderDoc, are you still able to choose magicleap as a target?
Yes, even though it says there is a problem, it does connect because I see renderdoc.renderdoccmd.x64 is running as an app and the entire ML2 screen becomes the renderDoc Logo. So I assume this is related to the ABI (as we are x64 and only arm is supported on android? I am not sure)
But the app only crash if I am running renderDoc, it works normally without it.
Ok, thank you for your patience as we troubleshoot. Question from our engineer: Is the app debuggable? RenderDoc mostly only works if the app is debuggable (making it debuggable is by far the easiest way to get RenderDoc working).
Yes, the app is, debuggable, in fact if the app is not, renderdoc will give a warning about that.
Also, it is not just my app, the Controller Sample from the MagicLeap CAPI samples version 1.0 crashes with log from I posted above, and It works without an issue when I am not using renderDoc.If you need any further information, I will be glad to provide it.
Thank you for the log and your patience as we work through this. I spoke to our engineers and we looked at this specifically:
11-03 12:09:59.957 7744 7806 E com.magicleap.capi.sample.controller: ERR: DTM not supported for chosen image format
[format: 37, usage: 23].
11-03 12:10:00.220 7744 7806 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 7806
(Thread-3), pid 7744 (mple.controller)
We have experienced issues with DTM and RenderDoc. We're not certain the errors are related, but one thing to try is to disable DTM:
adb shell setprop persist.ml.dtm.enable_dtm_client 0
This may help you progress, but it may not solve your issue. However, we appreciate your valuable feedback and have logged this as an issue for further investigation on our part for improving this tool.
This command fails with the following message:
setprop: failed to set property 'persist.ml.dtm.enable_dtm_client' to '0'
Upon googling, I found some properties, requires root permission, so I tried running
adb root but I got the following message:
adbd cannot run as root in production builds
I tried this while connected via wifi and on USB cable.
both this and this suggested running
adb shell; su;
however, this returns:
su: inaccessible or not found
We appreciate your valuable feedback @a.al-darraji. Our engineers have logged your feedback as an issue for further investigation with RenderDoc and DTM. Thank you again for letting us know.
Since our engineering team has logged this issue, I'll close this post for now and will make sure you're updated on any fix that comes from this.