Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix huawei crash #3323

Merged
merged 1 commit into from
May 22, 2024
Merged

fix huawei crash #3323

merged 1 commit into from
May 22, 2024

Conversation

YaoTouGe
Copy link
Contributor

Description

Hi baldurk!

I was trying to make renderdoc working on Huawei devices again in the last few days.

On Huawei mobile phone with HarmonyOS, it seems to crash when renderdoccmd's native activity is starting up and with weird crash stack says drawable icon resource is not found as described in #3091

It seems to be caused by the title bar which is trying to load icon but failed on Huawei device only for some reason. I'm not an android expert but after trying various ways, it may be fixed by specify the activity style to NoTiltleBar.

I know this is a device specific problem which is annoying, maybe Huawei should fix this problem, but it's hard to make them realize this problem I guess.

Really hope I can use renderdoc on Huawei devices again :)

@cmannett85-arm
Copy link
Contributor

Have you tried with just android:theme="@android:style/Theme.NoTitleBar (i.e. no Translucent part)? Different Android spins react to this theme in slightly different ways, so we need to minimise the changes.

@baldurk
Copy link
Owner

baldurk commented May 21, 2024

Yeh I don't mind adding a workaround for broken devices in principle, but it needs to be non-invasive (which this is) and have minimal or zero impact on working devices. Can you clarify exactly what changes with this PR? On your device I know there's no comparison exactly if it crashed before, but what about on a working device?

@YaoTouGe
Copy link
Contributor Author

@cmannett85-arm I have tried android:theme="@android:style/Theme.NoTitleBar, it also works and I have changed my commit.

@YaoTouGe
Copy link
Contributor Author

@baldurk What I'm changing is the theme style of android server app (renderdoccmd) which is responsible for instrumenting graphics api so renderdoc can capture and replay on android device.

Currently on Harmony OS devices, when renderdoc is launching the server app, it will crash and says it can't find the drawable icon resource so launch failed, and renderdoc can't be used on these devices.

After trying some methods, I found that if I set the android theme style to NoTitleBar, this problem is fixed. So I suspect that some thing is wrong on Harmony OS when loading icon resource for the app title bar. But actually renderdoccmd is a full screen app and it seems have no tiltle bar at all on other working android devices, so I think this style change is fine for devices which is already working correctly.

I have also tested this change on a few other android devices, they are still working correctly not been affected by this change.

@baldurk baldurk merged commit 4725b73 into baldurk:v1.x May 22, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants