Could not load image with extension .png #2819
-
|
Hello everyone, The GUI is closing suddenly when I'm trying to show the point indices on my geometry. It happened in other situations which I could not remember right now but I'd add them up here if I encounter again. It raises the following error: [ERROR] [Image] Could not load image with extension png. Valid extensions: ["bmp", "dds"]
########## SIG 11 - SIGSEGV: segfault ##########
sofa::helper::BackTrace::sig(int)
sofa::gl::Texture::init()
sofa::gl::GlText::textureDraw_Indices(sofa::type::vector<sofa::type::Vec<3u, double>, sofa::type::CPUMemoryManager<sofa::type::Vec<3u, double> > > const&, float const&)
sofa::gl::DrawToolGL::draw3DText_Indices(std::vector<sofa::type::Vec<3u, double>, std::allocator<sofa::type::Vec<3u, double> > > const&, float, sofa::type::RGBAColor const&)
sofa::component::topology::PointSetGeometryAlgorithms<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3u, double>, sofa::type::Vec<3u, double>, double> >::draw(sofa::core::visual::VisualParams const*)
sofa::component::topology::EdgeSetGeometryAlgorithms<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3u, double>, sofa::type::Vec<3u, double>, double> >::draw(sofa::core::visual::VisualParams const*)
sofa::component::topology::QuadSetGeometryAlgorithms<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3u, double>, sofa::type::Vec<3u, double>, double> >::draw(sofa::core::visual::VisualParams const*)
sofa::component::topology::HexahedronSetGeometryAlgorithms<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3u, double>, sofa::type::Vec<3u, double>, double> >::draw(sofa::core::visual::VisualParams const*)
sofa::simulation::VisualVisitor::processNodeTopDown(sofa::simulation::Node*)
sofa::simulation::VisualDrawVisitor::processNodeTopDown(sofa::simulation::Node*)
sofa::simulation::graph::DAGNode::executeVisitorTreeTraversal(sofa::simulation::Visitor*, std::map<sofa::simulation::graph::DAGNode*, sofa::simulation::graph::DAGNode::StatusStruct, std::less<sofa::simulation::graph::DAGNode*>, std::allocator<std::pair<sofa::simulation::graph::DAGNode* const, sofa::simulation::graph::DAGNode::StatusStruct> > >&, sofa::simulation::Visitor::TreeTraversalRepetition, bool)
sofa::simulation::graph::DAGNode::executeVisitorTreeTraversal(sofa::simulation::Visitor*, std::map<sofa::simulation::graph::DAGNode*, sofa::simulation::graph::DAGNode::StatusStruct, std::less<sofa::simulation::graph::DAGNode*>, std::allocator<std::pair<sofa::simulation::graph::DAGNode* const, sofa::simulation::graph::DAGNode::StatusStruct> > >&, sofa::simulation::Visitor::TreeTraversalRepetition, bool)
sofa::simulation::graph::DAGNode::doExecuteVisitor(sofa::simulation::Visitor*, bool)
sofa::simulation::DefaultVisualManagerLoop::drawStep(sofa::core::visual::VisualParams*)
sofa::simulation::Simulation::draw(sofa::core::visual::VisualParams*, sofa::simulation::Node*)
sofa::gui::qt::viewer::qgl::QtGLViewer::DisplayOBJs()
sofa::gui::qt::viewer::qgl::QtGLViewer::drawScene()
sofa::gui::qt::viewer::qgl::QtGLViewer::draw()
QGLViewer::paintGL()
QWidget::event(QEvent*)
QApplicationPrivate::notify_helper(QObject*, QEvent*)
QApplication::notify(QObject*, QEvent*)
QCoreApplication::notifyInternal2(QObject*, QEvent*)
QWidgetPrivate::sendPaintEvent(QRegion const&)
QWidgetPrivate::syncBackingStore()
QWidget::event(QEvent*)
QMainWindow::event(QEvent*)
QApplicationPrivate::notify_helper(QObject*, QEvent*)
QApplication::notify(QObject*, QEvent*)
QCoreApplication::notifyInternal2(QObject*, QEvent*)
QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
g_main_context_dispatch
g_main_context_iteration
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
QCoreApplication::exec()
sofa::gui::qt::RealGUI::mainLoop()
sofa::gui::GUIManager::MainLoop(boost::intrusive_ptr<sofa::simulation::Node>, char const*)
_PyObject_MakeTpCall
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
PyEval_EvalCodeEx
PyEval_EvalCode
PyRun_SimpleFileExFlags
Py_RunMain
Py_BytesMain
__libc_start_main
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)I also get the following warning all the time (at the GUI opening), I don't know if it may be linked: Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing.
The constructor with a QGLFormat is deprecated, use the regular contructor instead.So I've tried both with QglViewer and Qt but both quits immediately. Would you have any ideas to fix this? Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
I think I had this error, you need to add the <RequiredPlugin name="CImgPlugin"/> <!-- Needed to load .png images -->If this works, this is only a quick fix and the issue will still remain for others. Maybe this plugin should be imported by default? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @heloiseouvry , As a side note, handling of png/jpeg/etc in the next version of SOFA (june 2022) will be directly supported without needing CImplugin(+libpng,libjpeg) (see #2551 ) |
Beta Was this translation helpful? Give feedback.
Hi @heloiseouvry ,
Indeed the answer of @BrunoB81HK should be the right one, so it is a bit surprising it still does not work.
Did you make sure that CImgPlugin is built with the support of libpng? Could happen, especially on Windows, that CMake did not find libpng.
As a side note, handling of png/jpeg/etc in the next version of SOFA (june 2022) will be directly supported without needing CImplugin(+libpng,libjpeg) (see #2551 )