Open Bug 1935470 Opened 1 year ago Updated 4 months ago

Crash in [@ mozilla::dom::AndroidGamepadManager::NativeAddGamepad]

Categories

(Core :: DOM: Device Interfaces, defect, P3)

Unspecified
Android
defect

Tracking

()

Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox133 --- affected
firefox134 --- affected
firefox135 --- affected

People

(Reporter: aryx, Unassigned)

Details

(Keywords: crash)

Crash Data

Not a new signature. ~350 crashes from ~250 installs per release cycle on Android. The stacks are corrupted.

Crash report: https://crash-stats.mozilla.org/report/index/23a86244-8cdb-4b06-b1ce-edd1f0241204

MOZ_CRASH Reason:

MOZ_RELEASE_ASSERT(service)

Top 10 frames:

0  libxul.so  mozilla::dom::AndroidGamepadManager::NativeAddGamepad()  dom/gamepad/android/AndroidGamepad.cpp:32
1  libxul.so  mozilla::jni::NativeStub<mozilla::java::AndroidGamepadManager::NativeAddGamep...  widget/android/jni/Natives.h:1418
2  boot.oat  boot.oat@0x308548
3  ?  @0x0000503814e365bc
4  libart.so  libart.so@0x575f7c
5  libart.so  libart.so@0x57eaa4
6  boot.art]  boot.art]@0x65c33c
7  boot.oat  boot.oat@0x8fd574
8  boot.art]  boot.art]@0xc7203c
9  boot.art]  boot.art]@0xc1204

The severity field is not set for this bug.
:cmartin, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(cmartin)
Severity: -- → S3
Flags: needinfo?(cmartin)
Priority: -- → P3

This had a bit of a spike on Nightly, so I took a brief look. These crashes are all happening on the AndroidUI thread. NativeAddGamepad() is checking that the return value of GamepadPlatformService::GetParentService() is non-null.

That function can only return null in this part of the code:

  if (!gGamepadPlatformServiceSingleton) {
    // Only Background Thread can create new GamepadPlatformService instance.
    if (IsOnBackgroundThread()) {
      gGamepadPlatformServiceSingleton = new GamepadPlatformService();
    } else {
      return nullptr;
    }
  }

So, we haven't initialized the singleton yet, but we're not on the background thread, so we return null and then end up crashing.

You need to log in before you can comment on or make changes to this bug.