Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Quercus

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2009, 03:05 AM
yvesG yvesG is offline
Junior Member
 
Join Date: Aug 2009
Posts: 3
Default OutOfMemoryError wordpress 2.8.1

Hi

I am testing wordpress 2.8.1 with quercus 3.2.1 deployed under glassfish 2.1 ubuntu 9.04.
When i start the web application, after a while i get a OutOfMemoryError with the following log:
Code:
java.lang.OutOfMemoryError: Java heap space
        at com.caucho.quercus.env.StringBuilderValue.<init>(StringBuilderValue.java:66)
        at com.caucho.quercus.env.LargeStringBuilderValue.subSequence(LargeStringBuilderValue.java:356)
        at com.caucho.quercus.env.StringValue.substring(StringValue.java:1618)
        at com.caucho.quercus.lib.string.StringModule.explode(StringModule.java:593)
        at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.caucho.quercus.module.StaticFunction.invoke(StaticFunction.java:129)
        at com.caucho.quercus.env.JavaInvoker.callMethod(JavaInvoker.java:604)
        at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:539)
        at com.caucho.quercus.env.AbstractJavaMethod.callCopy(AbstractJavaMethod.java:91)
        at com.caucho.quercus.expr.FunctionExpr.evalImpl(FunctionExpr.java:180)
        at com.caucho.quercus.expr.FunctionExpr.evalCopy(FunctionExpr.java:150)
        at com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:86)
        at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64)
        at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.program.Function.callImpl(Function.java:352)
        at com.caucho.quercus.program.Function.call(Function.java:292)
        at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:309)
        at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:602)
        at com.caucho.quercus.expr.MethodCallExpr.eval(MethodCallExpr.java:104)
        at com.caucho.quercus.expr.Expr.evalArg(Expr.java:411)
        at com.caucho.quercus.expr.MethodCallExpr.eval(MethodCallExpr.java:97)
        at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64)
        at com.caucho.quercus.program.IfStatement.execute(IfStatement.java:84)
        at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.program.ForStatement.execute(ForStatement.java:76)
        at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.program.Function.callImpl(Function.java:352)
        at com.caucho.quercus.program.Function.call(Function.java:292)
        at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:309)
        at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:602)
        at MO.import_from_reader(/home/yves/Logiciels/geonetwork2.4final/web/wordpress/wp-includes/pomo/mo.php:138)
The (possibly) guilty php code in mo.php is:

Code:
function get_byteorder($magic) {

		// The magic is 0x950412de

		// bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565
		$magic_little = (int) - 1794895138;
		$magic_little_64 = (int) 2500072158;
		// 0xde120495
		$magic_big = ((int) - 569244523) && 0xFFFFFFFF;
		
		if ($magic_little == $magic || $magic_little_64 == $magic) {
			return 'little';
		} else if ($magic_big == $magic) {
			return 'big';
		} else {
			return false;
		}
	}

	function import_from_reader($reader) {
		$reader->setEndian('little');
		$endian = MO::get_byteorder($reader->readint32());
		if (false === $endian) {
			return false;
		}
		$reader->setEndian($endian);

		$revision = $reader->readint32();
		$total = $reader->readint32();
		// get addresses of array of lenghts and offsets for original string and translations
		$originals_lenghts_addr = $reader->readint32();
		$translations_lenghts_addr = $reader->readint32();

		$reader->seekto($originals_lenghts_addr);
		$originals_lenghts = $reader->readint32array($total * 2); // each of 
		$reader->seekto($translations_lenghts_addr);
		$translations_lenghts = $reader->readint32array($total * 2);

		$length = create_function('$i', 'return $i * 2 + 1;');
		$offset = create_function('$i', 'return $i * 2 + 2;');

		for ($i = 0; $i < $total; ++$i) {
			$reader->seekto($originals_lenghts[$offset($i)]);
			$original = $reader->read($originals_lenghts[$length($i)]);
			$reader->seekto($translations_lenghts[$offset($i)]);
			$translation = $reader->read($translations_lenghts[$length($i)]);
			if ('' == $original) {
				$this->set_headers($this->make_headers($translation));
			} else {
				$this->add_entry($this->make_entry($original, $translation));
			}
		}
		return true;
	}
Has anyone else got the same problem and has any idea ?
Thanks
Yves
Reply With Quote
  #2  
Old 08-07-2009, 09:29 PM
ferg ferg is offline
Administrator
 
Join Date: Aug 2009
Posts: 190
Default Quercus 4.0.1

We need to link the 4.0.1 quercus release. This should already be fixed.
Reply With Quote
  #3  
Old 08-10-2009, 07:20 AM
yvesG yvesG is offline
Junior Member
 
Join Date: Aug 2009
Posts: 3
Default

Looking forward to testing with version 4.0.1 then
Thank you
Yves.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:09 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.