Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QScreen Connect Problem

    Mobile and Embedded
    2
    6
    1692
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dreamerindia last edited by

      I have configure Linux Framebuffer has /dev/fb0, Using Examples/qws/framebuffer project is working fine, but
      When I am trying to connect using QScreen object it gives th following error
      @
      QPluginLoader *objPlug = new QPluginLoader("libcheckPlugin1.so",this);
      QScreenDriverPlugin obj = qobject_cast<QScreenDriverPlugin>(objPlug->instance());
      QScreen *objScr = obj->create("dbscreen",QScreen::LinuxFBClass);
      objScr->connect("LinuxFb:/dev/fb0" );
      objScr->initDevice();@

      It gives segementation fault.

      Kindly give me solution to connect the Framebuffer using QScreen plugin.

      ~Ravivarman~

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        You should add some sanity check to your code. You don't verify that the plugin is correctly loaded, nor that any object is valid.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • D
          dreamerindia last edited by

          @ QPluginLoader *objPlug = new QPluginLoader("libcheckPlugin1.so",this);
          QScreenDriverPlugin obj = qobject_cast<QScreenDriverPlugin>(objPlug->instance());

          • if(obj != NULL)
            qDebug()<<"Object Reference:"<<obj->keys();
          • QScreen *objScr = obj->create("dbscreen",QScreen::LinuxFBClass);
            objScr->connect("LinuxFb:/dev/fb0" );
            objScr->initDevice();;@

          I have added the object check to my code and it is valid Screen plugin. but when I am trying to initdevice it is throwing segmentation fault. please let me know any certain configuration are required to init framebuffer device.

          ~Ravivarman~

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Do you have a stack trace of the crash ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • D
              dreamerindia last edited by

              I dont find any stack trace but give me clue to debug any stack trace for this object.

              ~Ravivarman~

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Then you should run your application using a debugger so you would be able to see where exactly it crashes

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post