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

Crash on any DuckDB error while also using skia-safe #400

Open
rory-orennia opened this issue Nov 14, 2024 · 2 comments
Open

Crash on any DuckDB error while also using skia-safe #400

rory-orennia opened this issue Nov 14, 2024 · 2 comments

Comments

@rory-orennia
Copy link

rory-orennia commented Nov 14, 2024

Getting weird behaviour when any error is returned while also using the skia-safe (https://crates.io/crates/skia-safe) crate. I'm on a Mac with a M3 chip so that might be the only way to reproduce this, but I created a repo that instantly reproduces this for me:
https://github.com/rory-orennia/duckdb-bug

If you run that, it will run the most basic examples from duckdb-rs and skia-safe's codebases and will crash on an error when it tries to select a column that doesn't exist (I changed SELECT name to SELECT named).

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.91s
     Running `target/debug/duckdb-bug`
fatal runtime error: Rust cannot catch foreign exceptions
zsh: abort      cargo run

If you comment out the lines listed in the main.rs to stop using skia, suddenly the nice error is returned:

Error: DuckDBFailure(Error { code: Unknown, extended_code: 1 }, 
Some("Binder Error: Referenced column \"named\" not found in FROM clause!\nCandidate bindings: \"person.name\"\n
LINE 1: SELECT id, named, data FROM person\n^"))

I'm stuck on the bundled version of duckdb-rs because nothing else seems to run on the M series mac's. Not sure if that's the issue? Not sure how to progress here since the entire point of this app was to read some data from DuckDB and then draw the results into a png.

Thanks for any help you can provide!

@Mause
Copy link
Member

Mause commented Nov 15, 2024

What's the error that is being thrown from duckdb in the failing case?

@rory-orennia
Copy link
Author

The same error is coming out of DuckDB in both cases, but as soon as you add skia-safe, we panic instead of just returning it as a nice DuckDBFailure Error

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

2 participants