<?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>5336</bug_id>
          
          <creation_ts>2005-10-11 02:52:32 -0700</creation_ts>
          <short_desc>SVG with animation crashes WebKit+SVG</short_desc>
          <delta_ts>2005-10-16 02:00:45 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.dotuscomus.com/kde/gearobolo_colorshift.svgz</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Eric Seidel (no email)">eric</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21794</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-11 02:52:32 -0700</bug_when>
    <thetext>SVG with animation crashes WebKit+SVG

I have not had a chance to either reduce, or diagnose.  It seemed to be crashing in animation code, but 
looked like it might be smashing memory.  Possibly relating to the svgz changes I have in my tree.  (w/o 
the svgz changes attached to http://bugzilla.opendarwin.org/show_bug.cgi?id=5246 it&apos;s not possible to 
view this SVG w/o first downloading and decompressing it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21991</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-13 14:30:24 -0700</bug_when>
    <thetext>This seems to be smashing the stack, or somehow confusing gdb.  Viewing this svg in DrawTest, with 
libgmalloc leads to this backtrace:

#0  0x0191b87c in typeinfo for KDOM::KDOMPart ()
#1  0x0137fe90 in KSVG::TimeScheduler::slotTimerNotify (this=0xe7c64000) at /Volumes/Stuff/
Projects/WKOpen2/WebCore/../SVGSupport/ksvg2/misc/KSVGTimeScheduler.cpp:494
#2  0x013800a0 in KSVG::TimeScheduler::connectIntervalTimer (this=0xbfffdfd0, element=0x108d634) 
at /Volumes/Stuff/Projects/WKOpen2/WebCore/../SVGSupport/ksvg2/misc/KSVGTimeScheduler.cpp:
422
#3  0x0126f0d8 in KWQSlot::call (this=0xe7c64fec, job=0xbfffe078, data=0x50100646 &lt;Address 
0x50100646 out of bounds&gt;, size=-519811140) at /Volumes/Stuff/Projects/WKOpen2/WebCore/
kwq/KWQSlot.mm:278
#4  0x0126e984 in KWQSignal::connect (this=0x41e00000, slot=@0x0) at /Volumes/Stuff/Projects/
WKOpen2/WebCore/kwq/KWQSignal.mm:59
#5  0x0108d690 in +[KWQSingleShotTimerTarget targetWithQObject:member:] (self=0x40300000, 
_cmd=0x0, object=0x40300000, member=0x0) at /Volumes/Stuff/Projects/WKOpen2/WebCore/kwq/
KWQTimer.mm:74
#6  0x0108d6d4 in +[KWQSingleShotTimerTarget targetWithQObject:member:] (self=0xff, 
_cmd=0xbfffe220, object=0x2, member=0x4 &lt;Address 0x4 out of bounds&gt;) at /Volumes/Stuff/
Projects/WKOpen2/WebCore/kwq/KWQTimer.mm:75
#7  0x928dd57c in __NSFireTimer ()
#8  0x90770ae0 in __CFRunLoopDoTimer ()
#9  0x9075d458 in __CFRunLoopRun ()
#10 0x9075ca0c in CFRunLoopRunSpecific ()
#11 0x93182260 in RunCurrentEventLoopInMode ()
#12 0x9318186c in ReceiveNextEventCommon ()
#13 0x93181760 in BlockUntilNextEventMatchingListInMode ()
#14 0x93680904 in _DPSNextEvent ()
#15 0x936805c8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#16 0x9367cb0c in -[NSApplication run] ()
#17 0x9376d618 in NSApplicationMain ()
#18 0x000eafa4 in main (argc=1, argv=0xbffff85c) at /Volumes/Stuff/Projects/WKOpen2/
WebKitTools/DrawTest/main.m:28

Which is total nonsense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21992</commentid>
    <comment_count>2</comment_count>
      <attachid>4351</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-13 14:47:18 -0700</bug_when>
    <thetext>Created attachment 4351
Reduced test case.

This test is more reduced than before, but still could be smaller.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22076</commentid>
    <comment_count>3</comment_count>
      <attachid>4357</attachid>
    <who name="Julien Palmas">julien.palmas</who>
    <bug_when>2005-10-14 05:06:11 -0700</bug_when>
    <thetext>Created attachment 4357
More reduced test case

This very simple SVG example causes the crash.
This example would not make sense though. More information is needed to create
a proper SVG.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22077</commentid>
    <comment_count>4</comment_count>
    <who name="Julien Palmas">julien.palmas</who>
    <bug_when>2005-10-14 05:07:43 -0700</bug_when>
    <thetext>Needs to change the keyword to HasReduction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22084</commentid>
    <comment_count>5</comment_count>
      <attachid>4359</attachid>
    <who name="Julien Palmas">julien.palmas</who>
    <bug_when>2005-10-14 08:15:43 -0700</bug_when>
    <thetext>Created attachment 4359
Proposed patch

Checks isSVGElement() and prints an error message if not the case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22091</commentid>
    <comment_count>6</comment_count>
      <attachid>4359</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-14 08:41:38 -0700</bug_when>
    <thetext>Comment on attachment 4359
