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 182594 - extensive memory usage while debugging
Summary: extensive memory usage while debugging
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-23 16:13 UTC by Filip Zamboj
Modified: 2010-03-25 15:48 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log - socket exceptions are thrown in the end of file (then i had to turn off computer) (2.84 MB, application/octet-stream)
2010-03-23 16:13 UTC, Filip Zamboj
Details
Testfile (1.13 KB, application/x-httpd-php)
2010-03-23 16:14 UTC, Filip Zamboj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Zamboj 2010-03-23 16:13:21 UTC
Created attachment 95616 [details]
messages.log - socket exceptions are thrown in the end of file (then i had to turn off computer)

netbeans is increasing memory usage while running debugging session. Looks like it's happening only when evaluation occurs. 

you can observe several socket exceptions thrown in messages.log. They are thrown repeatedly one after another. 

try to debug through attached file and use tooltips on variables - you should run into troubles after a while.
Comment 1 Filip Zamboj 2010-03-23 16:14:40 UTC
Created attachment 95617 [details]
Testfile
Comment 2 Filip Zamboj 2010-03-23 16:15:59 UTC
PHP 5.3.2 (cli) (built: Mar 23 2010 15:19:23) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0beta3, Copyright (c) 2002-2010, by Derick Rethans
Comment 3 rmatous 2010-03-24 13:58:58 UTC
http://hg.netbeans.org/web-main/rev/6458c0e2824e

summary:
- Watches and Balloon Evaluation disabled as default
- hovering over variable should still work (hopefully shouldn't crash)


Hovering over variable calls "property_get" instead  of "eval" command now.
Selection still sends "eval" command, but as default disabled.
Watches as default disabled. 

Affects issues:
https://netbeans.org/bugzilla/show_bug.cgi?id=182594
https://netbeans.org/bugzilla/show_bug.cgi?id=181186
https://netbeans.org/bugzilla/show_bug.cgi?id=180252

Related to(xdebug issue):
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000313

Please test and comment, verify, reopen
Comment 4 berniev 2010-03-24 19:13:57 UTC
Opened project, debug project, run to breakpoint, stepping through code. 
1. Within a few steps very frequent errors.
2. Variable hover is not showing variable value
3. Often the editor color highlighting fails for large chunks of source (but not whole file).
4. Did not trigger memory usage problem
5. Did not test with hover/watch enabled
6. Is unusable due to repeated errors

Apologies for in-lining..
==============================================
java.lang.AssertionError
	at org.netbeans.modules.editor.lib2.view.NewlineView.modelToViewChecked(NewlineView.java:141)
	at org.netbeans.modules.editor.lib2.view.EditorBoxViewChildren.modelToViewChecked(EditorBoxViewChildren.java:557)
	at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.modelToViewChecked(ParagraphViewChildren.java:273)
	at org.netbeans.modules.editor.lib2.view.EditorBoxView.modelToViewChecked(EditorBoxView.java:395)
	at org.netbeans.modules.editor.lib2.view.EditorBoxViewChildren.modelToViewChecked(EditorBoxViewChildren.java:557)
	at org.netbeans.modules.editor.lib2.view.EditorBoxView.modelToViewChecked(EditorBoxView.java:395)
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewChecked(DocumentView.java:583)
	at org.netbeans.modules.editor.lib2.view.EditorView.modelToView(EditorView.java:250)
	at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1497)
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1035)
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1010)
	at org.netbeans.editor.BaseTextUI.getYFromPos(BaseTextUI.java:317)
	at org.netbeans.editor.BaseTextUI.insertUpdate(BaseTextUI.java:438)
	at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.insertUpdate(PriorityDocumentListenerList.java:79)
	at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)
	at org.netbeans.editor.BaseDocument.fireInsertUpdate(BaseDocument.java:1631)
	at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:784)
	at org.netbeans.modules.uihandler.SubmitPanel.setText(SubmitPanel.java:162)
[catch] at org.netbeans.modules.uihandler.Installer$SubmitInteractive$DataLoader.run(Installer.java:2012)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:133)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
========================================================
java.lang.NullPointerException
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1027)
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1010)
	at org.netbeans.editor.GlyphGutter.changedLine(GlyphGutter.java:590)
	at org.netbeans.editor.Annotations.fireChangedLine(Annotations.java:605)
	at org.netbeans.editor.Annotations.refreshLine(Annotations.java:525)
	at org.netbeans.editor.Annotations.removeAnnotation(Annotations.java:360)
	at org.netbeans.modules.editor.NbEditorDocument.removeAnnotation(NbEditorDocument.java:274)
	at org.openide.text.NbDocument.removeAnnotation(NbDocument.java:523)
	at org.netbeans.modules.csl.editor.overridden.IsOverriddenAnnotation.detachImpl(IsOverriddenAnnotation.java:102)
	at org.netbeans.modules.csl.editor.overridden.AnnotationsHolder$2.run(AnnotationsHolder.java:143)
	at org.netbeans.modules.csl.editor.overridden.AnnotationsHolder.setNewAnnotations(AnnotationsHolder.java:153)
	at org.netbeans.modules.csl.editor.overridden.AnnotationsHolder.checkForReset(AnnotationsHolder.java:126)
	at org.netbeans.modules.csl.editor.overridden.AnnotationsHolder.propertyChange(AnnotationsHolder.java:113)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.openide.text.CloneableEditorSupport.firePropertyChange(CloneableEditorSupport.java:529)
	at org.openide.text.CloneableEditor.componentOpened(CloneableEditor.java:795)
	at org.openide.windows.WindowManager.componentOpenNotify(WindowManager.java:300)
