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

Summary: Freeze after removing types of phpdoc tag
Product: php Reporter: junichi11
Component: EditorAssignee: Tomas Mysik <tmysik>
Status: RESOLVED FIXED    
Severity: normal CC: tmysik, twifty
Priority: P2    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: patch
patch v2

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.