question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object reference not set to an instance of an object

See original GitHub issue

Description

Running on M1 Mac with .NET6 (6.0.203) using self build libduckdb.dylib (arm64) from recent master. Samples project fails at line 43: PrintQueryResults(reader);

The actual error happens in DuckDBNativeObjects.cs line 93: var column = Marshal.PtrToStructure<DuckDBColumn>(columns + Marshal.SizeOf<DuckDBColumn>() * i); (a The error message is:

Exception has occurred: CLR/System.NullReferenceException An unhandled exception of type 'System.NullReferenceException' occurred in System.Private.CoreLib.dll: 'Object reference not set to an instance of an object.' at System.Runtime.CompilerServices.CastHelpers.Unbox(Void* toTypeHnd, Object obj) at System.Runtime.InteropServices.Marshal.PtrToStructure[T](IntPtr ptr)

Earlier actions (creating table, inserting data) seem to be successful when I check the file.db database using DuckDB CLI.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Giorgicommented, Jun 27, 2022

This is now implemented in release 0.4.0

1reaction
Giorgicommented, May 18, 2022

Alternatively, you can compile one of the earlier releases that don’t have that breaking change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object Reference Not Set to an Instance of an Object
This infamous and dreaded error message happens when you get a NullReferenceException. This exception is thrown when you try to access a member—for...
Read more >
What does "Object reference not set to an instance of an ...
In a nutshell it means.. You are trying to access an object without instantiating it.. You might need to use the "new" keyword...
Read more >
How to solve error object reference not set to an instance of ...
I work on csharp i get error object reference not set to an instance of an object code give me error var Data...
Read more >
Object reference not set to an instance of an object. - Forum
The message "object reference not set to an instance of an object" means that you are referring to an object the does not...
Read more >
Object Reference not set to an instance of an object
The message "object reference not set to an instance of an object" means that you are referring to an object the does not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found