Closed Bug 14750 Opened 25 years ago Closed 25 years ago

[DOGFOOD] cannot insert image through image dialog

Categories

(Core :: DOM: Editor, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: sujay, Assigned: Brade)

References

()

Details

(Whiteboard: [PDT+] [no date due to reopen; contacting norris])

using 9/23 build of apprunner

1) launch apprunner and editor
2) try inserting image useing URL field

try the URL given above.

3) Hit OK

the image doesn't come in....works on other platforms


linux only...
Assignee: buster → akkana
Assignee: akkana → cmanske
I'm not sure what "useing URL field" means, but if I try inserting the given
image via the image dialog, I see several problems:
1. the ok button is greyed out
2. I can click on the button even though it's greyed out
3. When I click on it, I get a crash (sorry for the long stack trace, I tried to
limit it as much as possible but it looks like it might be relevant at least
this far):

#0  0x400c97e6 in js_GetStringBytes (str=0x0) at jsstr.c:2378
#1  0x4007ab92 in js_ReportUncaughtException (cx=0x8839598) at jsexn.c:639
#2  0x40057d2a in JS_CallFunction (cx=0x8839598, obj=0x8920270, fun=0x8932920,
    argc=1, argv=0xbfffb724, rval=0xbfffb60c) at jsapi.c:2636
#3  0x4042af2a in nsJSContext::CallFunction (this=0x8839538, aObj=0x8920270,
    aFunction=0x8932920, argc=1, argv=0xbfffb724, aBoolResult=0xbfffb674)
    at nsJSEnvironment.cpp:228
#4  0x40463325 in nsJSEventListener::HandleEvent (this=0x8932b80,
    aEvent=0x8a98528) at nsJSEventListener.cpp:103
#5  0x40c99319 in nsEventListenerManager::HandleEvent (this=0x892f420,
    aPresContext=@0x81ee718, aEvent=0xbfffb98c, aDOMEvent=0xbfffb8c4,
    aFlags=7, aEventStatus=@0xbfffb9b4) at nsEventListenerManager.cpp:958
#6  0x40eaa4ad in nsGenericElement::HandleDOMEvent (this=0x892aa5c,
    aPresContext=@0x81ee718, aEvent=0xbfffb98c, aDOMEvent=0xbfffb8c4,
    aFlags=1, aEventStatus=@0xbfffb9b4) at nsGenericElement.cpp:789
#7  0x40d31255 in nsHTMLInputElement::HandleDOMEvent (this=0x892aa40,
    aPresContext=@0x81ee718, aEvent=0xbfffb98c, aDOMEvent=0x0, aFlags=1,
    aEventStatus=@0xbfffb9b4) at nsHTMLInputElement.cpp:549
#8  0x40db76f5 in nsEnderFocusListener::Blur (this=0x8992a10, aEvent=0x8a98488)
    at nsGfxTextControlFrame.cpp:2405
#9  0x40c98f12 in nsEventListenerManager::HandleEvent (this=0x89929a8,
    aPresContext=@0x8851b30, aEvent=0xbfffbc2c, aDOMEvent=0xbfffbb7c,
    aFlags=7, aEventStatus=@0xbfffbc54) at nsEventListenerManager.cpp:854
#10 0x40e9923b in nsDocument::HandleDOMEvent (this=0x88ba788,
    aPresContext=@0x8851b30, aEvent=0xbfffbc2c, aDOMEvent=0xbfffbb7c,
    aFlags=1, aEventStatus=@0xbfffbc54) at nsDocument.cpp:2339
#11 0x40c9abd6 in nsEventStateManager::PreHandleEvent (this=0x8984200,
    aPresContext=@0x8851b30, aEvent=0xbfffc00c, aTargetFrame=0x88a1bf8,
    aStatus=@0xbfffbf34, aView=0x88a1700) at nsEventStateManager.cpp:235
#12 0x40ce171a in PresShell::HandleEvent (this=0x889e1d0, aView=0x88a1700,
    aEvent=0xbfffc00c, aEventStatus=@0xbfffbf34) at nsPresShell.cpp:2065
#13 0x411e9a73 in nsView::HandleEvent (this=0x88a1700, event=0xbfffc00c,
    aEventFlags=8, aStatus=@0xbfffbf34, aHandled=@0xbfffbed8) at nsView.cpp:827
#14 0x411e9a04 in nsView::HandleEvent (this=0x88a0740, event=0xbfffc00c,
    aEventFlags=8, aStatus=@0xbfffbf34, aHandled=@0xbfffbed8) at nsView.cpp:811
#15 0x411e9a04 in nsView::HandleEvent (this=0x88a0670, event=0xbfffc00c,
    aEventFlags=8, aStatus=@0xbfffbf34, aHandled=@0xbfffbed8) at nsView.cpp:811