Proposed patch

This is a wonderful isolation of the problem.  We now know *what* is going
wrong, but not yet *why*.  This fix notices a symtom of the problem (that
somehow we have an animation setup pointing at a KDOM element instead of a
KSVG2 element) but does not answer the question why? and is &quot;too late&quot; a place
to fix.  We need to find out why this gets set up this way in the first place,
and make this check earlier.  &quot;tit.key()&quot; is typed SVGElementImpl, according to
the map... so the fact that something other than an SVGElementImpl got in there
is the bug, not that when pulling it out we didn&apos;t check correctly.  This is a
good start, but not the right fix yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22094</commentid>
    <comment_count>7</comment_count>
      <attachid>4361</attachid>
    <who name="Julien Palmas">julien.palmas</who>
    <bug_when>2005-10-14 10:44:15 -0700</bug_when>
    <thetext>Created attachment 4361
new patch

a static_cast in SVGAnimationElementImpl::targetElement() was converting
KDOM::XMLElementImpl to SVGElementImpl for not yet implemented elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22099</commentid>
    <comment_count>8</comment_count>
      <attachid>4361</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-10-14 13:11:33 -0700</bug_when>
    <thetext>Comment on attachment 4361
new patch

This shoudl use the svg_dynamic_cast function instead.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4351</attachid>
            <date>2005-10-13 14:47:18 -0700</date>
            <delta_ts>2005-10-13 14:47:18 -0700</delta_ts>
            <desc>Reduced test case.</desc>
            <filename>animate_filter_crash.svg</filename>
            <type>image/svg+xml</type>
            <size>886</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSIgc3RhbmRhbG9uZT0ibm8i
Pz4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4wLy9FTiIgImh0dHA6
Ly93d3cudzMub3JnL1RSLzIwMDEvUkVDLVNWRy0yMDAxMDkwNC9EVEQvc3ZnMTAuZHRkIj4NCjxz
dmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDov
L3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSI+DQoJPGRl
ZnM+DQoJCTxmaWx0ZXIgaWQ9ImYxIiBmaWx0ZXJVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giIHg9
IjAlIiB5PSIwJSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSI+DQoJCQk8ZmVEaWZmdXNlTGln
aHRpbmcgbGlnaHRpbmctY29sb3I9InJnYigyNTUsMjU1LDI1NSkiIGRpZmZ1c2VDb25zdGFudD0i
MSI+DQoJCQkJPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ibGlnaHRpbmctY29sb3IiIGJlZ2luPSIw
IiBkdXI9IjEyMHMiIGNhbGNNb2RlPSJsaW5lYXIiIHZhbHVlcz0icmdiKDEwMCwxMDAsMTAwKTty
Z2IoNjUsMTE5LDgzKTtyZ2IoNzksNTMsMTY2KTtyZ2IoMjA0LDEwOCw1OSk7cmdiKDEwMCwxMDAs
MTAwKSIga2V5VGltZXM9IjA7MC4yNTswLjUwOzAuNzU7MSIgcmVwZWF0Q291bnQ9ImluZGVmaW5p
dGUiLz4NCgkJCQk8ZmVTcG90TGlnaHQgeD0iODAwIiB5PSI0NTAiIHo9IjI1MCIgcG9pbnRzQXRY
PSI1MTIiIHBvaW50c0F0WT0iMzY0IiBwb2ludHNBdFo9Ii00MDAiIHNwZWN1bGFyRXhwb25lbnQ9
IjE1IiBsaW1pdGluZ0NvbmVBbmdsZT0iMjAwIi8+DQoJCQk8L2ZlRGlmZnVzZUxpZ2h0aW5nPg0K
CQk8L2ZpbHRlcj4NCgk8L2RlZnM+DQo8L3N2Zz4NCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4357</attachid>
            <date>2005-10-14 05:06:11 -0700</date>
            <delta_ts>2005-10-14 05:06:11 -0700</delta_ts>
            <desc>More reduced test case</desc>
            <filename>5336_reduced.svg</filename>
            <type>image/svg+xml</type>
            <size>153</size>
            <attacher name="Julien Palmas">julien.palmas</attacher>
            
              <data encoding="base64">PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIj4KICAgICAgICA8ZmVEaWZmdXNlTGlnaHRp
bmc+DQogICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJsaWdodGluZy1jb2xvciIg
Lz4NCiAgICAgICAgPC9mZURpZmZ1c2VMaWdodGluZz4KPC9zdmc+
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4359</attachid>
            <date>2005-10-14 08:15:43 -0700</date>
            <delta_ts>2005-10-14 10:44:15 -0700</delta_ts>
            <desc>Proposed patch</desc>
            <filename>patch_5336</filename>
            <type>text/plain</type>
            <size>2422</size>
            <attacher name="Julien Palmas">julien.palmas</attacher>
            
              <data encoding="base64">SW5kZXg6IG1pc2MvS1NWR1RpbWVTY2hlZHVsZXIuY3BwCj09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9j
