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.
I have been experiencing a series of exceptions, the first of which is clearly within tasklist. After these exceptions the IDE hangs. I can't be sure that the rest of the exceptions and the hang are related to the tasklist NPE, but I wasn't experiencing them before installing tasklist (and, admittedly, several other modules at the same time). Furthermore, in attempting to reproduce the problem for this bug report, I experienced the file I was working on being erased! I.e. made empty, and saved that way. I was lucky to have just committed my changes. Again, can't be sure that this was tasklist's doing though. The hang did not occur in this case. I will attach the ide.log from these two runs: where the hang occurred, and where the data loss occurred. In both cases, the first exception is in SuggestionManagerImpl. Please judge for yourself which of the other stuff, if any, is directly related to tasklist. This was in NB 3.5 beta 1, after installing tasklist and some other modules, and also with my own unreleased build of pmd-netbeans 0.71 from the PMD project, which I was going to test; we are about to release that. I do not think the PMD version update is related, but again can't be sure; in any case it was perfectly stable before I installed these other modules including tasklist.
Created attachment 10090 [details] ide.log where the data loss occurred at the end
Created attachment 10091 [details] ide.log where the hang occurred at the end
I have not succeeded in pinpointing what I'm doing when this happens. I can reproduce the NPE itself just by editing with the tasklist suggestions output window open, but I haven't been able to get the hang again. Will report here with a thread dump if I manage to get it.
The tasklist exception should be innocuous; it's saying that you have selected the "Show" action in the suggestion window's context menu, and it ran into an error while trying to disable or enable a suggestion provider. This will not cause the second exception, which is the cause for your data loss - in the middle of updating a document it throws an exception. That looks like an editor bug to me. I think you should file a bug against the editor as well, using the same stack trace. I don't want to transfer this bug since I want to find out why you're getting an NPE when changing the filter. You said you could reproduce the exception - by editing with the window open. Is it that simple? Did you not select the Show action? Can you restart the IDE and tell me exactly what steps you take until you hit the exception? By the way, it looks like your document may have read only regions - is that true?
Hm, I took a look at your second log file, which shows some other exceptions. It looks like something is corrupt in the editor.
You are quite possibly right that I did select the Show action when I got the SuggestionManager NPE (presumably the exceptions I reproduced with just general editing were the ones in the editor). The project I was in has no GUI code, so I'm fairly sure there were no read-only regions (unless something *really* fishy was going on! :) I'll file the editor bugs now. Thanks!
I've fixed the problem pin pointed by your second log file attachment (might also have caused the first, but I'm not sure about that). I've committed the fix to the trunk and I've also backported it to the release35 branch. I updated the tasklist webpage download, and sent an updated .nbm bundle to the update center maintainer, so hopefully the fix should be available soon. (Look for version 1.0.3 (stable) or version 1.6 (unstable) of the tasklist/suggestions module). I'm renaming the summary since I don't believe the data loss (the gap buffer exception) is related to this. The root problem was that fixing an action (double clicking it) is a slow process - it creates a confirmation dialog, highlights the editor line, etc. If a rescan (which can also be slow) is occurring in the interval between double clicking and confirming the dialog (not at all unlikely), then the action being fixed will get removed during the rescan, and its suggestion-list field nulled out. This was then "dereferenced" which caused the NPE. I've modified the code such that tasks that are removed are marked as zombies, and in the fix code, I look to see if the candidate is a zombie, and if so, search for its reincarnation in the rescanned list. I could reproduce your exception and this fix solved my testcase. Let me know if you see further problems in this area after getting the updated version of the modules. I will close this bug as fixed; if you find additional exceptions file them as a new separate bug (since it must have a separate root cause). And thanks for your help!
It was resolved in 3.6 time or earlier.