Closed Bug 255660 Opened 20 years ago Closed 13 years ago

assert when trying to paste and clipboard is empty: nsMemoryImpl::Alloc of 0: 'size', file nsMemoryImpl.cpp line 324

Categories

(SeaMonkey :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: csthomas, Unassigned)

Details

(Whiteboard: [SmBugEvent])

Attachments

(2 files)

###!!! ASSERTION: nsMemoryImpl::Alloc of 0: 'size', file
d:/cvs-1.11.5/mozilla/xpcom/base/nsMemoryImpl.cpp, line 324
NTDLL! DbgBreakPoint address 0x77f75a58
nsDebug::Assertion(const char * 0x0161a6b4 `string', const char * 0x016048c4
`string', const char * 0x0161a1f4 `string', int 2123) line 109
DocumentViewerImpl::Paste(DocumentViewerImpl * const 0x02db47ec) line 2123 + 26
bytes
nsClipboardPasteCommand::DoClipboardCommand(nsClipboardPasteCommand * const
0x009c4830, const char * 0x0012e5e8, nsIContentViewerEdit * 0x02db47ec,
nsICommandParams * 0x00000000) line 568
nsClipboardBaseCommand::DoCommand(nsClipboardBaseCommand * const 0x009f43e8,
const char * 0x0012e5e8, nsISupports * 0x02c000bc) line 448 + 17 bytes
nsControllerCommandTable::DoCommand(nsControllerCommandTable * const 0x009f30e8,
const char * 0x0012e5e8, nsISupports * 0x02c000bc) line 191 + 13 bytes
nsBaseCommandController::DoCommand(nsBaseCommandController * const 0x02b38068,
const char * 0x0012e5e8) line 131 + 55 bytes
nsXBLPrototypeHandler::ExecuteHandler(nsXBLPrototypeHandler * const 0x009c4830,
nsIDOMEventReceiver * 0x0012e5e8, nsIDOMEvent * 0x02c2b180) line 349
nsXBLWindowHandler::WalkHandlersInternal(nsXBLWindowHandler * const 0x009c4830,
nsIDOMEvent * 0x02c2b180, nsIAtom * 0x00944d58, nsXBLPrototypeHandler *
0x00000000) line 325
nsXBLWindowKeyHandler::WalkHandlers(nsXBLWindowKeyHandler * const 0x01bf8408,
nsIDOMEvent * 0x02c2b180, nsIAtom * 0x00944d58) line 161
nsXBLWindowKeyHandler::KeyPress(nsXBLWindowKeyHandler * const 0x01bf8408,
nsIDOMEvent * 0x02c2b180) line 177
DispatchToInterface(nsIDOMEvent * 0x02c2b180, nsIDOMEventListener * 0x01bf8408,
unsigned int (nsIDOMEvent *)* 0x01358d43 `vcall'(nsIDOMEvent *), const nsID &
{...}, int * 0x0012e8c4) line 128 + 18 bytes
nsEventListenerManager::HandleEvent(nsEventListenerManager * const 0x01ba1b48,
nsPresContext * 0x00000001, nsEvent * 0x00000001, nsIDOMEvent * * 0x0012f728,
nsIDOMEventTarget * 0x00a19268, unsigned int 514, nsEventStatus * 0x0012f8a0)
line 1598 + 25 bytes
nsWindowRoot::HandleChromeEvent(nsWindowRoot * const 0x009c2fcc, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 228
GlobalWindowImpl::HandleDOMEvent(GlobalWindowImpl * const 0x009c4830,
nsPresContext * 0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728,
unsigned int 514, nsEventStatus * 0x0012f8a0) line 908
nsXULDocument::HandleDOMEvent(nsXULDocument * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 1247 + 29 bytes
nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 2846 + 30 bytes
nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 2842
nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 2842
nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 2842
nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 2842
nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 2842
nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 2842
nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 2842
nsXULElement::HandleChromeEvent(nsXULElement * const 0x01c486a0, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 3907 + 23 bytes
GlobalWindowImpl::HandleDOMEvent(GlobalWindowImpl * const 0x009c4830,
nsPresContext * 0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728,
unsigned int 514, nsEventStatus * 0x0012f8a0) line 908
nsDocument::HandleDOMEvent(nsDocument * const 0x009c4830, nsPresContext *
0x02b2e178, nsEvent * 0x0012f9a0, nsIDOMEvent * * 0x0012f728, unsigned int 514,
nsEventStatus * 0x0012f8a0) line 3857 + 29 bytes
nsGenericElement::HandleDOMEvent(nsGenericElement * const 0x009c4830,
nsPresContext * 0x02b2e178, nsEvent * 0x00000000, nsIDOMEvent * * 0x0012f728,
unsigned int 519, nsEventStatus * 0x0012f8a0) line 1999 + 34 bytes
PresShell::HandleEventInternal(PresShell * const 0x009c4830, nsEvent *
0x00000000, nsIView * 0x02a04d90, unsigned int 1, nsEventStatus * 0x0012f8a0)
line 6035 + 21 bytes
PresShell::HandleEvent(PresShell * const 0x00000000, nsIView * 0x02a04d90,
nsGUIEvent * 0x0012f9a0, nsEventStatus * 0x0012f8a0, int 1, int & 1) line 5893 +
19 bytes
nsViewManager::HandleEvent(nsViewManager * const 0x009c4830, nsView *
0x00000001, nsGUIEvent * 0x00000000, int 0) line 2245 + 20 bytes
nsViewManager::DispatchEvent(nsViewManager * const 0x02a04cf8, nsGUIEvent *
0x02a04d90, nsEventStatus * 0x0012f8fc) line 2021 + 32 bytes
HandleEvent(nsGUIEvent * 0x0012f9a0) line 79
nsWindow::DispatchEvent(nsWindow * const 0x02a04e1c, nsGUIEvent * 0x0012f9a0,
nsEventStatus & nsEventStatus_eIgnore) line 1097 + 3 bytes
nsWindow::DispatchWindowEvent(nsWindow * const 0x009c4830, nsGUIEvent *
0x00000000) line 1118
nsWindow::DispatchKeyEvent(nsWindow * const 0x009c4830, unsigned int 131,
unsigned short 118, unsigned int 0, long 0) line 3064 + 14 bytes
nsWindow::OnChar(nsWindow * const 0x009c4830, unsigned int 22) line 3270 + 17 bytes
nsWindow::ProcessMessage(nsWindow * const 0x009c4830, unsigned int 258, unsigned
int 22, long 3080193, long * 0x00000001) line 3961 + 10 bytes
nsWindow::WindowProc(HWND__ * 0x016e0482, unsigned int 258, unsigned int 22,
long 44060188) line 1379 + 16 bytes
USER32! AlignRects + -350177 bytes
USER32! AlignRects + -349970 bytes
USER32! GetMessageW + 293 bytes
USER32! DispatchMessageW + 11 bytes
nsAppShellService::Run(nsAppShellService * const 0x00a2b6b0) line 488 + 48 bytes
main1(int 0, char * * 0x002a2db8, nsISupports * 0x00000000) line 1323
main(int 1, char * * 0x002a2db8) line 1798 + 22 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! GetCurrentDirectoryW + 68 bytes
Resolving invalid.  The assert that produced the stack I posted is a different
(and expected) one.  I can't reproduce the original assert.  I originally got it
while testing a broken version of a patch for bug 142798, so I may have had some
corrupt data on the clipboard (?).  Reopen this if anyone manages how to
reproduce it.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
"GetNativeDataOffClipboard(aDataObject" returned an empty string - it was 
called from nsClipboard.cpp line 601.

It thought it was handling unicode text (line 452).  GetGlobalData gave it an 
empty string (line 457).

DataFound ends up being set, and we hit the else on line 641.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
So the question is, if no data is found, should the function return NS_OK?  If
yes, we just need to add an extra "if" before continuing with the paste logic. 
If no, we need to figure out why Moz thinks everything was ok when there was no
data.
Product: Browser → Seamonkey
I started SM and emptied windows' clipboard using clipbrd.exe and with cursor in address bar, edit>paste was bold. Shouldn't be bold with nothing to paste, correct?

Does your assert still happen?

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060714 SeaMonkey/1.5a
Does assert still happen?
Status: REOPENED → NEW
No reply to comment #7 and #8 => WFM
Status: NEW → RESOLVED
Closed: 20 years ago13 years ago
Resolution: --- → WORKSFORME
Whiteboard: [SmBugEvent]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: