Closed Bug 81926 Opened 23 years ago Closed 23 years ago

mozilla crashes when moving (draging with a mouse) letter from one subfolder to another

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: zappa, Assigned: blizzard)

References

Details

(Keywords: crash, regression)

in build 2001052021
when i'm trying to drag a letter from one imap subfolder to subfolder in local
mailbox mozilla crashes without any messages
Using Linux Build ID: 2001052021, accessing IMAP server, I get similar behavior,
but more drastic. Any drag attempt from any folder crashes Moz immediately upon
moving the pointer with button 1 pressed. The dragging file icon never appears.
Only a segmentation fault message appears on the console.
This is also happening for me on linux build 2001052105 on a pop3 account. This
not solely IMAP related.
over to naving to investigate.
Assignee: sspitzer → naving
I also got a crash on a POP account.

#0  0x8700291 in ?? ()
#1  0x8700288 in ?? ()
#2  0x400df50c in nsGenericFactory::CreateInstance ()
   from /home/mozilla/dist/bin/libxpcom.so
#3  0x400dc21a in nsComponentManagerImpl::CreateInstance ()
   from /home/mozilla/dist/bin/libxpcom.so
#4  0x400e6c3e in nsComponentManager::CreateInstance ()
   from /home/mozilla/dist/bin/libxpcom.so
#5  0x406a70a6 in nsJSCID::CreateInstance ()
   from /home/mozilla/dist/bin/components/libxpconnect.so
#6  0x4010f6b9 in XPTC_InvokeByIndex () from /home/mozilla/dist/bin/libxpcom.so
#7  0x406b7340 in XPCWrappedNative::CallMethod ()
   from /home/mozilla/dist/bin/components/libxpconnect.so
#8  0x406bf480 in XPC_WN_CallMethod ()
   from /home/mozilla/dist/bin/components/libxpconnect.so
#9  0x401a23c4 in js_Invoke () from /home/mozilla/dist/bin/libmozjs.so
#10 0x401ad092 in js_Interpret () from /home/mozilla/dist/bin/libmozjs.so
#11 0x401a2423 in js_Invoke () from /home/mozilla/dist/bin/libmozjs.so
#12 0x401a264f in js_InternalInvoke () from /home/mozilla/dist/bin/libmozjs.so
#13 0x40183c5b in JS_CallFunctionValue ()
   from /home/mozilla/dist/bin/libmozjs.so
#14 0x42282be9 in nsJSContext::CallEventHandler ()
   from /home/mozilla/dist/bin/components/libjsdom.so
#15 0x422c65a7 in nsJSEventListener::HandleEvent ()
   from /home/mozilla/dist/bin/components/libjsdom.so
#16 0x4104287c in nsEventListenerManager::HandleEventSubType ()
   from /home/mozilla/dist/bin/components/libgkcontent.so
#17 0x410455ff in nsEventListenerManager::HandleEvent ()
   from /home/mozilla/dist/bin/components/libgkcontent.so
#18 0x4117abe9 in nsXULElement::HandleDOMEvent ()
   from /home/mozilla/dist/bin/components/libgkcontent.so
#19 0x4117ae2a in nsXULElement::HandleDOMEvent ()
   from /home/mozilla/dist/bin/components/libgkcontent.so
#20 0x4117ae2a in nsXULElement::HandleDOMEvent ()
   from /home/mozilla/dist/bin/components/libgkcontent.so
#21 0x4117ae2a in nsXULElement::HandleDOMEvent ()
   from /home/mozilla/dist/bin/components/libgkcontent.so
#22 0x4104bdfc in nsEventStateManager::GenerateDragGesture ()
   from /home/mozilla/dist/bin/components/libgkcontent.so
#23 0x41048241 in nsEventStateManager::PreHandleEvent ()
   from /home/mozilla/dist/bin/components/libgkcontent.so
#24 0x4154da5f in PresShell::HandleEventInternal ()
   from /home/mozilla/dist/bin/components/libgklayout.so
#25 0x4154d76d in PresShell::HandleEvent ()
   from /home/mozilla/dist/bin/components/libgklayout.so
#26 0x40dedadf in nsView::HandleEvent ()
   from /home/mozilla/dist/bin/components/libgkview.so
#27 0x40deda5d in nsView::HandleEvent ()
   from /home/mozilla/dist/bin/components/libgkview.so
#28 0x40df91bc in nsViewManager::DispatchEvent ()
   from /home/mozilla/dist/bin/components/libgkview.so
#29 0x40ded16b in _init () from /home/mozilla/dist/bin/components/libgkview.so
#30 0x40e427c9 in nsWidget::DispatchEvent ()
   from /home/mozilla/dist/bin/components/libwidget_gtk.so
