<?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>20241</bug_id>
          
          <creation_ts>2008-07-31 04:37:14 -0700</creation_ts>
          <short_desc>[retitleme] Safari crashes at JSValueUnprotect() when fontpicker view close</short_desc>
          <delta_ts>2008-10-27 01:48:57 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>808caaa4.8ce9.9cd6c799e9f6</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>aroben</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87479</commentid>
    <comment_count>0</comment_count>
    <who name="">808caaa4.8ce9.9cd6c799e9f6</who>
    <bug_when>2008-07-31 04:37:14 -0700</bug_when>
    <thetext>Access violation - code c0000005 (!!! second chance !!!)
eax=3ea01c77 ebx=7f53ee38 ecx=0012ef68 edx=0051c0f0 esi=0012ef68 edi=7f194a00
eip=1003078c esp=0012fa70 ebp=0012fa8c iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202

WebKit!WTF__ThreadSpecific&lt;WTF__OwnPtr&lt;KJS__Heap__ThreadRegistrar&gt; &gt;__operator W
TF__OwnPtr&lt;KJS__Heap__ThreadRegistrar&gt; *+c:
1003078c ff30             push    dword ptr [eax]   ds:0023:3ea01c77=????????

0:000&gt; k
ChildEBP RetAddr
0012fa8c 10022b88 WebKit!WTF__ThreadSpecific&lt;WTF__OwnPtr&lt;KJS__Heap__ThreadRegist
rar&gt; &gt;__operator WTF__OwnPtr&lt;KJS__Heap__ThreadRegistrar&gt; *+0xc
0012fac0 1039cd67 WebKit!KJS__Heap__registerThread+0x18
0012fad4 004770f0 WebKit!JSValueUnprotect+0x13
0012fb0c 005085da Safari+0x770f0
00000000 00000000 Safari+0x1085da

// Hmmm... uninitialized m_currentThreadRegistrar?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87487</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2008-07-31 06:50:59 -0700</bug_when>
    <thetext>Can you please tell us the steps to reproduce?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87488</commentid>
    <comment_count>2</comment_count>
    <who name="">808caaa4.8ce9.9cd6c799e9f6</who>
    <bug_when>2008-07-31 07:52:56 -0700</bug_when>
    <thetext>ntsdlog above is with:
host: v3.1.2 (525.21)
webkit: WebKit-r35417
OS: XPSP3 home, ja-JP

reproduction summary:
- open Preference.
- go to Appearance panel, and press Select. FontPicker view appears.
- close it.
- drwatson invoked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87489</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2008-07-31 07:54:15 -0700</bug_when>
    <thetext>Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87581</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-08-01 10:46:54 -0700</bug_when>
    <thetext>I could reproduce this with a nightly, but not with a local debug build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94741</commentid>
    <comment_count>5</comment_count>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2008-10-09 08:48:10 -0700</bug_when>
    <thetext>Hello,

I was able to reproduce it using a local debug build and following the steps already mentioned. I currently have revision 37446 on WinXP.

Here is the stack trace, taken from Visual Studio debugger:
1.WebKit.dll!JSC::Heap::registerThread()  Line 485 + 0x5 bytes	C++
2.WebKit.dll!JSValueUnprotect(const OpaqueJSContext * ctx=0x051e0170, const OpaqueJSValue * value=0x055f2700)  Line 266	C++
3.Safari.exe!FontPicker::~FontPicker()  + 0x40 bytes	
4.Safari.exe!FontPicker::`vector deleting destructor&apos;()  + 0x8 bytes	
5.Safari.exe!WindowDeleter::deleteAllWindows()  + 0x67 bytes	
6.Safari.exe!WindowDeleter::ProcessWindowMessage()  + 0x2a bytes	
7.Safari.exe!ATL::CWindowImplBaseT&lt;ATL::CWindow,ATL::CWinTraits&lt;2147483648,524416&gt; &gt;::WindowProc()  + 0x68 bytes	
8.user32.dll!_InternalCallWinProc@20()  + 0x28 bytes	
9.user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 bytes	
10.user32.dll!_DispatchMessageWorker@8()  + 0xdc bytes	
11.user32.dll!_DispatchMessageW@4()  + 0xf bytes	
12.Safari.exe!RSSPrefsDlg::`vector deleting destructor&apos;()  + 0x20f bytes	
13.Safari.exe!run()  + 0x9d bytes	
14.Safari.exe!_wWinMain@16()  + 0x34b bytes	
15.Safari.exe!_free()  + 0x1a1 bytes	
16.kernel32.dll!_BaseProcessStart@4()  + 0x23 bytes	

The problem in function *void Heap::registerThread()* from file javascriptcore/kjs/collector.cpp appears while calling:
if (pthread_getspecific(m_currentThreadRegistrar))

The problem is access violation while accessing a memory address. m_currentThreadRegistrar is not defined and cannot be seen in debugger.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95278</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-10-14 03:26:52 -0700</bug_when>
    <thetext>&lt;rdar://problem/6290576&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96608</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-10-24 15:19:41 -0700</bug_when>
    <thetext>A provisional fix for this was landed in &lt;http://trac.webkit.org/changeset/37868&gt; - please try a newer nightly!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96726</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-10-27 01:14:15 -0700</bug_when>
    <thetext>Reportedly, the original bug with crash on close is still present, re-opening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96727</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-10-27 01:48:57 -0700</bug_when>
    <thetext>OK, after some more investigation the crash on close turns out to be a Safari bug, now made visible by JSValueUnprotect() actually using the context value passed to it. Closing as INVALID, as a non-WebKit issue. Thank you very much for filing it, and providing additional information!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>