-
Notifications
You must be signed in to change notification settings - Fork 539
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
Wrong cast()
call causes access violation at vtable access
#1183
Comments
implement(IWICBitmapFrameDecode)
causes access violation at vtable accesscast()
call causes access violation at vtable access
Okay, it should be |
There should be some kind of assert that you've already boxed the object (via |
The way that this is handled in com-rs is by doing the following:
This works quite well and ensures that the user can never stack allocate the implementation type. Would something like this work for windows-rs as well? |
I don't think that would work without some modification because the |
From this function where JXLWICBitmapFrameDecode implements IWICBitmapFrameDecode:
The call to
GetSize()
throws without calling the actual implemented function:Not sure what's wrong here, maybe the metadata, ᅟor the use of
cast()
, or 🤷The full code is here: https://github.com/saschanaz/jxl-winthumb/blob/caca0636f3802b8c7c26a6d37c6fb6976f868dbe/src/wic.rs#L119
The text was updated successfully, but these errors were encountered: