Closed Bug 1543363 Opened 5 years ago Closed 5 years ago

Assertion failure: tabParentWidget == aWidget, at dom/events/IMEStateManager.cpp:1674

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: tt, Assigned: hsivonen)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I'm not really sure which component I should put this bug on, so I leave it on Event for now.

While I tried to do some testing, my Nightly crashed:

Assertion failure: tabParentWidget == aWidget, at /Users/tomtung/Work/mozilla-central/dom/events/IMEStateManager.cpp:1674 │ 26716 MOZ_ASSERT(mJournalDirectory);
#01: mozilla::IMEStateManager::NotifyIME(mozilla::widget::IMENotification const&, nsIWidget*, mozilla::dom::TabParent*)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4a4ef│ 26717
2f] │ 26718 const int64_t fileId = aFileInfo->Id();
#02: mozilla::dom::TabParent::RecvNotifyIMEFocus(mozilla::ContentCache const&, mozilla::widget::IMENotification const&, std::__1::function<void (mozilla::widget::IMENotificationRequests const&)>&&)[/Users/tomtung│ 26719 MOZ_ASSERT(fileId > 0);
/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5b08fe5] │ 26720
#03: mozilla::dom::PBrowserParent::OnMessageReceived(IPC::Message const&)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x17c0834] │ 26721 nsCOMPtr<nsIFile> file =
#04: mozilla::dom::PContentParent::OnMessageReceived(IPC::Message const&)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x11738a4] │ 26722 mFileManager->GetFileForId(mJournalDirectory, fileId);
#05: mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0xf62385] │ 26723 return file.forget();
#06: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0xf608bf] │ 26724 }
#07: mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0xf613a5] │ 26725
#08: mozilla::ipc::MessageChannel::MessageTask::Run()[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0xf61a56] │ 26726 nsresult FileHelper::CreateFileFromStream(nsIFile* aFile, nsIFile* aJournalFile,
#09: nsThread::ProcessNextEvent(bool, bool*)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2b9cda] │ 26727 nsIInputStream* aInputStream,
#10: NS_ProcessPendingEvents(nsIThread*, unsigned int)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2b62f6] │ 26728 bool aCompress) {
#11: nsBaseAppShell::NativeEventCallback()[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x61818ce] │ 26729 MOZ_ASSERT(!IsOnBackgroundThread());
#12: nsAppShell::ProcessGeckoEvents(void*)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x62371d2] │ 26730 MOZ_ASSERT(aFile);
#13: CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x58475] │ 26731 MOZ_ASSERT(aJournalFile);
#14: __CFRunLoopDoSource0[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x5841b] │ 26732 MOZ_ASSERT(aInputStream);
#15: __CFRunLoopDoSources0[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x3beb5] │ 26733 MOZ_ASSERT(mFileManager);
#16: __CFRunLoopRun[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x3b45e] │ 26734 MOZ_ASSERT(mFileDirectory);
#17: CFRunLoopRunSpecific[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x3ad48] │ 26735 MOZ_ASSERT(mJournalDirectory);
#18: RunCurrentEventLoopInMode[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0xaab5] │ 26736
#19: ReceiveNextEventCommon[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0xa6f4] │ 26737 bool exists;
#20: _BlockUntilNextEventMatchingListInModeWithFilter[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0xa568] │ 26738 nsresult rv = aFile->Exists(&exists);
#21: _DPSNextEvent[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x1b363] │ 26739 if (NS_WARN_IF(NS_FAILED(rv))) {
#22: -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x1a102] │ 26740 return rv;
#23: -[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x6235a4c] │ 26741 }
#24: -[NSApplication run][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x14165] │ 26742
#25: nsAppShell::Run()[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x6237ed7] │ 26743 // DOM blobs that are being stored in IDB are cached by calling
#26: nsAppStartup::Run()[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x8c0412b] │ 26744 // IDBDatabase::GetOrCreateFileActorForBlob. So if the same DOM blob is stored
#27: XREMain::XRE_mainRun()[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x8ec258a] │ 26745 // again under a different key or in a different object store, we just add
#28: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x8ec371d] │ 26746 // a new reference instead of creating a new copy (all such stored blobs share
[Parent 69829, Compositor] WARNING: Mask layer with no compositable host: file /Users/tomtung/Work/mozilla-central/gfx/layers/composite/LayerManagerComposite.cpp, line 1269 │ 26747 // the same id).
#29: XRE_main(int, char**, mozilla::BootstrapConfig const&)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x8ec3ecc] │ 26748 // However, it can happen that CreateFileFromStream failed due to quota
#30: mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/XUL +0x8eda897] │ 26749 // exceeded error and for some reason the orphaned file couldn't be deleted
#31: do_main(int, char**, char**)[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/firefox +0x1266] │ 26750 // immediately. Now, if the operation is being repeated, the DOM blob is
#32: main[/Users/tomtung/Work/mozilla-central/objdir/dist/NightlyDebug.app/Contents/MacOS/firefox +0xd08]

The STR:

  1. Open a Nightly debug build
  2. Downland an add-on (e.g. install Simple Tab Group from AMO (https://addons.mozilla.org/en-US/firefox/addon/simple-tab-groups/))
  3. Click the add-on on the toolbar
  4. Hit the assertion [1]

[1] https://searchfox.org/mozilla-central/rev/dd7e27f4a805e4115d0dbee70e1220b23b23c567/dom/events/IMEStateManager.cpp#1674

Component: DOM: Events → User events and focus handling
Flags: needinfo?(hsivonen)
Priority: -- → P1
Regressed by: 1524975
Keywords: regression

Reproduces on Linux.

I also see

[Parent 9120, Main Thread] ###!!! ASSERTION: Creating widget for MenuPopupFrame with children: '!mGeneratedChildren && !PrincipalChildList().FirstChild()', file /opt/Projects/gecko/layout/xul/nsMenuPopupFrame.cpp, line 258

prior to the crash.

This is a mismatch between TabParent::GetWidget() and TabParent::GetDocWidget().

These correspond to the pop-up and the main window.

Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Flags: needinfo?(hsivonen)
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/361eca0b25e5
Use TabParent::GetWidget() for IME purposes. r=masayuki
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1564639
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: