Closed Bug 6823 Opened 25 years ago Closed 25 years ago

[PP]menu events have no target [was Regression: Crashes when I move message to another folder]

Categories

(MailNews Core :: Backend, defect, P1)

Other
All
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: fenella, Assigned: hyatt)

References

Details

(Whiteboard: regression caused when joki factored out DOMEvents into two interfaces)

Attachments

(1 file)

RE: Linux (1999-05-20-08m6)

Crashes when I move message on Linux (1999-05-20-08m6)

here is the stack trace:

#0  0x8890c89 in ?? ()
#1  0x402cdb3b in NS_NewScriptEventListener ()
#2  0x403354b4 in js_GetProperty ()
#3  0x4032948e in js_Interpret ()
#4  0x40327dd0 in js_Invoke ()
#5  0x40327f75 in js_CallFunctionValue ()
#6  0x40312c99 in JS_CallFunctionValue ()
#7  0x402cd640 in nsJSEventListener::HandleEvent ()
#8  0x40962e09 in nsEventListenerManager::HandleEvent ()
#9  0x4078619d in RDFElementImpl::HandleDOMEvent ()
#10 0x407861f8 in RDFElementImpl::HandleDOMEvent ()
#11 0x407861f8 in RDFElementImpl::HandleDOMEvent ()
#12 0x40099a0a in nsMenuItem::DoCommand ()
#13 0x40099841 in nsMenuItem::MenuItemSelected ()
#14 0x4009a566 in menu_item_activate_handler ()
#15 0x80c41f6 in gtk_window_set_default_size ()
#16 0x809ce37 in gtk_signal_connect_object ()
#17 0x809c4be in gtk_signal_connect_object ()
#18 0x809abfa in gtk_selection_data_set ()
#19 0x80bc848 in gtk_widget_size_request ()
#20 0x808b9b5 in gtk_menu_shell_append ()
#21 0x808aeb6 in gtk_menu_shell_append ()
#22 0x80c3fdc in gtk_window_set_default_size ()
#23 0x809c4eb in gtk_signal_connect_object ()
#24 0x809abfa in gtk_selection_data_set ()
#25 0x80bc724 in gtk_widget_size_request ()
#26 0x8085d79 in gtk_get_current_event ()
#27 0x808531a in gtk_main_iteration_do ()
#28 0x80d31ab in gdk_input_add ()
#29 0x80e6130 in g_list_length ()
#30 0x80e65ab in g_list_length ()
#31 0x80e66c5 in g_main_iteration ()
#32 0x8084e2f in gtk_main ()
#33 0x4009281b in nsAppShell::Run ()
#34 0x40018da6 in nsAppShellService::Run ()
#35 0x8051313 in main ()

It also occur on win_nt too. Stack trace to follow
It does not occur on Mac though.
Summary: Crashes when I move message to another folder → Regression: Crashes when I move message to another folder
Hardware: Other → All
Target Milestone: M6
I'll mark as M6 for now to get this off Jan's unmarked bug list :-)
Hardware: All → Other
Target Milestone: M6
fyi
On today Mac May 20 Seamonkey build (1999052008), the operation does not
succeed.  No message is copied/moved.  At times, my system locks up when I
repeatly try to perform the operation
Assignee: phil → putterman
Priority: P3 → P1
Target Milestone: M6
Reassign to putterman for M6, if possible.
QA Contact: 4080 → 4104
Assignee: putterman → waterson
I cannot reproduce this on NT.   I bet the Mac problem is
the same as the other Mac hang bug that was filed. I do get the same crash on
Linux.  It doesn't look like it's going through mailnews code.

I'm reassigning to waterson and cc'ing saari.  Chris W, I'm reassigning to you
because this is one of our RDF menus.  You mentioned to me in another bug report
that this code was recently changed.  Our menus still both say Move on them.  If
this isn't yours and you have an idea whose it is, please forward this on.

