User account creation filtered due to spam.

Bug 25426 - NullPointerException from dtor of DomNode.LiveNodeList
Summary: NullPointerException from dtor of DomNode.LiveNodeList
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: 0.20
: P3 normal
Target Milestone: 0.20
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-15 10:28 UTC by Caolan McNamara
Modified: 2005-12-15 18:38 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-12-15 18:02:21


Attachments
check for null (223 bytes, patch)
2005-12-15 10:29 UTC, Caolan McNamara
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Caolan McNamara 2005-12-15 10:28:09 UTC
e.g. stack trace

#0  0x00550402 in __kernel_vsyscall ()
#1  0x0016d6f0 in raise () from /lib/libc.so.6
#2  0x0016ec68 in abort () from /lib/libc.so.6
#3  0x00df26c1 in _Jv_Throw (value=0x681cf90) at ../../../libjava/exception.cc:92
#4  0x00de6480 in _Jv_ThrowNullPointerException () at ../../../libjava/prims.cc:357
#5  0x012ad94e in gnu.xml.dom.DomNode$LiveNodeList.detach() () at gnu/xml/dom/DomNode.java:1298
#6  0x012addd2 in gnu.xml.dom.DomNode$LiveNodeList.item(int) ()
    at gnu/xml/dom/DomNode.java:1384
#7  0x0165e424 in ?? () from /usr/lib/libgcj.so.7
#8  0x0165e424 in ?? () from /usr/lib/libgcj.so.7
#9  0x06881048 in ?? ()
#10 0x0165e424 in ?? () from /usr/lib/libgcj.so.7
#11 0x00e2645e in java::util::zip::Inflater::init (this=0x47a08, no_header=20 '\024')
    at ../../../libjava/java/util/zip/natInflater.cc:208
#12 0x0165e424 in ?? () from /usr/lib/libgcj.so.7

I don't have a simple testcase for this. Affects using the OpenOffice.org2 build-time help content parser with libgcj dom impl (works using the sun doc impl with gcj).

Patch attached to fix
Comment 1 Caolan McNamara 2005-12-15 10:29:11 UTC
Created attachment 10492 [details]
check for null
Comment 2 Tom Tromey 2005-12-15 18:02:21 UTC
I'm handling this.
Chris Burdess said the patch looked ok, I will put it in.
Comment 3 Tom Tromey 2005-12-15 18:37:52 UTC
Subject: Bug 25426

Author: tromey
Date: Thu Dec 15 18:37:35 2005
New Revision: 108591

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108591
Log:
2005-12-15  Caolan McNamara  <caolanm@redhat.com>

	PR classpath/25426:
	* gnu/xml/dom/DomNode.java (detach): Check whether current is
	already null.

Modified:
    branches/gcc-4_1-branch/libjava/classpath/ChangeLog.gcj
    branches/gcc-4_1-branch/libjava/classpath/gnu/xml/dom/DomNode.java

Comment 4 Tom Tromey 2005-12-15 18:38:54 UTC
Patch in gcc 4.1 branch and classpath cvs head.
Comment 5 cvs-commit@developer.classpath.org 2005-12-15 20:33:52 UTC
Subject: Bug 25426

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Branch: 	
Changes by:	Tom Tromey <tromey@savannah.gnu.org>	05/12/15 18:37:09

Modified files:
	.              : ChangeLog 
	gnu/xml/dom    : DomNode.java 

Log message:
	PR classpath/25426:
	* gnu/xml/dom/DomNode.java (detach): Check whether current is
	already null.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5822&tr2=1.5823&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/dom/DomNode.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text