#16 0x411e9a04 in nsView::HandleEvent (this=0x889bcb8, event=0xbfffc00c,
    aEventFlags=28, aStatus=@0xbfffbf34, aHandled=@0xbfffbed8)
    at nsView.cpp:811
#17 0x411f4023 in nsViewManager::DispatchEvent (this=0x889bab0,
    aEvent=0xbfffc00c, aStatus=@0xbfffbf34) at nsViewManager.cpp:1665
#18 0x411e7bd4 in HandleEvent (aEvent=0xbfffc00c) at nsView.cpp:62
#19 0x4057a290 in nsWidget::DispatchEvent (this=0x889bd20, aEvent=0xbfffc00c,
    aStatus=@0xbfffbfd0) at nsWidget.cpp:1095
#20 0x4057a02c in nsWidget::DispatchWindowEvent (this=0x889bd20,
    event=0xbfffc00c) at nsWidget.cpp:1009
#21 0x4057a0d4 in nsWidget::DispatchFocus (this=0x889bd20, aEvent=@0xbfffc00c)
    at nsWidget.cpp:1031
#22 0x4057b4c9 in nsWidget::OnFocusOutSignal (this=0x889bd20,
    aGdkFocusEvent=0xbfffc3e8) at nsWidget.cpp:1821
#23 0x4057c1f2 in nsWidget::FocusOutSignal (aWidget=0x889bf08,
    aGdkFocusEvent=0xbfffc3e8, aData=0x889bd20) at nsWidget.cpp:2232
#24 0x40710229 in gtk_marshal_BOOL__POINTER ()
#25 0x406d565d in gtk_handlers_run ()
#26 0x406d4ab2 in gtk_signal_real_emit ()
#27 0x406d2c05 in gtk_signal_emit ()
#28 0x407079d8 in gtk_widget_event ()
#29 0x4070fc1a in gtk_window_real_set_focus ()
#30 0x40710485 in gtk_marshal_NONE__POINTER ()
#31 0x406d4aeb in gtk_signal_real_emit ()
#32 0x406d2c05 in gtk_signal_emit ()
#33 0x4070d138 in gtk_window_set_focus ()
#34 0x40704309 in gtk_widget_unparent ()
#35 0x4069fd2d in gtk_layout_remove ()
#36 0x40710485 in gtk_marshal_NONE__POINTER ()
#37 0x406d496b in gtk_signal_real_emit ()
#38 0x406d2c05 in gtk_signal_emit ()
#39 0x40668668 in gtk_container_remove ()
#40 0x4070b442 in gtk_widget_shutdown ()
#41 0x406b906b in gtk_object_destroy ()
#42 0x40704646 in gtk_widget_destroy ()
#43 0x40578b5e in nsWidget::Destroy (this=0x8991a40) at nsWidget.cpp:227
#44 0x4057eb02 in ChildWindow::Destroy (this=0x8991a40) at nsWindow.cpp:870
#45 0x411e7dd8 in nsView::~nsView (this=0x89909f8, __in_chrg=3)
    at nsView.cpp:139
#46 0x411e814f in nsView::Destroy (this=0x89909f8) at nsView.cpp:244
#47 0x411e7cd6 in nsView::~nsView (this=0x826e750, __in_chrg=3)
    at nsView.cpp:92
#48 0x411e814f in nsView::Destroy (this=0x826e750) at nsView.cpp:244
#49 0x411ef479 in nsViewManager::Release (this=0x883ab20)
    at nsViewManager.cpp:217
#50 0x411e7be7 in HandleEvent (aEvent=0xbfffcca8) at nsView.cpp:63
#51 0x4057a290 in nsWidget::DispatchEvent (this=0x883a298, aEvent=0xbfffcca8,
    aStatus=@0xbfffcc64) at nsWidget.cpp:1095
#52 0x4057a02c in nsWidget::DispatchWindowEvent (this=0x883a298,
    event=0xbfffcca8) at nsWidget.cpp:1009
#53 0x4057a350 in nsWidget::DispatchMouseEvent (this=0x883a298,
    aEvent=@0xbfffcca8) at nsWidget.cpp:1122
#54 0x4057b31d in nsWidget::OnButtonReleaseSignal (this=0x883a298,
    aGdkButtonEvent=0x8a5f364) at nsWidget.cpp:1724
#55 0x4057bf36 in nsWidget::ButtonReleaseSignal (aWidget=0x883a178,
    aGdkButtonEvent=0x8a5f364, aData=0x883a298) at nsWidget.cpp:2166

Charley owns insert image; he can decide whether this is all one bug or needs to
be split, and whether the crash might be related to the button being greyed out.
Akkana, URL field refers to the first field in the image dialog box...