dnMvcm9vdC9TVkdTdXBwb3J0L2tzdmcyL21pc2MvS1NWR1RpbWVTY2hlZHVsZXIuY3BwLHYKcmV0
cmlldmluZyByZXZpc2lvbiAxLjgKZGlmZiAtdSAtcCAtcjEuOCBLU1ZHVGltZVNjaGVkdWxlci5j
cHAKLS0tIG1pc2MvS1NWR1RpbWVTY2hlZHVsZXIuY3BwCTUgT2N0IDIwMDUgMDU6MzU6MTMgLTAw
MDAJMS44CisrKyBtaXNjL0tTVkdUaW1lU2NoZWR1bGVyLmNwcAkxNCBPY3QgMjAwNSAxNToxNzo0
NyAtMDAwMApAQCAtMzAwLDggKzMwMCwxMCBAQCB2b2lkIFNWR1RpbWVyOjpub3RpZnl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GVkKCkpCisgICAgCisgICAgaWYodGFyZ2V0
ICYmICF0YXJnZXQtPmlzU1ZHRWxlbWVudCgpKQorICAgICAgICBmcHJpbnRmKHN0ZGVyciwgIldB
Uk5JTkc6IFVzaW5nIGFuaW1hdGlvbiBmb3IgYSBub3QgeWV0IGltcGxlbWVudGVkIGVsZW1lbnRc
biIpOworICAgIAorICAgIGlmICh0YXJnZXQgJiYgdGFyZ2V0LT5pc1NWR0VsZW1lbnQoKSAmJiB0
YXJnZXQtPmlzU3R5bGVkKCkpCiAgICAgICAgIHN0eWxlZCA9IHN0YXRpY19jYXN0PFNWR1N0eWxl
ZEVsZW1lbnRJbXBsICo+KHRhcmdldCk7CiAgICAgS0RPTTo6Q0RGSW50ZXJmYWNlICppbnRlcmZh
Y2UgPSAoc3R5bGVkID8gc3R5bGVkLT5vd25lckRvY3VtZW50KCktPmltcGxlbWVudGF0aW9uKCkt
PmNkZkludGVyZmFjZSgpIDogMCk7CiAgICAgCg==
</data>
<flag name="review"
          id="740"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4361</attachid>
            <date>2005-10-14 10:44:15 -0700</date>
            <delta_ts>2005-10-14 13:11:33 -0700</delta_ts>
            <desc>new patch</desc>
            <filename>patch_5336_2</filename>
            <type>text/plain</type>
            <size>815</size>
            <attacher name="Julien Palmas">julien.palmas</attacher>
            
              <data encoding="base64">PyAuRFNfU3RvcmUKSW5kZXg6IFNWR0FuaW1hdGlvbkVsZW1lbnRJbXBsLmNwcAo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
ClJDUyBmaWxlOiAvY3ZzL3Jvb3QvU1ZHU3VwcG9ydC9rc3ZnMi9zdmcvU1ZHQW5pbWF0aW9uRWxl
bWVudEltcGwuY3BwLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjgKZGlmZiAtdSAtcCAtcjEuOCBT
VkdBbmltYXRpb25FbGVtZW50SW1wbC5jcHAKLS0tIFNWR0FuaW1hdGlvbkVsZW1lbnRJbXBsLmNw
cAk1IE9jdCAyMDA1IDA1OjM1OjE3IC0wMDAwCTEuOAorKysgU1ZHQW5pbWF0aW9uRWxlbWVudElt
cGwuY3BwCTE0IE9jdCAyMDA1IDE3OjQzOjU2IC0wMDAwCkBAIC0xMDQsNyArMTA0LDkgQEAgU1ZH
RWxlbWVudEltcGwgKlNWR0FuaW1hdGlvbkVsZW1lbnRJbXBsOgogICAgICAgICAgICAgICAgICAg
ICBicmVhazsKICAgICAgICAgICAgIH0KICAgICAgICAgICAgIAotICAgICAgICAgICAgbV90YXJn
ZXRFbGVtZW50ID0gc3RhdGljX2Nhc3Q8U1ZHRWxlbWVudEltcGwgKj4odGFyZ2V0KTsKKyAgICAg
ICAgICAgIC8vIEVsZW1lbnRzIHRoYXQgYXJlIG5vdCB5ZXQgaW1wbGVtZW50ZWQgYXJlIGluc3Rh
bmNlcyBvZiBLRE9NOjpYTUxFbGVtZW50SW1wbAorICAgICAgICAgICAgaWYgKHRhcmdldC0+aXNT
VkdFbGVtZW50KCkpCisgICAgICAgICAgICAgICAgbV90YXJnZXRFbGVtZW50ID0gc3RhdGljX2Nh
c3Q8U1ZHRWxlbWVudEltcGwgKj4odGFyZ2V0KTsKICAgICAgICAgfQogICAgIH0KICAgICAgICAg
ICAgICAgICAgICAgICAgIAo=
</data>
<flag name="review"
          id="741"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>