Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccessViolationException in ClangSharp.CXXMethodDecl.VtblIndex (ClangSharp.Interop.clangsharp.Cursor_getVtblIdx) #534

Open
Tyler-IN opened this issue Mar 10, 2024 · 1 comment

Comments

@Tyler-IN
Copy link

Tyler-IN commented Mar 10, 2024

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:
--------------------------------
   at ClangSharp.Interop.clangsharp.Cursor_getVtblIdx(ClangSharp.Interop.CXCursor)
--------------------------------
   at ClangSharp.Interop.CXCursor.get_VtblIdx()
   at ClangSharp.CXXMethodDecl.get_VtblIndex()
   at ClangSharp.PInvokeGenerator+<>c.<IsExcluded>b__101_10(ClangSharp.CXXMethodDecl)
   at System.Linq.EnumerableSorter`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ComputeKeys(System.__Canon[], Int32)
   at System.Linq.EnumerableSorter`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ComputeMap(System.__Canon[], Int32)
   at System.Linq.EnumerableSorter`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Sort(System.__Canon[], Int32)
   at System.Linq.OrderedEnumerable`1+<GetEnumerator>d__19[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at ClangSharp.PInvokeGenerator.<IsExcluded>g__ContainsConflictingMethodDecl|101_8(ClangSharp.CXXMethodDecl, ClangSharp.CXXRecordDecl, ClangSharp.CXXRecordDecl, System.String, Boolean ByRef, <>c__DisplayClass101_0 ByRef)
   at ClangSharp.PInvokeGenerator.<IsExcluded>g__IsConflictingMethodDecl|101_6(ClangSharp.CXXMethodDecl, ClangSharp.CXXRecordDecl, <>c__DisplayClass101_0 ByRef)
   at ClangSharp.PInvokeGenerator.<IsExcluded>g__IsExcludedByName|101_3(ClangSharp.Cursor, UInt32 ByRef, <>c__DisplayClass101_0 ByRef)
   at ClangSharp.PInvokeGenerator.IsExcluded(ClangSharp.Cursor, Boolean ByRef)
   at ClangSharp.PInvokeGenerator.IsExcluded(ClangSharp.Cursor)
   at ClangSharp.PInvokeGenerator.VisitDecl(ClangSharp.Decl)
   at ClangSharp.PInvokeGenerator.Visit(ClangSharp.Cursor)
   at ClangSharp.PInvokeGenerator.Visit(System.Collections.Generic.IEnumerable`1<ClangSharp.Cursor>)
   at ClangSharp.PInvokeGenerator.VisitTranslationUnitDecl(ClangSharp.TranslationUnitDecl)
   at ClangSharp.PInvokeGenerator.VisitDecl(ClangSharp.Decl)
   at ClangSharp.PInvokeGenerator.Visit(ClangSharp.Cursor)
   at ClangSharp.PInvokeGenerator.GenerateBindings(ClangSharp.TranslationUnit, System.String, System.String[], ClangSharp.Interop.CXTranslationUnit_Flags)
   at ClangSharp.Program.Run(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Handler+<>c__DisplayClass1_0`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<SetHandler>b__0(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Invocation.AnonymousCommandHandler+<>c__DisplayClass2_0.<.ctor>g__Handle|0(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Invocation.AnonymousCommandHandler+<InvokeAsync>d__3.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Invocation.AnonymousCommandHandler+<InvokeAsync>d__3, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__3 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.CommandLine.Invocation.AnonymousCommandHandler+<InvokeAsync>d__3, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__3 ByRef)
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_0+<<BuildInvocationChain>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_0+<<BuildInvocationChain>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<BuildInvocationChain>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_0+<<BuildInvocationChain>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<BuildInvocationChain>b__0>d ByRef)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_0.<BuildInvocationChain>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass18_0+<<UseParseErrorReporting>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass18_0+<<UseParseErrorReporting>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseParseErrorReporting>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass18_0+<<UseParseErrorReporting>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseParseErrorReporting>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass18_0.<UseParseErrorReporting>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass13_0+<<UseHelp>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass13_0+<<UseHelp>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseHelp>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass13_0+<<UseHelp>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseHelp>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass13_0.<UseHelp>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass20_0+<<UseTypoCorrections>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass20_0+<<UseTypoCorrections>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseTypoCorrections>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass20_0+<<UseTypoCorrections>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseTypoCorrections>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass20_0.<UseTypoCorrections>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<UseSuggestDirective>b__19_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<UseSuggestDirective>b__19_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseSuggestDirective>b__19_0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<UseSuggestDirective>b__19_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseSuggestDirective>b__19_0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c.<UseSuggestDirective>b__19_0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass17_0+<<UseParseDirective>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass17_0+<<UseParseDirective>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseParseDirective>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass17_0+<<UseParseDirective>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseParseDirective>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass17_0.<UseParseDirective>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<RegisterWithDotnetSuggest>b__6_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<RegisterWithDotnetSuggest>b__6_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<RegisterWithDotnetSuggest>b__6_0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<RegisterWithDotnetSuggest>b__6_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<RegisterWithDotnetSuggest>b__6_0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c.<RegisterWithDotnetSuggest>b__6_0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c.<UseEnvironmentVariableDirective>b__7_0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass9_0+<<UseExceptionHandler>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass9_0+<<UseExceptionHandler>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseExceptionHandler>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass9_0+<<UseExceptionHandler>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseExceptionHandler>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass9_0.<UseExceptionHandler>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<CancelOnProcessTermination>b__1_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<CancelOnProcessTermination>b__1_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<CancelOnProcessTermination>b__1_0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<CancelOnProcessTermination>b__1_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<CancelOnProcessTermination>b__1_0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c.<CancelOnProcessTermination>b__1_0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<InvokeAsync>d__2.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Invocation.InvocationPipeline+<InvokeAsync>d__2, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__2 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.CommandLine.Invocation.InvocationPipeline+<InvokeAsync>d__2, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__2 ByRef)
   at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(System.CommandLine.IConsole)
   at System.CommandLine.Parsing.ParseResultExtensions+<InvokeAsync>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Parsing.ParseResultExtensions+<InvokeAsync>d__0, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__0 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.CommandLine.Parsing.ParseResultExtensions+<InvokeAsync>d__0, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__0 ByRef)
   at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(System.CommandLine.Parsing.ParseResult, System.CommandLine.IConsole)
   at System.CommandLine.Parsing.ParserExtensions+<InvokeAsync>d__3.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Parsing.ParserExtensions+<InvokeAsync>d__3, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__3 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.CommandLine.Parsing.ParserExtensions+<InvokeAsync>d__3, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__3 ByRef)
   at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(System.CommandLine.Parsing.Parser, System.String[], System.CommandLine.IConsole)
   at ClangSharp.Program+<Main>d__77.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[ClangSharp.Program+<Main>d__77, ClangSharpPInvokeGenerator, Version=17.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]](<Main>d__77 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[ClangSharp.Program+<Main>d__77, ClangSharpPInvokeGenerator, Version=17.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]](<Main>d__77 ByRef)
   at ClangSharp.Program.Main(System.String[])
   at ClangSharp.Program.<Main>(System.String[])

I don't know if I can create a minimal example yet, I might give that a shot a bit later.

@Tyler-IN Tyler-IN changed the title AccessViolationException in ClangSharp.Interop.clangsharp.Cursor_getVtblIdx AccessViolationException in ClangSharp.CXXMethodDecl.VtblIndex (ClangSharp.Interop.clangsharp.Cursor_getVtblIdx) Mar 10, 2024
@Tyler-IN
Copy link
Author

The problem occurs in PInvokeGenerator.IsExcluded.ContainsConflictingMethodDecl, cxxmd.VtblIndex is used to order methods.

There is a virtual method declared private with override on a class, the parent class declares the method public and pure virtual (= 0) ...

cxxmd.OverriddenMethods[0].VtblIndex (== 1) seems to work fine, while cxxmd.VtblIndex causes the Access Violation Exception...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant