Open Bug 1903699 Opened 9 months ago Updated 4 days ago

Assertion failure: !aTime->mTimeStamp.IsNull(), at BasicEvents.h:421

Categories

(Core :: DOM: Events, defect)

Unspecified
Android
defect

Tracking

()

REOPENED
Tracking Status
firefox127 --- affected
firefox128 --- affected
firefox129 --- affected

People

(Reporter: cpeterson, Unassigned)

References

(Depends on 1 open bug, )

Details

(Whiteboard: [sp3])

Steps to reproduce:

  1. Run a debug GeckoViewExample (or Fenix) build in the Android emulator.
  2. Load the following Samsung page: https://www.samsung.com.cn/smartphones/galaxy-s23-ultra/
  3. Scroll up and down the page using swipe gestures. I'm using the touchpad scroll gestures on my MacBook.
  4. GeckoViewExample crashes with the following assertion failure in adb logcat:

MOZ_Assert: [5479] Assertion failure: !aTime->mTimeStamp.IsNull(), at obj-aarch64-unknown-linux-android/dist/include/mozilla/BasicEvents.h:421

https://searchfox.org/mozilla-central/rev/058b47cf516776bc95f938a1aaf3a80466b7e39e/widget/BasicEvents.h#421

Note that I also hit APZ assertion failure bug 1852854 on this same page, so I had to comment out that bug's MOZ_ASSERT_UNREACHABLE.

See Also: → 1852854

Do you have stack trace when you hit the assertion failure? It's a bug of the creator of the instance.

Flags: needinfo?(cpeterson)
Whiteboard: [sp3]

I'm no longer able to reproduce this assertion failure. I don't know if our code changed or the site changed. I'll close this bug as WFM for now.

Status: NEW → RESOLVED
Closed: 9 months ago
Flags: needinfo?(cpeterson)
Resolution: --- → WORKSFORME

Reopening since I can reproduce the assertion reliably. The STR;

  1. Open https://ro.pinterest.com/ on a debug GeckoView example
  2. You will see google login dialog
  3. Close the dialog by clicking [x]
02-28 09:03:57.210  3547  3563 F MOZ_Assert: #01: mozilla::WidgetEventTime::WidgetEventTime(mozilla::WidgetEventTime const*) (/home/hiro/android/obj-x86_64-unknown-linux-android/dist/include/mozilla/BasicEvents.h:421)
02-28 09:03:57.210  3547  3563 F MOZ_Assert: #02: mozilla::WidgetEvent::WidgetEvent(bool, mozilla::EventMessage, mozilla::EventClassID, mozilla::WidgetEventTime const*) (/home/hiro/android/obj-x86_64-unknown-linux-android/dist/include/mozilla/BasicEvents.h:506)
02-28 09:03:57.210  3547  3563 F MOZ_Assert: #03: mozilla::WidgetTouchEvent::Duplicate() const (/home/hiro/android/obj-x86_64-unknown-linux-android/dist/include/mozilla/TouchEvents.h:197)
02-28 09:03:57.210  3547  3563 F MOZ_Assert: #04: nsBaseWidget::ProcessUntransformedAPZEvent(mozilla::WidgetInputEvent*, mozilla::layers::APZEventResult const&) (/home/hiro/android/widget/nsBaseWidget.cpp:1081)
02-28 09:03:57.210  3547  3563 F MOZ_Assert: #05: mozilla::widget::NPZCSupport::InputEvent<mozilla::widget::NPZCSupport::FinishHandlingMotionEvent(mozilla::MultiTouchInput&&, mozilla::jni::LocalRef<mozilla::java::GeckoResult>&&)::{lambda(nsWindow*)#1}>::Run() (/home/hiro/android/widget/android/nsWindow.cpp:261)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #06: nsAppShell::ProcessNextNativeEvent(bool) (/home/hiro/android/widget/android/nsAppShell.cpp:673)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #07: nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal*, bool) (/home/hiro/android/widget/nsBaseAppShell.cpp:250)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #08: {virtual override thunk({offset(-8)}, nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal*, bool))} (/home/hiro/android/widget/nsBaseAppShell.cpp:0)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #09: nsThread::ProcessNextEvent(bool, bool*) (/home/hiro/android/xpcom/threads/nsThread.cpp:1101)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #10: NS_ProcessNextEvent(nsIThread*, bool) (/home/hiro/android/xpcom/threads/nsThreadUtils.cpp:480)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #11: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (/home/hiro/android/ipc/glue/MessagePump.cpp:86)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #12: MessageLoop::Run() (/home/hiro/android/ipc/chromium/src/base/message_loop.cc:345)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #13: nsBaseAppShell::Run() (/home/hiro/android/widget/nsBaseAppShell.cpp:150)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #14: nsAppStartup::Run() (/home/hiro/android/toolkit/components/startup/nsAppStartup.cpp:292)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #15: XREMain::XRE_mainRun() (/home/hiro/android/toolkit/xre/nsAppRunner.cpp:5866)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #16: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) (/home/hiro/android/toolkit/xre/nsAppRunner.cpp:6107)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #17: XRE_main(int, char**, mozilla::BootstrapConfig const&) (/home/hiro/android/toolkit/xre/nsAppRunner.cpp:6179)
02-28 09:03:57.211  3547  3563 F MOZ_Assert: #18: Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun (/home/hiro/android/mozglue/android/APKOpen.cpp:423)
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Then, the source touch event's timestamp is null. I checked briefly of the constructor of TouchInput which may create a WidgetTouchEvent, then, I found these constructions.
https://searchfox.org/mozilla-central/rev/63ee2f21e89042133837bff57786a768462d696a/gfx/layers/apz/src/GestureEventListener.cpp#80-81

I wonder, these ToWidgetEvent() methods should do as the following?

if (!this->mTimeStamp.IsNull()) {
  event.mTimeStamp = this->mTimeStamp;
}
Flags: needinfo?(hikezoe.birchill)
Depends on: 1951315

Okay, the unexpected mTimeStamp comes from this SendReceiveMultiTouchInputEvent IPC call.

In the pinterest.com case, there's another assertion (bug 1949319), thus the GPU process crashes, then the IPC call is not processed properly so that we get an unexpected event data with the null timestamp.

I filed bug 1951315.

Flags: needinfo?(hikezoe.birchill)
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.