Results 1 to 2 of 2

Thread: 'renderDocument' Segmentation fault in Qt-5.6.2

  1. #1
    Join Date
    Jan 2012
    Posts
    10
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 'renderDocument' Segmentation fault in Qt-5.6.2

    Hello,

    The following code segfaults in Qt-5.6.2 but works in Qt-4.8.6. Both are using qwt-6.1.3
    Qt Code:
    1. QString pngfile=pathinfo.path()+"/"+"a_fat.png";
    2. renderer.renderDocument(plot, pngfile, "png", QSizeF(300, 200), 150);
    To copy to clipboard, switch view to plain text mode 

    However, if try to export an svg it works fine in Qt-5.6.2
    Qt Code:
    1. QString svgfile=pathinfo.path()+"/"+"a_fat.svg";
    2. renderer.renderDocument(plot, svgfile, "svg", QSizeF(300, 200), 150);
    To copy to clipboard, switch view to plain text mode 

    I compared the Qt build options on my Gentoo Linux box and they both had png support.

    Qt Code:
    1. #emerge -pv qtgui:4
    2.  
    3. These are the packages that would be merged, in order:
    4.  
    5. Calculating dependencies... done!
    6. [ebuild R ] dev-qt/qtgui-4.8.6-r4:4::gentoo USE="accessibility cups exceptions glib mng qt3support tiff xinerama xv (-aqua) -debug -egl -gtkstyle -nas -nis -pch -trace" ABI_X86="(64) -32 (-x32)" 0 KiB
    7.  
    8. # emerge -pv qtgui
    9.  
    10. These are the packages that would be merged, in order:
    11.  
    12. Calculating dependencies... done!
    13. [ebuild R ] dev-qt/qtgui-5.6.2:5/5.6::gentoo USE="dbus egl gif jpeg png udev xcb -accessibility -debug -eglfs -evdev -gles2 -gtkstyle -ibus -libinput {-test} -tslib -tuio" 0 KiB
    To copy to clipboard, switch view to plain text mode 

    I am at loss to explain why the system doesnt produce a png. Any idea?

    Thanks
    Last edited by rajil.s; 17th February 2017 at 03:58.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: 'renderDocument' Segmentation fault in Qt-5.6.2

    When having a segfault it is always worth to start the debugger.

    Uwe

Similar Threads

  1. QWT - Segmentation Fault
    By Wojtek.wk in forum Newbie
    Replies: 0
    Last Post: 17th April 2010, 15:29
  2. segmentation fault!!
    By Yayati.Ekbote in forum Qt Programming
    Replies: 4
    Last Post: 24th March 2010, 16:10
  3. Segmentation Fault
    By jmc in forum Qt Tools
    Replies: 4
    Last Post: 24th February 2010, 21:08
  4. Segmentation Fault
    By freekill in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2010, 16:31
  5. segmentation fault
    By uchennaanyanwu in forum Newbie
    Replies: 3
    Last Post: 31st July 2008, 17:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.