Caused: java.lang.IllegalStateException: [Winsys] TopComponent org.openide.text.CloneableEditor throws exception/error from its componentOpened() method.
Please repair it! Probable cause is at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1027)
	at org.openide.windows.WindowManager.logThrowable(WindowManager.java:363)
	at org.openide.windows.WindowManager.componentOpenNotify(WindowManager.java:302)
	at org.netbeans.core.windows.WindowManagerImpl.notifyTopComponentOpened(WindowManagerImpl.java:972)
	at org.netbeans.core.windows.Central.insertModeOpenedTopComponent(Central.java:814)
	at org.netbeans.core.windows.ModeImpl.addOpenedTopComponent(ModeImpl.java:319)
	at org.netbeans.core.windows.WindowManagerImpl.topComponentOpenAtTabPosition(WindowManagerImpl.java:1082)
	at org.openide.windows.TopComponent.openAtTabPosition(TopComponent.java:506)
	at org.openide.text.CloneableEditorSupport.replaceTc(CloneableEditorSupport.java:2374)
	at org.openide.text.CloneableEditorSupport.openPane(CloneableEditorSupport.java:2412)
	at org.openide.text.CloneableEditorSupport.openAtImpl(CloneableEditorSupport.java:2510)
	at org.openide.text.CloneableEditorSupport.openReuse(CloneableEditorSupport.java:2483)
	at org.openide.text.EditorSupportLineSet$SupportLine.show(EditorSupportLineSet.java:128)
	at org.openide.text.Line.show(Line.java:324)
[catch] at org.netbeans.modules.php.dbgp.models.AbstractIDEBridge$1.run(AbstractIDEBridge.java:93)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:133)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
================================================
Comment 5 Quality Engineering 2010-03-25 05:55:34 UTC
Integrated into 'main-golden', will be available in build *201003250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/6458c0e2824e
User: Radek Matous <rmatous@netbeans.org>
Log: #182594  -  extensive memory usage while debugging
#181186  -  Watches and Balloon Evaluation
#180252  -  Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug 2.0.5/2.1.0beta2 on opensuse 11.1 64bit
Comment 6 rmatous 2010-03-25 10:03:54 UTC
the exceptions reported by user has nothing to do with debugger(not php support) implementation but are valid bugs. Anyway should be reported separately into other issues. Important note - yesterday's build was really fragile because  of many changes while we are still in 6.9 not even in beta phase.

This issue is  about extensive memory usage while debugging php,  hovering over variable should still work, if not it makes sense to open new issue. Would be nice to have steps how to reproduce including debugged file for example. Works for me in my test scenarios.

Filipe, can you try it again and test:
- Watches and Balloon Evaluation disabled as default 
- hovering over variable should still work, no extensive memory usage while debugging php, no crash

thanks
Comment 7 Filip Zamboj 2010-03-25 10:50:53 UTC
(In reply to comment #6)
> the exceptions reported by user has nothing to do with debugger(not php
> support) implementation but are valid bugs. Anyway should be reported
> separately into other issues. Important note - yesterday's build was really
> fragile because  of many changes while we are still in 6.9 not even in beta
> phase.
> 
> This issue is  about extensive memory usage while debugging php,  hovering over
> variable should still work, if not it makes sense to open new issue. Would be
> nice to have steps how to reproduce including debugged file for example. Works
> for me in my test scenarios.
> 
> Filipe, can you try it again and test:
> - Watches and Balloon Evaluation disabled as default 

works in 
Product Version: NetBeans IDE Dev (Build 100325-4a35be446419)

> - hovering over variable should still work, no extensive memory usage while
> debugging php, no crash
not reproduced on 
Product Version: NetBeans IDE Dev (Build 100325-4a35be446419)
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01

that means it most probably works. If somebody has troubles with hovering over variable then he/she should file new issue. 

debugger didn't crash this time. so looks like memory issue is resolved as well. 
 
> thanks

Radek, I guess you can close this as resolved fixed.