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.
Summary: | NullPointerException when editing with suggestions view enabled | ||
---|---|---|---|
Product: | platform | Reporter: | gthb <gthb> |
Component: | Action Items | Assignee: | tasklist-issues@contrib <tasklist-issues> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Windows ME/2000 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
ide.log where the data loss occurred at the end
ide.log where the hang occurred at the end |
Description
gthb
2003-04-22 22:01:06 UTC
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. |