-
Notifications
You must be signed in to change notification settings - Fork 988
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
[bug]OpenCV crashes the program on Linux #16840
Comments
It looks like the error occurs in GTK and is only tangentially related to OpenCV. I suspect the issue is caused by The only real fix for that would be to use a proper Conan version of GTK, but it's yet to be migrated. Mostly due to a bunch of trivial version conflicts blocking the build:
You can give the updated recipe in that PR or in my personal fork (https://github.com/valgur/conan-center-index) a try. |
Hi @Marijameme Quick question: did you use pre-compiled binaries from ConanCenter, or are you building them from source? Also, using: include_directories( ${OpenCV_INCLUDE_DIRS} )
target_link_libraries(${PROJECT_NAME} PUBLIC ${OpenCV_LIBS}) Is not recommended in the general case. CMake recommends using |
Hi @memsharded, i took your suggestion and built the library from source and made changes to my CMake file but the problem is still there, only less frequent. Also, when it runs I get a warning: |
Hi @Marijameme, |
I tried with 4.10.0 originally, and then with 4.9.0 and 4.5.5, everything was the same. |
Describe the bug
Hi there,
I'm using opencv library in my project, and I installed it using conan but it started crashing with the error:
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Fatal error reading PNG image file: Invalid IHDR data (gdk-pixbuf-error-quark, 0) Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Fatal error reading PNG image file: Invalid IHDR data (gdk-pixbuf-error-quark, 0) Aborted
Then I installed the library manually and the program is running perfectly fine. Before this, the program would crash just moments after being started, after almost zero interaction with the program. The funny thing is that it doesn't crash always, sometimes (although rarely) it works fine and the library behaves the way it is expected. I didn't do anything fancy with my CMake in order to include the library, just the following
Environment details
The text was updated successfully, but these errors were encountered: