This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179309 - org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x{2}) was found in the value of attribute "{1}" and element is "17".
Summary: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x{2}) was ...
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-08 06:58 UTC by pekarna
Modified: 2011-01-06 09:02 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 151495


Attachments
stacktrace (1.15 KB, text/plain)
2010-01-08 06:59 UTC, pekarna
Details
stacktrace (1.14 KB, text/plain)
2010-06-29 09:38 UTC, Filip Zamboj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pekarna 2010-01-08 06:58:56 UTC
Build: NetBeans IDE 6.8 (Build 200912041610)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows XP, 5.2, amd64

User Comments:
pekarna: Debugging PHP app with xdebug.

GUEST: Degging PHP code, using fpdf library

calvaria_despair: After updating Netbeans 6.7 to 6.7.1, a bug occured 7 hours later. Now, when i'm debuging, this problem occurs

GUEST: Debug application, press F8 
Using fpdf class library

GUEST: debugging a php script

GUEST: debugging some PHP-code via Xdebug (PDF-creation)

GUEST: Debugger springt auf die erste Zeile der Funktion 
  function Output($name='', $dest='') 
der Klasse FPDF

GUEST: Debugging PHP Application

GUEST: I was debugging a PHP page



Stacktrace: 
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x{2}) was found in the value of attribute "{1}" and element is "17".
   at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:239)
   at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
   at org.netbeans.modules.php.dbgp.packets.DbgpMessage.getNode(DbgpMessage.java:315)
   at org.netbeans.modules.php.dbgp.packets.DbgpMessage.create(DbgpMessage.java:130)
   at org.netbeans.modules.php.dbgp.DebugSession.receiveData(DebugSession.java:378)
   at org.netbeans.modules.php.dbgp.DebugSession.sendCommands(DebugSession.java:332)
Comment 1 pekarna 2010-01-08 06:59:01 UTC
Created attachment 93134 [details]
stacktrace
Comment 2 Filip Zamboj 2010-06-29 09:38:04 UTC
Created attachment 100481 [details]
stacktrace

thrown while debugging right after stop on breakpoint.
Comment 3 Filip Zamboj 2010-09-15 12:30:40 UTC
batch reassigning
Comment 4 Exceptions Reporter 2010-12-10 10:54:57 UTC
This bug already has 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=151495
Comment 5 pgebauer 2010-12-20 14:46:56 UTC
It seems like a duplicate of XDebug issue #421 ( http://bugs.xdebug.org/view.php?id=421 ). The issue should be fix in the in revision 2488 of XDebug.

Could somebody from reporters check whether the issue is reproducible with the revision 2488 of XDebug or greater?
Comment 6 nexxer 2010-12-22 10:08:30 UTC
I'm still getting this in latest stable Netbeans 7.0 Beta while debugging a PHP file on PHP 5.2.6 with Xdebug 2.1.0 on Windows 7 64bit.

The exception is thrown right after I step over the 2nd line below:

define('EL_GAMMA', chr(hexdec('0x13')));
$arr = array(EL_GAMMA=>'Γ') ;

org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x{2}) was found in the value of attribute "{1}" and element is "13".

This bug does not appear on Netbeans 6.9.1
Comment 7 Petr Pisl 2011-01-04 16:30:47 UTC
I have a fix for this. The fix is basically workaround for a bug in x debug. I will commit it tomorrow.
Comment 8 Petr Pisl 2011-01-05 13:23:45 UTC
The fix is committed in the webmain. The mentioned bug
http://bugs.xdebug.org/view.php?id=421 is not this case. The bug 421 in xdebug
is already fixed and I'm not able to reproduce it. I have created new bug
http://bugs.xdebug.org/view.php?id=650 for xdebug with this case.

This doesn't work in NB 6.9.1 as well. Only in the final build the exception
was not displayed, but written in the log file. The issue was there from
beginning (from NB 6.5).

My fix filter the messages from xdebug and removes the invalid xml characters.
The impact is that the values of the variables will not contain the characters
that are not valid for xml. On the other hand our debugger is not crashes due
the mentioned bug in xdebug and displays all others variables correctly.
Comment 9 nexxer 2011-01-05 14:47:25 UTC
I will test this on today's nightly when it gets built. 

Just to add to this, xdebug will not show any new variables or changes to existing variables after it encounters such a problematic character.
Comment 10 Petr Pisl 2011-01-05 14:58:26 UTC
If the fix will not be propagated in to the main repo this night then you can try a build from http://bertram.netbeans.org/hudson/job/PHP-build/ . It should be available from build #2709 .
Comment 11 nexxer 2011-01-05 16:10:22 UTC
Thanks for the quick fix Petr, it works great.
Comment 12 Quality Engineering 2011-01-06 09:02:03 UTC
Integrated into 'main-golden', will be available in build *201101060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3591b06ce29a
User: Petr Pisl <ppisl@netbeans.org>
Log: #179309 - org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x{2}) was found in the value of attribute "{1}" and element is "17".