Mantis - Quercus
Viewing Issue Advanced Details
2108 block always 10-23-07 14:21 10-29-07 16:47
mo  
mo  
normal  
closed 3.1.4  
fixed  
none    
none 3.1.4  
0002108: PHPMyAdmin fails with NullPointerException
Tested phpMyAdmin 2.11.1.2 and found a NullPointerException caused
by a null Env ref in the thread local Env table. This issue was
reported on the quercus forum with the following trace:

500 Servlet Exception
java.lang.NullPointerException
at com.caucho.quercus.env.Value.toStringValue(Value.java:700)
at _quercus._libraries._js_0escape__lib__php$fun_PMA_escapeJsString.call(D:/resin-pro-3.1.3/webapps/phpmyadmin/libraries/js_escape.lib.php:65)
at com.caucho.quercus.program.CompiledFunction.callRef(CompiledFunction.java:56)
at _quercus._index__php.execute(D:/resin-pro-3.1.3/webapps/phpmyadmin/index.php:127)
at com.caucho.quercus.page.QuercusPage.executeTop(QuercusPage.java:119)
at com.caucho.quercus.servlet.ResinQuercusServlet.service(ResinQuercusServlet.java:146)
at com.caucho.quercus.servlet.QuercusServlet.service(QuercusServlet.java:353)
This problem seems to be the result of a missing call to Env.start(),
so the thread local Env ref never gets initialized.
 capacity.patch [^] (743 bytes) 10-26-07 19:46

Notes
(0002377)
mo   
10-23-07 17:01   
After further review, the problem actually seems to be a result
of a call to session_write_close near the top of index.php. This
case seems to already be covered by the following QA test.

php/1k6l.qa
(0002378)
mo   
10-23-07 18:28   
Verified that the attached patch fixes the 1k6l.qa test.
(0002397)
mo   
10-26-07 19:06   
The first NullPointerException issue is now fixed. Now I am
seeingthe following error:

500 Servlet Exception

com.caucho.quercus.QuercusExecutionException: java.lang.NullPointerException
    at java.lang.System.arraycopy(Native Method)
    at com.caucho.quercus.env.LargeStringBuilderValue.append(LargeStringBuilderValue.java:492)
    at com.caucho.quercus.env.LargeStringBuilderValue.subSequence(LargeStringBuilderValue.java:367)
    at com.caucho.quercus.lib.string.StringModule.trim(StringModule.java:4072)
(0002398)
mo   
10-26-07 19:47   
The null pointer exception is fixed by the following patch.
(0002412)
mo   
10-29-07 16:47   
Added php/1114.qa to test NPE in LargeStringBuffer.append()