-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Access to [AVOption.default_var.str] causes AccessViolationException #278
Comments
test case:
|
Would you check more on types? https://ffmpeg.org/doxygen/trunk/opt_8c_source.html#l01422 For example,
|
i didn't test according to types, i have just tested with all options to see which will cause crash, and here is the result: Passed options:
Crashed options
obviously if an option has value, it will cause crash. and those which does not have (null / string.Empty) won't. |
it really depends from the way you build ffmpeg - you can do worse in normal c lang - congratulations you just tested your ffmpeg assembly ) |
binaries in repo not redistributable they needed for generation only |
again if you step in file witch has ".c" on end it all unofficial and not testable so welcome to test and trail, you have access to API there few complex issues which cannot be fix easily and conveniently as marshaling falls and the ways C lang and LLVM reads code - please be respectful to work I did. I do appreciate you made but if you have an Idea how to improve it from the official API ".h" I really take it seriously. I start adding ".c" entire project will be unsable :) |
if you mid take a look here #271 most probably same issue |
@jcyuan Because default_val is union, you need to check type carefully. You should not access str field if type is not intend to as string. |
@hglee thanks - and it usually the problem when union appear - I think who did this in C and C++ later than made life of novice developer as way complex than it should be - but rationale clear to me - lack of memory back than. |
Guys, after a thorough comparsion, from clang result it shows the C# binding has no problem, and i have tested with the C code side too, yes as @hglee said that was some usage problem in the logic, some fields don't have string value in it just on purpose, but i'm not sure why they have wild pointer instead of NULL. (on C side) both side on C# and C has the same result: only 'dump_separator' option has default str value: ", " but as i tested the code on C side, here i report a problem i encountered although it's off-topic here, so i'm sorry @Ruslan-B without range output, all work fine. this can be closed yes, and thanks for your effort on this brilliant lib, @Ruslan-B ❤ |
we usually don't care but it is most probably compiler optimization on C side - code base of ffmpeg and amount of contributors... well hardy control abled |
ENV:
OS: Win10 x64
FFmpeg: 60
FFAutoGen: 6.0
Screenshots:
The text was updated successfully, but these errors were encountered: