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 164797 - IDE is freezing when invoking code completion
Summary: IDE is freezing when invoking code completion
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-08 19:13 UTC by Filip Zamboj
Modified: 2011-12-13 07:24 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump using visualvm (18.15 KB, text/plain)
2009-05-08 19:14 UTC, Filip Zamboj
Details
Patch for JsEmbeddingProvider (1.46 KB, text/plain)
2009-05-12 15:20 UTC, Vitezslav Stejskal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Zamboj 2009-05-08 19:13:34 UTC
Thread dump attached. 

IDE is freezing when (probably) trying to invoke html code completion. I found this issue in this particular case so far
but will report when I find another case, immediately. 

Product Version: NetBeans IDE Dev (Build 2009-05-08_15-03-54 )
Java: 1.6.0_14-ea; Java HotSpot(TM) 64-Bit Server VM 14.0-b12

steps to reproduce: 
consider this code: 
<?php
/*
 *
define("DB_HOST", "localhost");

$conn = mysql_connect (DB_HOST, DB_USER, DB_PASS)
    OR DIE ("Can't connect to database");
mysql_select_db(DB_DATA, $conn);
mysql_set_charset("utf8", $conn);
*/

include("../configs/DB.inc.php");
include("../php/DBClass.php");
include("../php/CompanyClass.php");
$db = new DB();
$db->_construct(); 

if (isset($_POST['ic_input'])) {

//THIS IS A PLACE WE WILL ADD A NEW CODE 

$company = new Company();
$testIc = $company->testIc($ic);
echo $testIc['msg'];
return $testIc['result']; 
}

?>

try to write on place I marked in code this: 
?>
<script language="javascript"> 
<? 

when you are done with javascript"> it should offer you code completion to close this tag. IDE freezes instead. 

I'll try to reproduce on lower jdk because this is ea version ... but anyway, the only workaround is to kill IDE and
loose your changes.
Comment 1 Filip Zamboj 2009-05-08 19:14:07 UTC
Created attachment 81828 [details]
thread dump using visualvm
Comment 2 Filip Zamboj 2009-05-08 19:36:53 UTC
reproduced on 
 
Product Version         = NetBeans IDE Dev (Build 2009-05-08_15-03-54 )
Operating System        = Linux version 2.6.28-11-generic running on amd64
Java; VM; Vendor        = 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02; Sun Microsystems Inc.

that probably tells us is not a jdk related bug 
Comment 3 Vitezslav Stejskal 2009-05-12 14:23:07 UTC
I think I can reproduce it, although with different steps. It's not a deadlock, but rather something around embeddings...
Comment 4 Vitezslav Stejskal 2009-05-12 15:18:46 UTC
This seems to be caused by Marek's http://hg.netbeans.org/main-silver/rev/7bab9553c2c1. I'm going to attach a patch that
IMO fixes the problem.
Comment 5 Vitezslav Stejskal 2009-05-12 15:20:10 UTC
Created attachment 81974 [details]
Patch for JsEmbeddingProvider
Comment 6 Vitezslav Stejskal 2009-05-12 15:22:21 UTC
Marku, please review the patch and apply. Thanks
Comment 7 Marek Fukala 2009-05-12 15:35:22 UTC
fixed in web-main#87ef93887732, thanks Vito, but just reassigning is enought.
Comment 8 Quality Engineering 2009-05-13 07:46:01 UTC
Integrated into 'main-golden', will be available in build *200905130201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/87ef93887732
User: Marek Fukala <mfukala@netbeans.org>
Log: #164797 - IDE is freezing when invoking code completion
Comment 9 Vladimir Riha 2011-12-13 07:24:49 UTC
v.