I'm actually crashing in nsJSUtils::nsConvertObjectToJSVal.
Assignee: waterson → putterman
I'm taking this back for the moment. We're getting a js error on NT.  Let me
figure out what's going on and then I might reassign it again.
Assignee: putterman → waterson
I'm reassigning back to waterson.  The bookmarks menu in navigator.xul has the
same js error (which makes sense since I just copied the code :) ).  Anyway,
event.target is returning an item that doesn't have an id so we can't get the
uri.
Status: NEW → ASSIGNED
Assignee: waterson → saari
Status: ASSIGNED → NEW
Summary: Regression: Crashes when I move message to another folder → menu events have no target [was Regression: Crashes when I move message to another folder]
Allright. I tracked this through the menu code and the problem is that events
that are issued from menu "onclick" have no target. This is specifically
because nsDOMEvent::GetTarget() tries to associate the event's target frame to
a content. Since menus aren't part of the raptor layout, the frame for the
event is the "viewport frame" (which I assume is a dummy frame for the
top-level window). This frame has no content associated with it, so
nsDOMEvent::GetTarget() can't figure out the target.

I will attached a test case that illustrates the problem has nothing to do with
RDF. I'm reassigning this to saari, because it seems like a problem with menus
in general.
Chris: the easiest way to run the above test is to drop it in over
navigator.xul, and boot apprunner from scratch. (Or maybe there is a way to run
"apprunner --chrome=file://D:/tmp/foo.html")
Ok, so what is the right way to fix this? Doesn't look like nsIDOMEvent has a
SetTarget call, but it sounds like that is what we need to get non-visible frames
to handle events correctly.

CCing Tom Pixley on this.
Assignee: saari → waterson
Taking this back. Related to joki's checkin to nsRDFElement v 1.68.
Status: NEW → ASSIGNED
Whiteboard: regression caused when joki factored out DOMEvents into two interfaces
Assignee: waterson → hyatt
Status: ASSIGNED → NEW
I am taking this. My SetTarget method was commented out, so I'm going to
put it back in over in nsIPrivateDOMEvent and solve the problem that way.
*** Bug 3716 has been marked as a duplicate of this bug. ***
some housekeeping notes. bug 3716 was listed as a dupe of this bug. The behavior from there was a crash when selecting
Bookmarks|Manage bookmarks or Bookmarks|Personal Bookmarks. I'm going to assume that Bookmarks|Add Current Page
crashes for the same reason as well.
Status: NEW → ASSIGNED
Ok, I've got a fix for this.  With chofmann's permission, I'll check it in.

cc'ing chofmann.
I think bug 6885 may also be caused by this
That sounds different to me.  The bug with SetTarget would only kick off
when you finally chose a menuitem.  It sounds like (in the other bug) a crash is
occurring when you try to build the contents of a menu
(Personal Bookmarks).

Hard to tell from the bug description though.  Maybe the reporter could provide
more info.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I went ahead and checked the fix in for this.  Marking fixed.  Now let's
see if there are any other menu crashes.  If so, we'll know they aren't
because of this bug.
Thats ok, I can't repro the bug anyway.
On the PPC May 24 Seamonkey build (1999052408-M6), Seamonkey does not crash on
Mac.  I can copy messages.  The Message->Move command does a copy.  In order to
see the copied message, I must exit and restart Seamonkey in order for the
message to show up.
See 6975 for bug relating to pmock's last comments about headers not being
copied.
Linux 5/24 build (1999-05-24-08 m6)
Moving  message to another folder does not crash any more.
But on the Win_nt  (1999-05-24-09 m6) build
It still crashes
Status: RESOLVED → REOPENED
Summary: menu events have no target [was Regression: Crashes when I move message to another folder] → [PP]menu events have no target [was Regression: Crashes when I move message to another folder]
I am re-opening this bug and mark it [PP] windows only.  If this is a different
bug, please let me know so I can open a new bug report. Will post the talkback
stack trace.
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
I'm marking this as fixed again.  It looks like I need to check in a fix for
6975.  At least based on my build, this bug is fixed.
Per Scott P. This bug ( referring to move to menu code) is fixed. He has opened
6975 to address the move/copy bug. He told me to wait for 6975 is verified
before I verify this bug.
Status: RESOLVED → VERIFIED
RE: Linux (1999-05-25-16 m6)
Win_nt (1999-05-25-17 m6)
The crash bug on Linux and win_nt 4.0 has been fixed. Since we have another bug
(6975) to track the mac move bug.  Scott P. said I can mark this one verified.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: