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 224709 - exceptions in message.log after reopen already parsed project
Summary: exceptions in message.log after reopen already parsed project
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Egor Ushakov
URL:
Keywords:
Depends on:
Blocks: 227295
  Show dependency tree
 
Reported: 2013-01-10 14:45 UTC by Vladimir Voskresensky
Modified: 2013-03-18 15:56 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2013-01-10 14:45:00 UTC
during check-for-changes phase I see exception in console:
java.lang.Exception: Incorrect fake registration class: class org.netbeans.modules.cnd.modelimpl.csm.FunctionImpl for fake UID:DeclarationUID:KeyBasedUID on OffsDeclKey: itls_check_[F 583-652] {PATH/Libs/libKDBTOOLS/AccessRightChecker.c; PATH/N/}
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.fixFakeFunctionRegistrations(FileImpl.java:1826)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.fixFakeRegistrations(FileImpl.java:1795)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.onProjectParseFinished(FileImpl.java:764)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FakeRegistrationWorker$FixRegistrationRunnable.run(FakeRegistrationWorker.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2048)
java.lang.Exception: Incorrect fake registration class: class org.netbeans.modules.cnd.modelimpl.csm.FunctionImpl for fake UID:DeclarationUID:KeyBasedUID on OffsDeclKey: itls_reload_[F 653-723] {PATH/Libs/libKDBTOOLS/AccessRightChecker.c; PATH/N/}
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.fixFakeFunctionRegistrations(FileImpl.java:1826)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.fixFakeRegistrations(FileImpl.java:1795)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.onProjectParseFinished(FileImpl.java:764)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FakeRegistrationWorker$FixRegistrationRunnable.run(FakeRegistrationWorker.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2048)
java.lang.Exception: Incorrect fake registration class: class org.netbeans.modules.cnd.modelimpl.csm.FunctionImpl for fake UID:DeclarationUID:KeyBasedUID on OffsDeclKey: itls_RecalibIRVol_[F 437-513] {PATH/Libs/libKVOLATengine/K_VolatProvider_class.c; PATH/N/}
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.fixFakeFunctionRegistrations(FileImpl.java:1826)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.fixFakeRegistrations(FileImpl.java:1795)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.onProjectParseFinished(FileImpl.java:764)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FakeRegistrationWorker$FixRegistrationRunnable.run(FakeRegistrationWorker.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2048)
java.lang.Exception: Incorrect fake registration class: class org.netbeans.modules.cnd.modelimpl.csm.FunctionImpl for fake UID:DeclarationUID:KeyBasedUID on OffsDeclKey: itls_sUseVolatCurve_[F 1039-1198] {PATH/Libs/libKVOLATcurves/K_VolatSelector_class.c; PATH/N/}
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.fixFakeFunctionRegistrations(FileImpl.java:1826)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.fixFakeRegistrations(FileImpl.java:1795)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.onProjectParseFinished(FileImpl.java:764)
	at org.netbeans.modules.cnd.modelimpl.csm.core.FakeRegistrationWorker$FixRegistrationRunnable.run(FakeRegistrationWorker.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2048)
================
java.lang.IndexOutOfBoundsException: Illegal OffsetKind[offset=-9] in org.netbeans.modules.editor.NbEditorDocument@4b254ece, mimeType='text/x-c', kitClass=null, length=1921, version=1, file=org.netbeans.modules.cnd.source.CDataObject@16693dd5[PATH/DealManager/main.c@40843b46:4920b182] used by org.netbeans.modules.cnd.source.CppEditorSupport@22e6b5ee.
	at org.openide.text.PositionRef$Manager$OffsetKind.<init>(PositionRef.java:663)
	at org.openide.text.PositionRef.<init>(PositionRef.java:87)
	at org.openide.text.CloneableEditorSupport.createPositionRef(CloneableEditorSupport.java:1675)
	at org.netbeans.modules.cnd.highlight.error.HighlightProvider.createPositionBounds(HighlightProvider.java:196)
	at org.netbeans.modules.cnd.highlight.error.HighlightProvider.access$000(HighlightProvider.java:75)
	at org.netbeans.modules.cnd.highlight.error.HighlightProvider$1.addError(HighlightProvider.java:137)
	at org.netbeans.modules.cnd.highlight.error.IncludeErrorProvider.doGetErrors(IncludeErrorProvider.java:211)
	at org.netbeans.modules.cnd.api.model.syntaxerr.CsmErrorProvider.getErrors(CsmErrorProvider.java:125)
	at org.netbeans.modules.cnd.api.model.syntaxerr.CsmErrorProvider$AsynchronousMerger$1.run(CsmErrorProvider.java:237)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2048)
Comment 1 Leonid Lenyashin 2013-01-11 08:24:25 UTC
Significant performance degradation in up-to-date check
Comment 2 Marian Mirilovic 2013-01-11 10:41:45 UTC
(In reply to comment #1)
> Significant performance degradation in up-to-date check

Does it mean you will fix that for 7.3 RC1 ?
Comment 3 Leonid Lenyashin 2013-01-11 10:48:15 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Significant performance degradation in up-to-date check
> 
> Does it mean you will fix that for 7.3 RC1 ?

May be, evaluating it right now. So far it has been reported by only one, but important customer. If there is a quick and safe way to fix it we may decide to do that. Note that the "significance" of performance degradation is reported only verbally and not yet quantitative.
Comment 4 Vladimir Voskresensky 2013-01-11 11:15:57 UTC
problematic construction is:
/** main.h */
namespace N1 {

    class DialogId {
    public:
        DialogId(const DialogId& parent);
    };

    namespace Dlg {
        static const DialogId main;
        static const DialogId slave;
    }
}

/** main.cc */

#include "main.h"

namespace N1 {
    const DialogId Dlg::main;
    const DialogId Dlg::slave(Dlg::main);
}

=> slave is treated as function, while it's variable
Comment 5 Vladimir Voskresensky 2013-01-16 19:45:49 UTC
the compilable sample:

/** main.h */
namespace N1 {

    class DialogId {
    public:
        DialogId();
        DialogId(const DialogId& parent);
    };

    class Dlg {
        static const DialogId main;
        static const DialogId slave;
    };
}

/** main.cc */
#include "main.h"

namespace N1 {
    const DialogId Dlg::main;
    const DialogId Dlg::slave(Dlg::main);
}
Comment 6 Egor Ushakov 2013-01-17 10:30:57 UTC
Exception fixed in http://hg.netbeans.org/cnd-main/rev/3892565086ab, but still need to:
- clear fake registrations collection on manual reparse;
- in FunctionImplEx.fixFakeRegistration:
  - in projectParsedMode case move unregister before functionImpl.create
  - in fixFakeRegistrationAst=null case create FunctionImpl instead of replacing the current one
- remove usage of non-final FAKE_QUALIFIED_NAME flag in FunctionImplEx.isFakeFunction
Comment 7 Quality Engineering 2013-01-23 02:50:13 UTC
Integrated into 'main-golden', will be available in build *201301230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3892565086ab
User: Egor Ushakov <gorrus@netbeans.org>
Log: fixing #224709 - exceptions in message.log after reopen already parsed project
Comment 8 Egor Ushakov 2013-03-11 14:04:30 UTC
the fix solved the main issue, the rest is in a separate bug 227295
Comment 9 Alexander Pepin 2013-03-13 14:31:19 UTC
verified in trunk build
Comment 10 Quality Engineering 2013-03-14 21:09:33 UTC
Integrated into 'releases', will be available in build *201303141828* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/1e64cbeef266
User: Egor Ushakov <gorrus@netbeans.org>
Log: fixing #224709 - exceptions in message.log after reopen already parsed project
(transplanted from 3892565086abf7fe028cbb1e2d7c0eb4e0835ae8)
(transplanted from cd79d7a0d442e37dbd66a5ca0e8ad9e819158eff)
Comment 11 Alexander Pepin 2013-03-18 15:56:42 UTC
verified in oss built on nb build 20130316