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: | [74cat] AssertionError: no object for UID KeyBasedUID on FileKey (D:/PROJECTS/Identification/Application/N/, D:\PROJECTS\Identification\Application\IdEmulation\src\ExpressionParser.cpp) in object class org.ne | ||
---|---|---|---|
Product: | cnd | Reporter: | kosmonaffft |
Component: | Code Model | Assignee: | Vladimir Voskresensky <vv159170> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | alexvsimon |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 198528 |
Attachments: |
stacktrace
fix |
Description
kosmonaffft
2013-02-12 10:29:28 UTC
Created attachment 131282 [details]
stacktrace
*** Bug 241820 has been marked as a duplicate of this bug. *** Code model cache was reworked in Netbeans 8.0. see steps to reproduce in the exception report 800811 Thanks for reproducible test case. To reproduce the issue close Navigator and use the following c++11 code: namespace NS { inline namespace { void foo() { return boo1; } } } put cursor on foo, wait mark occurrences. move caret after boo1| set breakpoint in NamespaceDefinitionImpl.getScopeElements at "if (isOfMyScope(decl)) {" set breakpoint in ProjectBase.setDisposed at "disposing.set(true);" remove symbol "1", wait 1st breakpoint hit when decl is FunctionDDImpl for "foo" invoke CA->Reparse project wait 2nd hit step into 1st till NamespaceImpl.isNamespaceScope before "func.getContainingFile()" check that func.isValid returns true do one step for 2nd breakpoint and check that on the 1st now func.isValid returns false. Now set break in FileImpl constructor and resume 2nd till FileImpl constructor is hit try step over in 1st and get NPE. The reason is: - getContainingFile in Offsetable base use fileRef (initialized in onDispose) and when null, then calls "file = UIDCsmConverter.UIDtoFile(fileUID);" but repository is cleaned when Reparse is invoked and no FileImpl can be returned by fileUID - onDispose was not invoked, because we don't deserialize all model when user invoke Reparse. Created attachment 157274 [details]
fix
pushed to enum changeset: 304275:4a1a44684442 [release81] Integrated into 'main-silver', will be available in build *201511240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/0d22bf0a9fed User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixed #226012 - [74cat] AssertionError: no object for UID KeyBasedUID on FileKey - always use reference to FileImpl, because it holds reference to "disposed" AtomicBoolean from Project. This is the only way to know that project was requested for Reparse and all live objects became invalid. We want to protect slow clients from returning null from getContainingFile, so hold file (transplanted from 4a1a44684442e4b98f7d4a1101de43e0ee114c1c) Cannot reproduce the bug in build 20121215. |