Giorgi
Giorgi
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
I'll move to LibraryImport when I drop .net standard support.
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
There is a dotnet channel in the duckdb discord server. If you have any questions in future, feel free to ping me there
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
You can send a PR for the docs too: https://github.com/Giorgi/DuckDB.NET-Docs
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
@eterm By the way, I created this request for your other issue: https://github.com/duckdb/duckdb/discussions/17532
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
It probably makes sense to add a source generator to generate type safe appender for specific types
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
I'm not sure but it's better to have a 100% match between column types and value types
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
When using the appender I write directly to the underlying memory:
internal bool AppendValueInternal<T>(T value, ulong rowIndex) where T : unmanaged
{
((T*)vectorData)[rowIndex] = value;
return true;
}
internal bool AppendValueInternal<T>(T value, ulong rowIndex) where T : unmanaged
{
((T*)vectorData)[rowIndex] = value;
return true;
}
When you call it for long (8 bytes) but the underlying vector is a pointer to uint (4 bytes) you are causing AV
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
If I change the table to use UINTEGER column and just insert 1 as long it will still crash
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
It doesn't matter what the actual value of the long variables are.
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
UINTEGER is 4 bytes long is 8 bytes
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
But I don't know why it wasn't failing in WSL
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
When using the appender API, it's your responsibility to make sure that data types are matching
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
Changing the table to CREATE TABLE IF NOT EXISTS integers(sequence BIGINT, value BIGINT UNIQUE); gets rid of the CLR crash
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
The reason it doesn't work is that you have a UINTEGER column but you are inserting long values
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
You need to pass /p:BuildType=Full
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
@eterm I figured out why it's not working the way you expect it to work. I don't know why the CLR is crashing but the app doesn't work the way you expect because of a type mismatch
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
@Dongle @Petris This is the source for that message: https://github.com/Giorgi/DuckDB.NET/issues/178#issuecomment-2195789680 Can you suggest a fix for that?
48 replies
CC#
Created by eterm on 5/18/2025 in #help
I have a program that crashes the CLR. How do I go about debugging the root cause?
@Petris Can you suggest how I should fix it? That will be more helpful for me than laughing 🙃
48 replies