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 239742 - Infinite loop to memory exhaustion on specific watch: java.sql.DatabaseMetaData.getClientInfoProperties()
Summary: Infinite loop to memory exhaustion on specific watch: java.sql.DatabaseMetaDa...
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.4
Hardware: Macintosh (x86) Mac OS X
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-23 15:35 UTC by ionuion
Modified: 2014-01-06 16:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Class file to be debugged (498 bytes, application/octet-stream)
2013-12-23 15:35 UTC, ionuion
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ionuion 2013-12-23 15:35:12 UTC
Created attachment 143408 [details]
Class file to be debugged

Environment:
Product Version: NetBeans IDE 7.4 (Build 201310111528)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b61
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b119
System: Mac OS X version 10.9.1 running on x86_64; UTF-8; en_US (nb)

Steps to reproduce.
1. Create new maven project with mysql:mysql-connector-java:jar:5.1.27:runtime as a dependency.
2. Add the attached App.java as a class to the project created at 1. Replace the current contents: the package name and valid information for a mysql db connection.
3. put a breakpoint on the line with the System.out.println.
4. Debug the project.
5. When the counter has reached the breakpoint at 3. in the Variables window enter two new watches with the same content:
java.sql.DatabaseMetaData.getClientInfoProperties()
6. press Enter to start evaluation.

Expected result:
Either error on invalid expression passed in the watch, or successful evaluation

Actual result:
A large number of warning windows opened. Leaving Netbeans IDE long enough in this state the whole heap gets to be used, garbage collection called every 3 to 4 seconds. While closing some of the windows I got at some point a Comodification exception, ClassNotFoundExceptions and others. This seems to be a precious use case. I don't have the exceptions in the logs anymore as they log pretty quickly with this content:
ALL [null]: During evaluation of 'java.sql.DatabaseMetaData.getClientInfoProperties()'

Also reproducible on
Product Version: NetBeans IDE Dev (Build 201312170002)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b61
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b119
System: Mac OS X version 10.9.1 running on x86_64; UTF-8; en_US (nb)
Comment 1 Martin Entlicher 2014-01-06 16:08:20 UTC
Reproduced. The problem is, that you're trying to evaluate a method on an interface.
Fixed by changeset:   270064:7289d6fd9574
http://hg.netbeans.org/core-main/rev/7289d6fd9574