Menu

#1992 Unhandled exception in libgd

None
closed-out-of-date
nobody
gif (1) gd (2)
2021-08-25
2017-11-11
Anonymous
No

Hi:
Running figure8.plt on GNUPLOT 5.3 or 5.2, Windows 32 or Window 64 generates the same error. The debugger reports an exception generated by libgd-3.dll from wgnuplot.exe. The program first generates png files and then generates an animated gif. If I do these as separate steps, all goes fine.

My animation code builds on the the parametric plotting technique described here:

http://www.gnuplotting.org/drawing-a-loudspeaker/

The files for my example are here:

http://www.mpsge.org/figure8.zip

I originally intended to generate the PNG car image files and the animated GIF in a single GNUPLOT script, but I run into a abnormal termination when I combined these. I therefore use SYSTEM() to call addcar.plt from figure8.plt and multicar.plt.

I'd welcome suggestions on how to get the PNG and GIF terminals to operate in the script and avoid access violations in libGD.

2 Attachments

Discussion

  • Bastian Märkisch

    • labels: --> gif, gd
    • summary: Unhandled exception (libgd-3.dll) in wgnuplot.exe --> Unhandled exception in libgd
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,2 @@
     addcar.plt (702 Bytes; application/octet-stream)
    +figure8.zip (3.4 kB; application/zip)
    
    • Group: -->
    • Priority: -->
     
  • Bastian Märkisch

    The segmentation fault is not limited to Windows (confirmed also on Ubuntu 16.04). I am attaching a slightly modified version of your scripts which can be run on non-Windows platforms, too.

     
  • Ethan Merritt

    Ethan Merritt - 2017-11-14

    It may be hard to track down a bug in the gd source, but for what it's worth you can avoid triggering this problem by choosing the "nooptimize" option

      set terminal gif animate delay 3 nooptimize
    
     
  • Ethan Merritt

    Ethan Merritt - 2017-11-14

    There is a clear error in the libgd source code. I have submitted a bug report on their github tracker. Obviously it will take a while before any fix to the shared library percolates out to user machines. For now, always select "nooptimize" when making gif animations.
    https://github.com/libgd/libgd/issues/415

     
  • Ethan Merritt

    Ethan Merritt - 2020-09-16
    • status: open --> closed-out-of-date
     
  • Pierre Joye

    Pierre Joye - 2021-08-25

    I added a PR for this issue, could you check it out pls? https://github.com/libgd/libgd/issues/415

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.