mono / CppSharp

Tools and libraries to glue C/C++ APIs to high-level languages
MIT License
3.13k stars 516 forks source link

System.AccessViolationException on SOME/IP C++ headers #1565

Open ChezzPlaya opened 3 years ago

ChezzPlaya commented 3 years ago
Brief Description

OS: Windows 10 (64 bit)

Used headers

Used headers can be found in this repo: https://github.com/GENIVI/vsomeip/tree/master/interface/vsomeip.

My CLI call was simply: CppSharp-0.10.5-vs2017-x86\CppSharp.CLI.exe vsomeip/*.hpp

Used settings

Target: I've used the CppSharp-0.10.5-vs2017-x86 prebuild windows release

Stack trace or incompilable generated code
Generating C# bindings for Windows x86...
Parsing libraries...
Parsing code...

Unbehandelte Ausnahme: System.AccessViolationException: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
   bei CppSharp.CppParser.ClangParser.ParseHeader(CppParserOptions* )
   bei CppSharp.Parser.ClangParser.ParseHeader(CppParserOptions Opts) in c:\projects\cppsharp\src\cppparser\bindings\cli\cppparser.cpp:Zeile 833.
   bei CppSharp.ClangParser.ParseSourceFiles(IEnumerable`1 files, ParserOptions options) in C:\projects\cppsharp\src\Parser\Parser.cs:Zeile 56.
   bei CppSharp.Driver.ParseCode() in C:\projects\cppsharp\src\Generator\Driver.cs:Zeile 137.
   bei CppSharp.ConsoleDriver.Run(ILibrary library) in C:\projects\cppsharp\src\Generator\Driver.cs:Zeile 436.
   bei CppSharp.Generator.Run() in C:\projects\cppsharp\src\CLI\Generator.cs:Zeile 256.
   bei CppSharp.CLI.Main(String[] args) in C:\projects\cppsharp\src\CLI\CLI.cs:Zeile 279.
ddobrev commented 3 years ago

Could you please try our latest version? I do get a crash with it but it's after the parser.

ChezzPlaya commented 3 years ago

With the latest version I get this error:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29333\include\intrin.h(56,1): error: expected function body after function declarator

Would you please provide your command line call?