if you still can't find it, just scream, I'm in the cube right next to you...
Status: NEW → ASSIGNED
Target Milestone: M12
I don't own the image dialog - Kathy does.
But I looked at the problem and it crashed in the same place on Windows once,
but now I can't reproduce it!
I'll make it M12 and debug it with akkana next time I come in.
Kathy: you might want to play with it as well.
I have noticed this problem off and on for Mac.  I can only reliably insert
images if I use the Choose Image button (don't type url).  Maybe there is a bug
in the filespec stuff?

If I save the file after trying to insert the image, the image is in the output.
Maybe it isn't the filespec but imglib or us not loading the img after insertion?
Sujay: Can you please test this on a Linux box?
Kathy: Are you still seeing problems on Mac?
Yes, I still see this problem on Mac.
I am unable to see any images inserted except http://www.mozilla.org/images/
mozilla-banner.gif which had already loaded in the browser in the current
session.

Sujay--if you insert an image on linux and then save the file, is the image in
the html file?
Can we figure out if this is an imagelib problem or whatever?
It's probably not an editor problem and I'd like to get it assigned to
proper owner.
Okay now insert image seems to work, but when I save it to a file here's
what the source looks like..It looks messed up:

<html>
<head>^D^@^@^@
<title></title>

</head>

<body>

<img src="^C^@^@">
^C^@^@</body>
</html>
~
Sujay--There is a general problem with saving files (images aside).  Sorry I
don't have the bug number.
Severity: normal → critical
OS: Linux → All
Priority: P3 → P1
Hardware: Other → All
Summary: [PP] insert image doesn't work on Linux → [DOGFOOD] cannot insert image through image dialog
using todays build on win95, linux and Mac, when attempting to insert an image
using the image dialog box, I get an error dialog that states:
The number you entered (0) is outside of allowed range. Please enter a number
between 1 and 10000

I get this error if I enter a URL or if I choose to browse the disk. The dialog
displays when I select OK.

I'm bumping this up to a higher priority, and since I cannot enter an image at
all, I'm adding DOGFOOD, removing reference that it is platform specific
This is a different problem than the original one, but it is a bug that needs
to be fixed. The reason is that verification of the size data is happening
even if you have the dialog in the collapsed state. Need to alter data
validation when widgets don't show.
Whiteboard: [PDT+]
Putting on PDT+ radar.
Blocks: 12658
Assignee: cmanske → brade
Status: ASSIGNED → NEW
I'm going to pick up this bug...
Whiteboard: [PDT+] → [PDT+] [by 11/26]
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fix checked in today; please verify with tomorrow's builds.
*** Bug 19440 has been marked as a duplicate of this bug. ***
QA Contact: sujay → elig
QA Assigning to self for immediate verification, as sujay is out of town, and
PDT+ verification is #1 priority.
Status: RESOLVED → REOPENED
Re-opening; cmanske or brade, please let me know if you'd like this split into a
separate bug report.

Specifically, while inserting an image through the image dialog on Linux-only
(1999, if you select "Choose File...", you will put the editor into a state in
which most users will assume is that of a crashed application: the Select Image
File dialog will appear, however, the focus remains in the previous Insert Image
dialog, and there's no way to type anything into the Select Image File.

The only way to get back (without quitting Mozilla) is to close both dialogs from
the window close control --- cancel won't work.

Other open file dialogs work fine.

---

However, the original bug report only dealt with typed-in URLs, so this may be a
tangent. Your call.
Resolution: FIXED → ---
Besides the file dialog problem, I'm still seeing the issue beppe notes on
11.12.99 17:38 on this morning's Mac OS (mozilla) and Linux (commercial) builds.
Worked fine on Win32.

(Although it shouldn't matter, the file URL used was http://www.prometheus-
music.com/images/small_poster.jpg.)

----

Since we already have two active issues in this bug report, I haven't checked the
saving problems. ;)
Whiteboard: [PDT+] [by 11/26] → [PDT+] [no date due to reopen; contacting norris]
QA Contact: elig → sujay
[Sujay is back; QA Assigning bug back to him.]
additional comments requested:
 The JS error is causing imageElement.cloneNode call to fail which the image
dialog seems to rely on.

This error causes all of the fields to be empty when editing an existing image.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
resolving this as fixed; it is possible to "insert an image"

There are some known issues which should be filed as separate bugs:
 * browsing on Linux
 * insertion when not seeing all properties
 * other things mentioned below
Status: RESOLVED → REOPENED
I just tried inserting an image using the URL field and I get this message
after clicking OK:

"The number you entered id outside of the allowed range...."

and all I did was enter a valid URL and click OK.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Sujay--inserting an image will work as long as the dialog is set to view all of
the fields.  Please file a bug against me for the error message when the fields
are hidden.

Please file any other particular bugs if they are still applicable (linux choose
dialog?) too.

Thanks!
Status: RESOLVED → VERIFIED
verified in 11/29 build.
Blocks: 20870
No longer blocks: 20870
You need to log in before you can comment on or make changes to this bug.