Giorgi / DuckDB.NET

Bindings and ADO.NET Provider for DuckDB
https://duckdb.net
MIT License
356 stars 62 forks source link

Sample project does not run - Null ref exception #14

Closed travis-leith closed 2 years ago

travis-leith commented 2 years ago

If I try to run the sample project, I get a null ref exception on this line: https://github.com/Giorgi/DuckDB.NET/blob/a689f76d9661015438b574accd21e3884c418c3a/DuckDB.NET/DuckDBNativeObjects.cs#L81

Giorgi commented 2 years ago

@travis-leith Which version of the DuckDB.NET library and DuckDB itself do you use? There were some changes made on the DuckDB side that require using the latest version of DuckDB.NET.

travis-leith commented 2 years ago

@Giorgi , just cloning the repo and running the sample project. At first I thought it was because the dll included in the sample project is out of date. So I downloaded the latest (0.2.9). Now I get System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

From your comment on the other issue, I see that idx_t rows_changed was added 3 months ago.

However, I see that void *internal_data was added 1 month ago. Does the more recent change affect the size of the resulting type? I am a bit out of my depth when it comes to the native stuff.

Giorgi commented 2 years ago

Can you try using version 0.2.8 and see if it works?

travis-leith commented 2 years ago

0.2.8 does indeed work fine.

Giorgi commented 2 years ago

Fixed in ec533b626f280b0b36902c7496759f5e6d58b950