QScreen Connect Problem



  • 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.


  • Lifetime Qt Champion

    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.



  • @ 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.


  • Lifetime Qt Champion

    Do you have a stack trace of the crash ?



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


  • Lifetime Qt Champion

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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.