Bug 13154

Summary: ASSERTION FAILURE: Dragging JPEG image served as image/jpg in debug builds
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: ImagesAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, oliver
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
See Also: https://bugs.webkit.org/show_bug.cgi?id=246131
Attachments:
Description Flags
Resource (do not fix mime type)
none
Test case none

David Kilzer (:ddkilzer)
Reported 2007-03-22 04:29:38 PDT
Summary: Attempting to drag a JPEG image served as image/jpg (note that the correct MIME type is image/jpeg) causes an assertion failure in debug builds of WebKit. Steps to reproduce: 1. Open a debug build of Safari/WebKit. 2. Open the test case on this bug. 3. Attempt to drag the image. Expected results: Safari/WebKit should allow you to drag the image without crashing a debug build. Actual results: Safari/WebKit crashes with an assertion failure. Regression: Only occurs with debug builds. No other versions of Safari/WebKit tested. Notes: Reproduced on a local debug build of WebKit r20386 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135).
Attachments
Resource (do not fix mime type) (2.10 KB, image/jpg)
2007-03-22 04:30 PDT, David Kilzer (:ddkilzer)
no flags
Test case (37 bytes, text/html)
2007-03-22 04:35 PDT, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2007-03-22 04:30:24 PDT
Created attachment 13761 [details] Resource (do not fix mime type)
David Kilzer (:ddkilzer)
Comment 2 2007-03-22 04:32:29 PDT
Console output: ASSERTION FAILED: MimeTypeRegistry::isSupportedImageResourceMIMEType([resource MIMEType]) (/path/to/WebKit/Misc/WebNSPasteboardExtras.mm:252 -[NSPasteboard(WebExtras) _web_writeImage:element:URL:title:archive:types:]) Segmentation fault Stack trace: Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0xbbadbeef Thread 0 Crashed: 0 com.apple.WebKit 0x00313554 -[NSPasteboard(WebExtras) _web_writeImage:element:URL:title:archive:types:] + 1040 (WebNSPasteboardExtras.mm:252) 1 com.apple.WebKit 0x00313094 -[NSPasteboard(WebExtras) _web_declareAndWriteDragImageForElement:URL:title:archive:source:] + 496 (WebNSPasteboardExtras.mm:276) 2 com.apple.WebKit 0x003d4b70 WebDragClient::declareAndWriteDragImage(NSPasteboard*, DOMElement*, NSURL*, NSString*, WebCore::Frame*) + 336 3 com.apple.WebCore 0x010586bc WebCore::ClipboardMac::declareAndWriteDragImage(WebCore::Element*, WebCore::KURL const&, WebCore::String const&, WebCore::Frame*) + 304 (ClipboardMac.mm:336) 4 com.apple.WebCore 0x014ea898 WebCore::prepareClipboardForImageDrag(WebCore::Frame*, WebCore::Clipboard*, WebCore::Element*, WebCore::KURL const&, WebCore::KURL const&, WebCore::String const&) + 392 (DragController.cpp:503) 5 com.apple.WebCore 0x014ead54 WebCore::DragController::startDrag(WebCore::Frame*, WebCore::Clipboard*, WebCore::DragOperation, WebCore::PlatformMouseEvent const&, WebCore::IntPoint const&, bool) + 1180 (DragController.cpp:580) 6 com.apple.WebCore 0x014d3e30 WebCore::EventHandler::handleDrag(WebCore::MouseEventWithHitTestResults const&) + 2532 (EventHandler.cpp:1490) 7 com.apple.WebCore 0x014d3f64 WebCore::EventHandler::handleMouseMoveEvent(WebCore::MouseEventWithHitTestResults const&) + 48 (EventHandler.cpp:310) 8 com.apple.WebCore 0x014d549c WebCore::EventHandler::handleMouseMoveEvent(WebCore::PlatformMouseEvent const&) + 1268 (EventHandler.cpp:913) 9 com.apple.WebCore 0x010fb770 WebCore::FrameView::handleMouseMoveEvent(WebCore::PlatformMouseEvent const&) + 72 (FrameView.cpp:864) 10 com.apple.WebCore 0x014cb9c8 WebCore::EventHandler::mouseDragged(NSEvent*) + 412 (EventHandlerMac.mm:490) 11 com.apple.WebKit 0x003516fc -[WebHTMLView mouseDragged:] + 336 (WebHTMLView.mm:2994) 12 com.apple.AppKit 0x937fdfa0 -[NSWindow sendEvent:] + 6424 13 com.apple.Safari 0x00021734 0x1000 + 132916 14 com.apple.AppKit 0x937a68d4 -[NSApplication sendEvent:] + 4172 15 com.apple.Safari 0x00021238 0x1000 + 131640 16 com.apple.AppKit 0x9379dd10 -[NSApplication run] + 508 17 com.apple.AppKit 0x9388e87c NSApplicationMain + 452 18 com.apple.Safari 0x0005c77c 0x1000 + 374652 19 com.apple.Safari 0x0005c624 0x1000 + 374308
David Kilzer (:ddkilzer)
Comment 3 2007-03-22 04:35:30 PDT
Created attachment 13762 [details] Test case
Ahmad Saleem
Comment 4 2023-02-22 14:59:18 PST
I am not able to reproduce this bug in DEBUG build based of WebKit ToT (260689@main) using WK2 window and it also does not assert in WK1 window. Do we need to track it anymore? Thanks!
Note You need to log in before you can comment on or make changes to this bug.