Closed Bug 180640 Opened 23 years ago Closed 23 years ago

Dragging selection in URL bar crashes mozilla

Categories

(Core :: XUL, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 184230

People

(Reporter: david, Assigned: hewitt)

Details

(Keywords: crash)

Attachments

(1 file)

Build from the tip as of 14th November, 6pm +930 When you select part or or all of the text in the URL bar, and then try and move it (eg. click on the selection and drag the mouse) mozilla dies. Stack trace to follow. -dave
Unhandled exception at 0x1005c542 in mozilla.exe: 0xC0000005: Access violation writing location 0x010cfe1f. call stack: > xpcom.dll!1005c542() 696e752f() Well that doesn't exactly help much! Symbols would make this much nicer i think - though i'm not sure they can be produced with an optimised build? For what it's worth, here is the disassembly: 1005C53D mov eax,dword ptr [esi+4] 1005C540 mov ecx,dword ptr [esi] >>1005C542 mov byte ptr [eax+ecx],0 1005C546 mov eax,edi 1005C548 pop edi 1005C549 pop esi 1005C54A pop ebx 1005C54B ret 4 If i can figure out how to generate symbols too, then i'll add more info. -dave
yes, symbols are welcome. Otherwise, download a Talkback-enabled build and report Talkback ID for the crash here.
Keywords: crash, stackwanted
Ok.. used MOZ_PROFILE=1 and a tweak to config.mk to get MSVC to do the right thing (using Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.00.9466 for 80x86 == VS.NET) call stack: > xpcom.dll!AddNullTerminator(nsStr & aDest={...}) Line 350 C++ xpcom.dll!nsCAutoString::nsCAutoString(const CBufDescriptor & aBuffer= {...}) Line 1267 + 0x6 C++ gkwidget.dll!nsClipboard::GetFormat(const char * aMimeStr=0x01489e3c) Line 103 C++ gkwidget.dll!nsDragService::IsCollectionObject(IDataObject * inDataObj=0x02c56a38) Line 355 C++ gkwidget.dll!nsDragService::IsDataFlavorSupported(const char * aDataFlavor=0x01100f94, int * _retval=0x0012e574) Line 288 + 0xd C++ editor.dll!nsTextEditorDragListener::DragOver(nsIDOMEvent * aDragEvent=0x02c4ce00) Line 697 C++ editor.dll!nsTextEditorDragListener::DragEnter(nsIDOMEvent * aDragEvent=0x02c4ce00) Line 673 C++ gkcontent.dll!nsEventListenerManager::HandleEvent(nsIPresContext * aPresContext=, nsEvent * aEvent=, nsIDOMEvent * * aDOMEvent=, nsIDOMEventTarget * aCurrentTarget=, unsigned int aFlags=, nsEventStatus * aEventStatus=) Line 2010 C++ gkcontent.dll!nsGenericElement::HandleDOMEvent(nsIPresContext * aPresContext=, nsEvent * aEvent=, nsIDOMEvent * * aDOMEvent=, unsigned int aFlags=, nsEventStatus * aEventStatus=) Line 2094 C++ gkcontent.dll!nsHTMLInputElement::HandleDOMEvent(nsIPresContext * aPresContext=0x00da9af0, nsEvent * aEvent=0x0012ece8, nsIDOMEvent * * aDOMEvent=0x0012eb04, unsigned int aFlags=2, nsEventStatus * aEventStatus=0x0012ec40) Line 1427 C++ gkcontent.dll!nsGenericElement::HandleDOMEvent(nsIPresContext * aPresContext=, nsEvent * aEvent=, nsIDOMEvent * * aDOMEvent=, unsigned int aFlags=, nsEventStatus * aEventStatus=) Line 2124 C++ gkcontent.dll!nsGenericDOMDataNode::HandleDOMEvent(nsIPresContext * aPresContext=0x00da9af0, nsEvent * aEvent=0x0012ece8, nsIDOMEvent * * aDOMEvent=0x0012eb04, unsigned int aFlags=0, nsEventStatus * aEventStatus=0x0012ec40) Line 834 + 0x19 C++ gklayout.dll!PresShell::HandleEventInternal(nsEvent * aEvent=0x00000000, nsIView * aView=0x02c92908, unsigned int aFlags=45624496, nsEventStatus * aStatus=0x0012ec40) Line 6216 + 0x14 C++ gklayout.dll!PresShell::HandleEvent(nsIView * aView=0x02c92908, nsGUIEvent * aEvent=0x0012ece8, nsEventStatus * aEventStatus=0x0012ec40, int aForceHandle=0, int & aHandled=1) Line 6133 + 0x13 C++ gkview.dll!nsViewManager::HandleEvent(nsView * aView=, nsGUIEvent * aEvent=, int aCaptured=) Line 2209 C++ gkview.dll!nsView::HandleEvent(nsViewManager * aVM=0x00d8a308, nsGUIEvent * aEvent=0x0012ece8, int aCaptured=0) Line 304 C++ gkview.dll!nsViewManager::DispatchEvent(nsGUIEvent * aEvent=0x3d888889, nsEventStatus * aStatus=0x0012ecb4) Line 1943 + 0x14 C++ gkview.dll!HandleEvent(nsGUIEvent * aEvent=0x0012ece8) Line 83 C++ gkwidget.dll!nsWindow::DispatchEvent(nsGUIEvent * event=0x00da9e54, nsEventStatus & aStatus=14327564) Line 1073 C++ user32.dll!77d46b2e() gkwidget.dll!nsNativeDragTarget::ProcessDrag(IDataObject * pData=0x00000002, unsigned int aEventType=1400, unsigned long grfKeyState=13588644, _POINTL pt={...}, unsigned long * pdwEffect=0x0012eef4) Line 234 C++ gkwidget.dll!nsNativeDragTarget::DragEnter(IDataObject * pIDataSource=0x02c56a38, unsigned long grfKeyState=1, _POINTL pt={...}, unsigned long * pdwEffect=0x0012eef4) Line 275 C++ ole32.dll!772ac01a() ole32.dll!772ac15f() ole32.dll!7728ca82() ole32.dll!7728ccb8() ole32.dll!7728cdb8() gkwidget.dll!nsDragService::StartInvokingDragSession(IDataObject * aDataObj=0x02c56a38, unsigned int aActionType=3) Line 164 C++ gkwidget.dll!nsDragService::InvokeDragSession(nsIDOMNode * aDOMNode=0x02c568d8, nsISupportsArray * anArrayTransferables=0x02c568d8, nsIScriptableRegion * aRegion=0x00000001, unsigned int aActionType=3) Line 130 + 0xf C++ editor.dll!nsPlaintextEditor::DoDrag(nsIDOMEvent * aDragEvent=) Line 525 C++ editor.dll!nsTextEditorDragListener::DragGesture(nsIDOMEvent * aDragEvent=0x02c4ce60) Line 663 + 0xf C++ gkcontent.dll!nsEventListenerManager::HandleEvent(nsIPresContext * aPresContext=, nsEvent * aEvent=, nsIDOMEvent * * aDOMEvent=, nsIDOMEventTarget * aCurrentTarget=, unsigned int aFlags=, nsEventStatus * aEventStatus=) Line 2007 C++ gkcontent.dll!nsGenericElement::HandleDOMEvent(nsIPresContext * aPresContext=, nsEvent * aEvent=, nsIDOMEvent * * aDOMEvent=, unsigned int aFlags=, nsEventStatus * aEventStatus=) Line 2094 C++ gkcontent.dll!nsHTMLInputElement::HandleDOMEvent(nsIPresContext * aPresContext=0x00da9af0, nsEvent * aEvent=0x0012f698, nsIDOMEvent * * aDOMEvent=0x0012f660, unsigned int aFlags=2, nsEventStatus * aEventStatus=0x0012f6e8) Line 1427 C++ gkcontent.dll!nsGenericElement::HandleDOMEvent(nsIPresContext * aPresContext=, nsEvent * aEvent=, nsIDOMEvent * * aDOMEvent=, unsigned int aFlags=, nsEventStatus * aEventStatus=) Line 2124 C++ gkcontent.dll!nsGenericDOMDataNode::HandleDOMEvent(nsIPresContext * aPresContext=0x00da9af0, nsEvent * aEvent=0x0012f698, nsIDOMEvent * * aDOMEvent=0x0012f660, unsigned int aFlags=0, nsEventStatus * aEventStatus=0x0012f6e8) Line 834 + 0x19 C++ gkcontent.dll!nsEventStateManager::GenerateDragGesture(nsIPresContext * aPresContext=0x00da9af0, nsGUIEvent * aEvent=0x02b82cb0) Line 1450 C++ gkcontent.dll!nsEventStateManager::PreHandleEvent(nsIPresContext * aPresContext=, nsEvent * aEvent=, nsIFrame * aTargetFrame=, nsEventStatus * aStatus=, nsIView * aView=) Line 402 C++ gklayout.dll!PresShell::HandleEventInternal(nsEvent * aEvent=0x00000000, nsIView * aView=0x02c92908, unsigned int aFlags=1, nsEventStatus * aStatus=0x0012f944) Line 6207 C++ gklayout.dll!PresShell::HandleEvent(nsIView * aView=0x02c92908, nsGUIEvent * aEvent=0x0012fa08, nsEventStatus * aEventStatus=0x0012f944, int aForceHandle=1, int & aHandled=1) Line 6133 + 0x13 C++ gkview.dll!nsViewManager::HandleEvent(nsView * aView=, nsGUIEvent * aEvent=, int aCaptured=) Line 2209 C++ gkview.dll!nsView::HandleEvent(nsViewManager * aVM=0x00d8a308, nsGUIEvent * aEvent=0x0012fa08, int aCaptured=1) Line 304 C++ gkview.dll!nsViewManager::DispatchEvent(nsGUIEvent * aEvent=0x3d888889, nsEventStatus * aStatus=0x0012f9b8) Line 1943 + 0x14 C++ gkview.dll!HandleEvent(nsGUIEvent * aEvent=0x0012fa08) Line 83 C++ gkwidget.dll!nsWindow::DispatchEvent(nsGUIEvent * event=0x0012fa08, nsEventStatus & aStatus=nsEventStatus_eIgnore) Line 1073 C++ gkwidget.dll!nsWindow::DispatchWindowEvent(nsGUIEvent * event=0x00000000) Line 1090 C++ gkwidget.dll!nsWindow::DispatchMouseEvent(unsigned int aEventType=, unsigned int wParam=, nsPoint * aPoint=) Line 5283 C++ gkwidget.dll!ChildWindow::DispatchMouseEvent(unsigned int aEventType=300, unsigned int wParam=1, nsPoint * aPoint=0x00000000) Line 5537 + 0x13 C++ gkwidget.dll!nsWindow::ProcessMessage(unsigned int msg=, unsigned int wParam=, long lParam=, long * aRetValue=) Line 4000 C++ gkwidget.dll!nsWindow::WindowProc(HWND__ * hWnd=0x0017065c, unsigned int msg=0, unsigned int wParam=1, long lParam=14327380) Line 1338 + 0x10 C++ user32.dll!77d43a68() user32.dll!77d43b37() user32.dll!77d43d91() user32.dll!77d43df7() appshell.dll!nsAppShellService::Run() Line 472 C++ mozilla.exe!main1(int argc=, char * * argv=, nsISupports * nativeApp=) Line 1540 + 0x9 C++ mozilla.exe!main(int argc=1, char * * argv=0x00372758) Line 1901 + 0x18 C++ mozilla.exe!WinMain(HINSTANCE__ * __formal=0x00400000, HINSTANCE__ * __formal=0x00400000, char * args=0x0015233e, HINSTANCE__ * __formal=0x00400000) Line 1923 + 0x17 C++ mozilla.exe!WinMainCRTStartup() Line 392 + 0xf C kernel32.dll!77e814c7() Line 350 is highlighted here (from nsstr.h) inline void AddNullTerminator(nsStr& aDest) { if(eTwoByte==aDest.GetCharSize()) aDest.mUStr[aDest.mLength]=0; ****** else aDest.mStr[aDest.mLength]=0; } I'm going to try and run this in Purify and see if I can find out anymore. -dave
Keywords: stackwanted
WFM Win2k current cvs trunk
When it crashes, these are the values: aDest.mStr 0x01019e3c "Mozilla/IDataObjectCollectionFormat" aDest.mLength 35 So it is trying to set aDest.mStr[35] = 0. [34] is the 't' at the end of Format. It almost looks like there isn't an extra space at the end for the null character? Note, i'm compiling with VC.NET, and have enabled /GF (read-only string pooling), so that could be a clue. (No joy with Purify - i'm getting an error about relocating USER32.DLL which i've been seeing for a while - might give Rational a call about that one) -dave
I figured out that the problem seems to be the use of the NS_CONST_CAST directive in widget/src/windows/nsClipboard.cpp. This is causing the nsCAutoString to be created as a non-readonly string, and then of course it blows up when it attempts to modify the string. -dave
Changing component to XP toolkit/widgets as that is where I think the bug is. -dave
Component: URL Bar → XP Toolkit/Widgets
I could be picky and say that 184230 is a dup of 180640, but looks like the newer bug has been checked in. oh well - at least it's been fixed either way. -dave *** This bug has been marked as a duplicate of 184230 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: