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 161023 - Renderer should not register wrong function
Summary: Renderer should not register wrong function
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-24 13:59 UTC by Alexander Simon
Modified: 2013-05-07 11:21 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2009-03-24 13:59:24 UTC
Code example:
-------------------------------
namespace TAO
{

  template<>
  struct TAO_FT_Export Objref_Traits< ::FT::FaultDetectorFactory>
  {
    static ::FT::FaultDetectorFactory_ptr duplicate (
        ::FT::FaultDetectorFactory_ptr p
      );
    static void release (
        ::FT::FaultDetectorFactory_ptr p
      );
    static ::FT::FaultDetectorFactory_ptr nil (void);
    static ::CORBA::Boolean marshal (
        const ::FT::FaultDetectorFactory_ptr p,
        TAO_OutputCDR & cdr
      );
  };
}
-------------------------------
This code fragment was registered in model as template function without name and parameters.
It results in errors:
-------------------------------
java.lang.Exception: no deref object for uid[<UNNAMED OFFS-DECL UID>:KeyBasedUID on OffsDeclKey: 79610[F 7775-7785]
{/export/home/as204739/Projects/sfbay/ACE_wrappers/build/TAO/orbsvcs/orbsvcs/FT_FaultDetectorFactoryC.h;
/export/home/as204739/Projects/sfbay/ACEN}] of FUNCTION [7775-7785]
        at org.netbeans.modules.cnd.modelimpl.uid.UIDProviderIml.get(UIDProviderIml.java:83)
        at org.netbeans.modules.cnd.modelimpl.uid.UIDProviderIml.get(UIDProviderIml.java:69)
        at org.netbeans.modules.cnd.api.model.util.UIDs.get(UIDs.java:63)
        at org.netbeans.modules.cnd.modelimpl.csm.NamespaceImpl.removeDeclaration(NamespaceImpl.java:429)
        at org.netbeans.modules.cnd.modelimpl.csm.FunctionImpl.dispose(FunctionImpl.java:715)
        at org.netbeans.modules.cnd.modelimpl.csm.core.Utils.disposeAll(Utils.java:118)
        at org.netbeans.modules.cnd.modelimpl.csm.NamespaceDefinitionImpl.dispose(NamespaceDefinitionImpl.java:227)
        at org.netbeans.modules.cnd.modelimpl.csm.core.Utils.disposeAll(Utils.java:118)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.disposeAll(FileImpl.java:581)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl._reparse(FileImpl.java:523)
        at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsed(FileImpl.java:400)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread._run(ParserThread.java:127)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:69)
        at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:87)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)
NO PARAM LIST FOR FUNC: at [289:3-289:12] in
/export/home/as204739/Projects/sfbay/ACE_wrappers/build/TAO/orbsvcs/orbsvcs/FT_FaultDetectorFactoryC.h
-------------------------------
Renderer should not register such wrong function (if parser failed)" or register right template structure.
Comment 1 nnnnnk 2009-04-07 16:01:08 UTC
It seems that TAO_FT_Export is macro.
Please, could you provide it's value.
Comment 2 Alexander Simon 2009-04-07 18:42:02 UTC
Issue is:
- renderer should not produce wrong objects in any case! (it should be rule)
It does not depend on compilable code.

See sources in IZ#159563.
Comment 3 nnnnnk 2009-04-14 16:37:18 UTC
We have a lot of object constructors from AST.
AST could be incorrect, so we should add methods isValid to all objects or create factories for them.
  
Comment 4 nnnnnk 2009-10-06 11:40:34 UTC
Example is fixed.
So now it's some common task to review model objects creation mechanism.