Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 243789 - Debug Output Null Pointer Exception
Summary: Debug Output Null Pointer Exception
Status: CLOSED DUPLICATE of bug 241271
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Michael Spector CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-11 13:17 EDT by Shawn Clark CLA
Modified: 2020-05-14 13:21 EDT (History)
1 user (show)

See Also:


Attachments
Error messages of above bug contained in log file along with additional errors after the initialization (516.42 KB, text/plain)
2008-08-11 13:17 EDT, Shawn Clark CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Clark CLA 2008-08-11 13:17:50 EDT
Created attachment 109685 [details]
Error messages of above bug contained in log file along with additional errors after the initialization

Build ID: 3.4.0 I20080617-2000

Steps To Reproduce:
1. Start a XDebug session that has been setup as a multisession
2. Error shows up as:
An error has occurred. See error log for more details.
org.eclipse.php.internal.debug.core.xdebug.dbgp.model.DBGpMultiSessionTarget cannot be cast to org.eclipse.php.internal.debug.core.model.IPHPDebugTarget
3. Loading up any page while debug session is running causes a debug error with the details of just "error".

More information:
Attaching log file.
Comment 1 Shawn Clark CLA 2008-08-11 13:18:49 EDT
Forgot to include PDT build number... it was N20080810.
Comment 2 David Kelsey CLA 2008-08-12 05:46:06 EDT
There are 2 problems here

1. DBGpMultiSessionTarget needs to implement IPHPDebugTarget
2. There is a null pointer exception occuring in DebugOutputView

I have fixed issue 1 and put a workaround in for issue 2, but I think another PDT developer more familiar with the Debug Output implementation should take a look.

I recreate the problem by just running phpinfo() from apache. If more specific recreate is required then I can provide it.

The stacktrace is 
java.lang.NullPointerException
	at org.eclipse.wst.css.ui.internal.style.LineStyleProviderForEmbeddedCSS.getCachedParsingResult(LineStyleProviderForEmbeddedCSS.java:83)
	at org.eclipse.wst.css.ui.internal.style.LineStyleProviderForEmbeddedCSS.prepareRegions(LineStyleProviderForEmbeddedCSS.java:35)
	at org.eclipse.wst.sse.ui.internal.rules.StructuredDocumentDamagerRepairer.createPresentation(StructuredDocumentDamagerRepairer.java:48)
	at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.createPresentation(StructuredPresentationReconciler.java:919)
	at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.processDamage(StructuredPresentationReconciler.java:1046)
	at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler$InternalListener.inputDocumentChanged(StructuredPresentationReconciler.java:470)
	at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(TextViewer.java:2714)
	at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2763)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:541)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(ProjectionViewer.java:369)
	at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.setDocument(StructuredTextViewer.java:785)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:482)
	at org.eclipse.jface.text.TextViewer.setInput(TextViewer.java:2744)
	at org.eclipse.php.internal.debug.ui.views.DebugOutputView.update(DebugOutputView.java:189)
	at org.eclipse.php.internal.debug.ui.views.DebugOutputView.selectionChanged(DebugOutputView.java:137)
...

The problem occurs  in LineSytleProviderForEmbeddedCSS.prepareRegions. The call

IStructuredDocumentRegion wholeRegion = getDocument().getRegionAtCharacterOffset(regionStart);

returns null.
Comment 3 Michael Spector CLA 2008-09-02 06:36:23 EDT

*** This bug has been marked as a duplicate of bug 241271 ***
Comment 4 Gadi Goldbarg CLA 2008-10-05 08:49:51 EDT
fixed