fix(android): Prevent startup crash by robustly loading rulesets and native libs - #87
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
osu.Android.Native) in atry-catchblock withinOsuGameActivity.OnCreate. This prevents the application from crashing immediately if the native library (containing Oboe/Vulkan drivers) fails to load (e.g.,UnsatisfiedLinkError). The app can now proceed, and specific drivers will gracefully fail later if enabled.Assembly.Load("...")withAssembly.Load(typeof(...).Assembly.FullName)wrapped intry-catch.typeof()creates a strong static reference to the ruleset types (OsuRuleset,TaikoRuleset, etc.), ensuring the Xamarin/Android linker does not strip these assemblies in Release builds. This is a common cause of "crash on startup" in deployed APKs.Window,WindowManager, andResourcesinOnCreatebefore accessing their properties, replacingDebug.Assertwhich is removed in Release builds.handleImportFromUrisasync task body in atry-catchblock to prevent unobserved task exceptions from crashing the process.These changes collectively address the reported "crash on open" issue on the S23 Ultra by handling the most likely causes: stripped assemblies and native library loading failures.
PR created automatically by Jules for task 8348821197718379664 started by @winnerspiros