#148 PNG view not working

gretl gui (36)


I am using the lastest version of Gretl (1.9.3) - built 11-06-2010. I have updated my Gretl from the version 06-24-2010 (1.9.2). I am unable to work with PNG format since the new version. I do not have admin rights on my computer, but that caused no trouble whatsoever with the former version. When I try to plot any kind of graph, I always get thi:
The PNG file itself (gretltmp.png) gets created in the given directory (Documents and settings/User/application data/gretl) but Grel is unable to show it in the program window. Once I close the error message, the temp file gets deleted (that is expected). I am not really sure if this is an issue given the new version or an issue of my desktop. But since I have not altered any settings concearning image browsing or whatsoever, I dont think that is the case.
I will appretiate any input on this as it is essential to have easy access to graphical tools.

PS: The error occurs regardles of the way I try to call the gnuplot function (or any function with graphical output - like boxplot)


  • Allin Cottrell

    Allin Cottrell - 2010-11-08

    I have just tested the 2010-11-08 Windows snapshot on MS Vista,
    and graphing is working OK here. I have made a new version of
    the gretl zip-package for win32 (which can be used by people
    without any admin rights on Windows); this in in sync with the exe
    installer snapshot (see http://gretl.sourceforge.net/win32/ ).

  • Allin Cottrell

    Allin Cottrell - 2010-11-08
    • assigned_to: nobody --> allin
    • labels: --> gretl gui
  • Tomas Houska

    Tomas Houska - 2010-11-08

    I have just tried the new snapshot but I get the same mistake. Since it is working fine on my home pc and but not on my work PC, I sense it is the problem of the computer itself....
    thanks for the help though! I appreciate it

  • Tomas Houska

    Tomas Houska - 2010-11-09

    I have tried the lastest snapshot under both client and admin rights and I always get the same mistake. The PNG file is created, I can view it with default picture viewer in Windows (XP), it is the right graph...but it is not shown in the Gretl windown. Can I ask you, what kind of library is Gretl using to display PNG files? I am using Windows XP if there is smth that I should rewrite I have no problems of doing it in order to make it work.
    The PNG file is created, in the right folder, the path for the file is right (according to the screenshot), but Gretl for some reason cannot open the PNG file - which is also not corrupted because I can open it with default picture viewer in WinXP.
    thanks for any tips

  • Allin Cottrell

    Allin Cottrell - 2010-11-09

    I have updated the Windows snapshot such that gretl does not
    immediately delete gretltmp.png after coming to the conclusion
    that it is invalid. Could you send me (or post here) a copy of this

    (To answer your question, gretl uses the gdk-pixbuf library.)

  • Tomas Houska

    Tomas Houska - 2010-11-15

    Hi, sorry for the delay, I was out of office for some time...
    so here is the png file: http://bit.ly/9PMOm3
    and here is some tmp file, that gretl creates with it: http://bit.ly/ddKocS

    I hope this helps. I will try to overwrite my gdk-puxbuf files with the files that are on my coleagues computer- For that I will need some time (I need to contact our IT dep.). Maybe thats where all the troubles are...thanks a lot for your time in this!

  • Allin Cottrell

    Allin Cottrell - 2010-11-15

    Thanks for the files. The file gretltmp.png is indeed a valid
    PNG file -- it starts with the correct PNG "magic bytes". Since
    gretl is complaining that it's not valid (based on checking the
    first 8 bytes), something must be going wrong with retrieving
    its content from disk.

    Can you try the current gretl snapshot? I've made a change that
    might perhaps make a difference. In case the PNG file is still
    declared invalid, I've added a debugging statement that reports
    the first 8 bytes as read by gretl, which might give us a better idea
    of what's wrong. To see debugging output from gretl, start
    gretlw32.exe with the --debug flag.

  • Tomas Houska

    Tomas Houska - 2010-11-16

    Hi, I have just tried the latest snapshot and it works! I dont know what you have changed but I can see all the graphs now!! :-)
    (bts. I have tried comparing my gdk-puxbuf library files with the ones on my colleagues computer (he experiences now probles with PNG files) and all the files (libgdk-win32-2.0-0.dll, libgdk_pixbuf-2.0-0.dll, gdk-pixbuf.loaders) were the same...so I suppose that wasnt the problem)...

    But the lastest snapshot works for me just great.... out of curiosity, can you let me please briefly know what helped to solve the problem? :-)
    thank you again! I really appretiate the help to one single user. I am aware, that it is very unstandard to talk to a single user about his tech.issues.. so thank you!!

  • Allin Cottrell

    Allin Cottrell - 2010-11-16
    • status: open --> closed-fixed
  • Allin Cottrell

    Allin Cottrell - 2010-11-16

    The fix involved changing how the content of the PNG file is
    first sucked into memory. We were using the GLib function
    g_file_get_contents(), and it struck me that just possibly this
    function was not handing the binary content of the image file
    correctly. So I switched to explicitly opening the image file
    with plain fopen(), with its binary switch, and getting the content
    with fread(). This is quite weird, because if g_file_get_contents
    really has a problem with binary data, you'd expect that gretl's
    PNG file display would never have worked on any version of
    MS Windows!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks