这是indexloc提供的服务,不要输入任何密码
Skip to content

-x objective-c throws System.ArgumentNullException #13

@Dadoum

Description

@Dadoum

How bug is triggered

A code snipet:

var index = ClangService.CreateIndex();
     var trans = index.ParseTranslationUnit(objectivecfile, args, //that are actually containing "-x objective-c"
    null, 
    TranslationUnitFlags.SingleFileParse);

What does it outputs ?

Value cannot be null.
Parameter name: handle

Stacktrace:

  at NClang.ClangObject..ctor (System.IntPtr handle) [0x00017] in <8ad3b26ee11343b1bd9b256eebdaec77>:0 
  at NClang.ClangTranslationUnit..ctor (System.IntPtr handle) [0x00000] in <8ad3b26ee11343b1bd9b256eebdaec77>:0 
  at NClang.ClangIndex.ParseTranslationUnit (System.String sourceFilename, System.String[] commandLineArgs, NClang.ClangUnsavedFile[] unsavedFiles, NClang.TranslationUnitFlags options) [0x00056] in <8ad3b26ee11343b1bd9b256eebdaec77>:0 
  at DemoCodeSnippet.Trigger [0x0005c] in the path of the file 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in <285579f54af44a2ca048dad6be20e190>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <285579f54af44a2ca048dad6be20e190>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <285579f54af44a2ca048dad6be20e190>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <285579f54af44a2ca048dad6be20e190>:0 
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in <285579f54af44a2ca048dad6be20e190>:0 

System configuration:

OS : Linux x64, Ubuntu derrivatives - KUbuntu 19.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions