Bug 196720

Summary: StackOverflowError at org.netbeans.modules.java.hints.introduce.CopyFinder.scan
Product: java Reporter: Exceptions Reporter <exceptions_reporter>
Component: HintsAssignee: Jan Lahoda <jlahoda>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: adamansky, helkav, tveimo
Version: 7.0   
Target Milestone: 7.0.1   
Hardware: All   
OS: All   
Whiteboard: EXCEPTIONS_REPORT 70patch1-verified
Issue Type: DEFECT Exception Report: 165783
Attachments: stacktrace

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.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo