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 190622

Summary: Php editor hangs in certain situations while writing Phpdoc
Product: php Reporter: mgracio
Component: PHPDocAssignee: issues@php <issues>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mdekrijger, rmatous
Priority: P1    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: This is the file that triggers the crash
This is the log from usedir/netbeans/6.9/var/log
This way is even easier to cause the crash

Description mgracio 2010-09-27 17:52:18 UTC
Hello.
This has benn happening once in a while since 6.9 and now the same in 6.9.1, but I finally think I have a situation that can be replicated. I created a php project, for testing. There is only one file, which I'm sending as attachment.
Here is what happens, I show here the bit of code that is relevant:

abstract class DadosGps{
    protected $dados=NULL;
    public function __construct($params=null) {
      $this->inicializar();
    }
    //Quaisquer inicializacoes necessárias a classe
    abstract public function inicializar($params=null);

I first go to the
//Quaisquer inicializacoes necessárias a classe
Line and remove the second / character, if I wait a bit, several red exclamation points appear signaling an error, after that I write ** and press enter, creating a phpdoc comment that looks like:
/**
* Quaisquer inicializacoes necessárias a classe
*/

So far so good, now if I go to the end of the: abstract class DadosGps{ line, press enter to create a new line and press /** and enter again, instead of creating the phpdoc for the:
protected $dados=NULL; 
variable, netbeans hangs indefinitly. I have recreated this behaviour several times with this file so it seems to be fairly predictable.
The critical part seems to be waiting after removing the / character for netbeans to signal errors in the code, if I don't wait and write quickly enough, it doesn't hang.
It may have something to do with that bit of commented code after:
class DadosGpsWebSrv extends DadosGps{
    private $client;
not shown here) as it apperas that if I remove it, the crash does not seem to occur (at least not the one time I tried it)
The log file does not appear to have anything regarding these crashes.
I hope this helps you find what the problem is, because it is very annoying.
Thank you.
Regards,
  Marco Gracio
Comment 1 mgracio 2010-09-27 17:53:07 UTC
Created attachment 102168 [details]
This is the file that triggers the crash
Comment 2 mgracio 2010-09-27 17:54:34 UTC
Created attachment 102169 [details]
This is the log from usedir/netbeans/6.9/var/log

Maybe it will help
Comment 3 mgracio 2010-09-28 14:36:56 UTC
Created attachment 102180 [details]
This way is even easier to cause the crash

In this example, all I have to do is:
<?php
  class ElemDadosGps{
    public $dadosRaw;

Enter a line after <?php and try and insert a phpdoc /** plus enter  like so:
<?php
  /**
  class ElemDadosGps{
    public $dadosRaw;

And netbeans hangs.
This doesn't seem to happen nearly as often when I edit files with functions, could it be because of the classes?

Regards,
 Marco Gracio
Comment 4 Petr Pisl 2010-10-06 12:55:58 UTC
Radek, you have tried this a few weeks ago. Do you remember whether the fix was for NB 6.9.1?
Comment 5 Petr Pisl 2010-10-06 12:58:29 UTC
*** Bug 190543 has been marked as a duplicate of this bug. ***
Comment 6 Petr Pisl 2010-10-13 13:27:15 UTC
I have just noticed that it's reported against 6.9. I did some fixes just after 6.9.1 release. I can not reproduce it now in the dev build.

*** This bug has been marked as a duplicate of bug 188718 ***
Comment 7 mgracio 2010-10-13 18:31:29 UTC
(In reply to comment #6)
> I have just noticed that it's reported against 6.9. I did some fixes just after
> 6.9.1 release. I can not reproduce it now in the dev build.
> 
> *** This bug has been marked as a duplicate of bug 188718 ***

Hi.
Thanks for the reply.
I failed to inform that I have NetBeans IDE 6.9.1 (Build 201007282301) which oddly enough seems a later version than the one mentioned on the post regarding  bug 188718 that had this bug removed (which was 201007170001).
Should I install the latest nightly build which is 201010130000 or just wait for a new stable version? (6.9.2?)  
I don't see any mention if the nighly builds are stable enough for a production environment that is why I ask.
As we are on the subject would you happen to know when a new stable version is planned for release?

Regards,
 Marco