#31 0x40e42559 in nsWidget::DispatchWindowEvent ()
   from /home/mozilla/dist/bin/components/libwidget_gtk.so
#32 0x40e42851 in nsWidget::DispatchMouseEvent ()
   from /home/mozilla/dist/bin/components/libwidget_gtk.so
#33 0x40e42d7d in nsWidget::OnMotionNotifySignal ()
   from /home/mozilla/dist/bin/components/libwidget_gtk.so
#34 0x40e487ca in nsWindow::HandleGDKEvent ()
   from /home/mozilla/dist/bin/components/libwidget_gtk.so
#35 0x40e3c72a in handle_gdk_event ()
   from /home/mozilla/dist/bin/components/libwidget_gtk.so
#36 0x40e3c35d in handle_gdk_event ()
   from /home/mozilla/dist/bin/components/libwidget_gtk.so
#37 0x4039b53b in gdk_event_dispatch () from /usr/lib/libgdk-1.2.so.0
#38 0x403cb1b6 in g_main_dispatch (dispatch_time=0xbffff78c) at gmain.c:656
#39 0x403cb781 in g_main_iterate (block=1, dispatch=1) at gmain.c:877
#40 0x403cb921 in g_main_run (loop=0x81528d0) at gmain.c:935
#41 0x402ef7b9 in gtk_main () from /usr/lib/libgtk-1.2.so.0
#42 0x40e314be in nsAppShell::Run ()
   from /home/mozilla/dist/bin/components/libwidget_gtk.so
#43 0x41af49b8 in nsAppShellService::Run ()
   from /home/mozilla/dist/bin/components/libnsappshell.so
#44 0x80535fe in NS_CreateNativeAppSupport ()
#45 0x80541e9 in main ()
#46 0x404cc9db in __libc_start_main (main=0x8054070 <main>, argc=1, 
    argv=0xbffff994, init=0x804d304 <_init>, fini=0x8059b14 <_fini>, 
    rtld_fini=0x4000ae90 <_dl_fini>, stack_end=0xbffff98c)
    at ../sysdeps/generic/libc-start.c:92
Severity: normal → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
esther->sheelar
QA Contact: esther → sheelar
*** Bug 81968 has been marked as a duplicate of this bug. ***
possible problem with scriptable regions on linux?
By using an nsCOMPtr we were releasing the newly created object and then calling
AddRef() an an already released object.  Here's the fix.  Looking for
review/super-review.

Index: nsGfxFactoryGTK.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/gtk/nsGfxFactoryGTK.cpp,v
retrieving revision 1.34
diff -u -r1.34 nsGfxFactoryGTK.cpp
--- nsGfxFactoryGTK.cpp 2001/05/18 23:31:59     1.34
+++ nsGfxFactoryGTK.cpp 2001/05/21 21:13:17
@@ -77,9 +77,10 @@
   // create an nsRegionGtk and get the scriptable region from it
   nsCOMPtr <nsIRegion> rgn;
   NS_NEWXPCOM(rgn, nsRegionGTK);
+  nsCOMPtr<nsIScriptableRegion> scriptableRgn;
   if (rgn != nsnull)
   {
-    nsCOMPtr<nsIScriptableRegion> scriptableRgn = new nsScriptableRegion(rgn);
+    scriptableRgn = new nsScriptableRegion(rgn);
     inst = scriptableRgn;
   }
   if (!inst)
@@ -88,6 +89,9 @@
     return rv;
   }
   NS_ADDREF(inst);
+  // release our variable above now that we have created our owning
+  // reference - we don't want this to go out of scope early!
+  scriptableRgn = nsnull;
   rv = inst->QueryInterface(aIID, aResult);
   NS_RELEASE(inst);
 
Priority: -- → P1
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9.1
It is crashing in NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports
*aOuter, REFNSIID aIID, void **aResult) when it trying to addref inst 
NS_ADDREF(inst) :line 90. 

blizzard, any ideas why it is crashing here ?

Priority: P1 → --
Whiteboard: [nsbeta1+]
Target Milestone: mozilla0.9.1 → ---
r=naving
thanks for the patch blizzard.

how do the other factories look?  that problem might be in some of the other 
gfx factories.

Xlib, QT, OS/2, Photon.  (win32 and mac seem to be ok)
sr=sspitzer

hand the bug over to blizzard.

cc mkaply as there might be an OS/2 change required.
Assignee: naving → blizzard
The fix for OS/2 is exactly the same. I have it ready to go. Thanks for the 
heads up.
Checked in.  Thanks, guys!
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 81868 has been marked as a duplicate of this bug. ***
verified using commercial trunk buildid 2001052908 linux RH 6.2, Gnome 1.0.55
D&D - single message, multiple messages(continous and non continous selection)
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.