Menu

#752 libWindow plugin crash at register

4.0.0
closed-fixed
nobody
None
5
2014-01-30
2014-01-14
Odyssey
No

Tulip makes my application crash when it tries to load its libWindow glyph plugin.
After debugging it seems the crash is located in the call to the "registerPlugin" method. A pointer to a tlp::Plugin is retrieved from the createPluginObject method of the factory, then the "name" method is called on it and lead to a segfault.
All the other plugins are loaded without problem and simply deleting the libWindow shared library from the tulip plugin directory allows to avoid the crash.

I tried to check if something was specific to this plugin in particular but did not found anything.
Is there a way to prevent this specific plugin from being loaded ? It seems there is an option in the initTulipSoftware function to discard some plugins, but it tries to remove them from the disk with QFile::remove(), a behavior that is a bit strange.

This bug has been reproduced in tulip 4.1 and 4.4 and under Linux Mac and Windows environments.

1 Attachments

Discussion

  • Patrick Mary

    Patrick Mary - 2014-01-14

    Thanks for your report.
    We're not able to reproduce this bug, but
    can I suggest you to apply the uploaded patch on your 4.4 code line
    and tell us if it fixes your crash.

     
  • Odyssey

    Odyssey - 2014-01-14

    Thanks for the quick answer. I applied the patch but my application still crashes in the same way.

     
  • Odyssey

    Odyssey - 2014-01-29

    It seems putting the code of the window plugin in the tlp namespace has solved the issue. It is probably a symbol conflict though I did not found what was causing it. Could you consider putting the c++ code of the plugins in a namespace as it is considered a good practice ?

     
  • Patrick Mary

    Patrick Mary - 2014-01-30
    • status: open --> closed-fixed
     
  • Patrick Mary

    Patrick Mary - 2014-01-30

    Thank you very much for your report.
    This bug is now fixed in the current svn code line (commit #9955).
    All the glyph plugin classes are now defined in the tlp namespace.
    As you stated, it is a good practice to use its own namespace because
    it allows to use class names as common as Window, Circle, Square...
    in preventing of possible symbol conflicts.

     

Log in to post a comment.