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 196720 - StackOverflowError at org.netbeans.modules.java.hints.introduce.CopyFinder.scan
Summary: StackOverflowError at org.netbeans.modules.java.hints.introduce.CopyFinder.scan
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-15 10:36 UTC by Exceptions Reporter
Modified: 2011-05-20 08:06 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 165783


Attachments
stacktrace (85.03 KB, text/plain)
2011-03-15 10:36 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2011-03-15 10:36:23 UTC
Build: NetBeans IDE 7.0 Beta 2 (Build 201102140001)
VM: Java HotSpot(TM) Client VM, 19.1-b02, Java(TM) SE Runtime Environment, 1.6.0_24-b07
OS: Linux

User Comments:
GUEST: Trying to go to the class declaration

helkav: opened instance of NetBeans with previously loaded java project

tveimo: editing some java code while having pasted in some php code to have onscreen as reference

    public static int iptoint(String ip) {
        String [] parts = ip.split("\."); //$parts=split("\.",$ip);
        int r = 0;
        for (int i = 0; i < 4; i++) {
            r = 256 * r + parts[i];
        }
        return r; // was editing at this point.
  for ($i=0; $i<4; $i++)
    $r=256*$r+$parts[$i];
  return $r;
    }

function checkoverlap($fromip,$toip,$userid) {
  if ($toip<$fromip) return -1;
  $res=mysql_query("SELECT fromIP, toIP, userid FROM access WHERE toIP>=$fromip AND userid<>$userid ORDER BY toIP LIMIT 1");
  $row=mysql_fetch_row($res);
  if ($row[0] && $row[0]<=$toip) return $row[2];
  $res=mysql_query("SELECT fromIP, toIP, userid FROM access WHERE fromIP<=$toip AND userid<>$userid ORDER BY fromIP DESC LIMIT 1");
  $row=mysql_fetch_row($res);
  if ($row[1] && $row[1]>=$fromip) return $row[2];
  return 0;
}

function inttoip($inte) {
  $r=array();
  for ($i=0; $i<4; $i++)

GUEST: selecting text

tveimo: editing java code while having pasted in old php code for reference. The syntax highlighter doesn't seem to like that..




Stacktrace: 
java.lang.StackOverflowError
   at org.netbeans.modules.java.hints.introduce.CopyFinder.scan(CopyFinder.java:343)
   at org.netbeans.modules.java.hints.introduce.CopyFinder.scan(CopyFinder.java:380)
   at org.netbeans.modules.java.hints.introduce.CopyFinder.scan(CopyFinder.java:380)
   at org.netbeans.modules.java.hints.introduce.CopyFinder.scan(CopyFinder.java:380)
   at org.netbeans.modules.java.hints.introduce.CopyFinder.scan(CopyFinder.java:380)
   at org.netbeans.modules.java.hints.introduce.CopyFinder.scan(CopyFinder.java:380)
Comment 1 Exceptions Reporter 2011-03-15 10:36:27 UTC
Created attachment 107016 [details]
stacktrace
Comment 2 Jan Lahoda 2011-03-24 12:52:31 UTC
This should fix it:
http://hg.netbeans.org/jet-main/rev/71ea93b57367
Comment 3 Quality Engineering 2011-03-28 08:49:05 UTC
Integrated into 'main-golden', will be available in build *201103280400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/71ea93b57367
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #196720: disable variable matching unless the variable matching is required.
Comment 4 Jaromir Uhrik 2011-05-16 21:13:51 UTC
I am not sure how to verify this issue. Is there anybody who is able to verify in the trunk? Thanks.
Comment 5 Jan Lahoda 2011-05-17 09:01:29 UTC
Sorry, I do not have exact steps to reproduce (I guessed the root cause from the stack trace).
Comment 6 Jaromir Uhrik 2011-05-17 11:51:55 UTC
Since there are no known regressions related to this issue I am marking as Verified to assure that the fix will be in patch1. Honzo, please integrate the fix.
Comment 7 Jan Lahoda 2011-05-17 12:14:48 UTC
Applied to release70_fixes:
http://hg.netbeans.org/releases/rev/00e6ec7c6cef
Spec. versions and long descriptions updated:
http://hg.netbeans.org/releases/rev/ab821ef74098
Comment 8 Jaromir Uhrik 2011-05-20 08:06:23 UTC
Verified in patch1 the same way as in trunk.