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 257953 - Freeze after removing types of phpdoc tag
Summary: Freeze after removing types of phpdoc tag
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 257998 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-12 05:38 UTC by junichi11
Modified: 2016-02-16 02:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch (6.54 KB, patch)
2016-02-14 03:46 UTC, junichi11
Details | Diff
patch v2 (5.95 KB, patch)
2016-02-15 02:55 UTC, junichi11
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description junichi11 2016-02-12 05:38:45 UTC
Steps to reproduce:
1. write the phpdoc with a @param tag
/**
 * Description.
 * @param type $name Description
 */

2. remove " type $name Description"
/**
 * Description.
 * @param
 */

3 freeze

Thanks.
Comment 1 Tomas Mysik 2016-02-12 09:04:44 UTC
We need a thread dump [1]. Please, reproduce your problem, create thread dump and attach it to this issue.

Thanks.
[1] http://wiki.netbeans.org/GenerateThreadDump
Comment 2 junichi11 2016-02-12 12:20:55 UTC
I'll do that later.

The cause is the spellchecker for PHPDoc comments, sorry. Go into an infinite loop when the tag is checked. 

Thanks.
Comment 3 Tomas Mysik 2016-02-12 12:51:27 UTC
(In reply to junichi11 from comment #2)
> The cause is the spellchecker for PHPDoc comments, sorry. Go into an
> infinite loop when the tag is checked.

I see. Feel free to attach a patch or I can look at it if you prefer.

Thanks.
Comment 4 junichi11 2016-02-12 13:01:56 UTC
(In reply to Tomas Mysik from comment #3)
> I see. Feel free to attach a patch or I can look at it if you prefer.

If I cannot fix it, let you know. 

Thanks!
Comment 5 junichi11 2016-02-14 03:46:09 UTC
Created attachment 158489 [details]
patch

I prevented it in the PHPTokenList. But I think that types should be an empty list in the PHPDocCommentParser if there is no type.

Tomas, could you please review it?

Thanks!
Comment 6 junichi11 2016-02-15 02:55:51 UTC
Created attachment 158499 [details]
patch v2

Just removed unused imports. 

Thanks.
Comment 7 Tomas Mysik 2016-02-15 07:45:10 UTC
Patch seems fine to me. Thanks!
Comment 8 Tomas Mysik 2016-02-15 10:13:42 UTC
Patch applied, thanks!

http://hg.netbeans.org/web-main/rev/5a301e1003e8
Comment 9 junichi11 2016-02-16 00:33:40 UTC
*** Bug 257998 has been marked as a duplicate of this bug. ***
Comment 10 Quality Engineering 2016-02-16 02:52:34 UTC
Integrated into 'main-silver', will be available in build *201602160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5a301e1003e8
User: Tomas Mysik <tmysik@netbeans.org>
Log: #257953 - Freeze after removing types of phpdoc tag

Patch contributed by junichi11@netbeans.org.