<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>13154</bug_id>
          
          <creation_ts>2007-03-22 04:29:38 -0700</creation_ts>
          <short_desc>ASSERTION FAILURE: Dragging JPEG image served as image/jpg in debug builds</short_desc>
          <delta_ts>2023-02-22 14:59:18 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=246131</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>17739</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-03-22 04:29:38 -0700</bug_when>
    <thetext>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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17738</commentid>
    <comment_count>1</comment_count>
      <attachid>13761</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-03-22 04:30:24 -0700</bug_when>
    <thetext>Created attachment 13761
Resource (do not fix mime type)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17737</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-03-22 04:32:29 -0700</bug_when>
    <thetext>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&amp;, WebCore::String const&amp;, WebCore::Frame*) + 304 (ClipboardMac.mm:336)
4   com.apple.WebCore        	0x014ea898 WebCore::prepareClipboardForImageDrag(WebCore::Frame*, WebCore::Clipboard*, WebCore::Element*, WebCore::KURL const&amp;, WebCore::KURL const&amp;, WebCore::String const&amp;) + 392 (DragController.cpp:503)
5   com.apple.WebCore        	0x014ead54 WebCore::DragController::startDrag(WebCore::Frame*, WebCore::Clipboard*, WebCore::DragOperation, WebCore::PlatformMouseEvent const&amp;, WebCore::IntPoint const&amp;, bool) + 1180 (DragController.cpp:580)
6   com.apple.WebCore        	0x014d3e30 WebCore::EventHandler::handleDrag(WebCore::MouseEventWithHitTestResults const&amp;) + 2532 (EventHandler.cpp:1490)
7   com.apple.WebCore        	0x014d3f64 WebCore::EventHandler::handleMouseMoveEvent(WebCore::MouseEventWithHitTestResults const&amp;) + 48 (EventHandler.cpp:310)
8   com.apple.WebCore        	0x014d549c WebCore::EventHandler::handleMouseMoveEvent(WebCore::PlatformMouseEvent const&amp;) + 1268 (EventHandler.cpp:913)
9   com.apple.WebCore        	0x010fb770 WebCore::FrameView::handleMouseMoveEvent(WebCore::PlatformMouseEvent const&amp;) + 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

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17719</commentid>
    <comment_count>3</comment_count>
      <attachid>13762</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-03-22 04:35:30 -0700</bug_when>
    <thetext>Created attachment 13762
Test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1935978</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-22 14:59:18 -0800</bug_when>
    <thetext>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!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>13761</attachid>
            <date>2007-03-22 04:30:24 -0700</date>
            <delta_ts>2007-03-22 04:35:52 -0700</delta_ts>
            <desc>Resource (do not fix mime type)</desc>
            <filename>apple.jpg</filename>
            <type>image/jpg</type>
            <size>2149</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsK
CwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQU
FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCABAADQDASIA
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm
p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA
AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ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mdLeZv3jMIywjtXuGAZAcOwU/In7aH
7dK/Ey1TwX8N5107wh5A+2XVkJUFw0keJY1aVI5GyGZHldELKWiRVjMrXIB4p+178aLH45fGK41n
SjHNpVlapYW12sEkJusO8ssm13ZgnnTSrEDtIhWEMqsGorxSigD/2Q==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>13762</attachid>
            <date>2007-03-22 04:35:30 -0700</date>
            <delta_ts>2007-03-22 04:35:30 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>bug-13154-test.html</filename>
            <type>text/html</type>
            <size>37</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">PGltZyBzcmM9Ii9hdHRhY2htZW50LmNnaT9pZD0xMzc2MSI+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>