#126 Can't save pictures - Windows Vista

Dave Neal

When trying to save a picture, I receive the error message: 'mix_load_rw with null src'. When clicking new, after this problem, palette displays. On choosing open, then save, I get the message: 'couldn't open data/starters/worldmap_japan-back.png'.

I have defined a new directory for images to be saved in in the config prog, but this occured even before I did that.

I am running Tux v09.20b of 2008-08-20 (in full screen mode), running on Windows Vista v6.0.600

Any help with this gratefully received - thanks!



  • William Kendrick

    Are these problems still occuring under Tux Paint 0.9.21?

    Can you attach the output files: stderr.txt and stdout.txt (which are created in the folder containing TuxPaint.exe on your system, e.g., under C:\Program Files\TuxPaint)?

    Please also attach your tuxpaint.conf configuration file.


  • William Kendrick

    Ping! :)

  • William Kendrick

    I've just received a similar report from someone else, with a little more detail on the situation. (Will ask whether they, too, are on Vista)

    I have downloaded Tux Paint as a recommendation from another school in our
    state. I am in a room with two other teachers who have successfully
    installed it. They have no problems saving their work. Mine looks like
    theirs; I have the stamps downloaded as well and can set a background and
    put stamps on and draw etc. but when I go to save it puts in the comment
    "couldn't save/data/starters/worldmap_japan-back.png". I have even
    `uninstalled' the program and tried again. Both the other ladies
    computers took a while to download and install, but mine was really
    quick...don't know if this has anything to do with it??

  • John Popplewell

    John Popplewell - 2010-01-25

    Hi, I'd not noticed this one on the tracker, sorry bill. I don't have Vista available to me until February 12th so there's probably not much I can do. Here's all I can think of right now:

    Was the installer run as Administrator?
    Was this an upgrade from a previous version of Tux Paint?

    It looks like a permission problem but the error message is odd, to say the least.

    The version of Tux Paint doesn't seem to be the latest one in at least one of the reports.

    Has Tux Paint Config been used to change the save/data directory?


  • William Kendrick

    Without having anyone's "stderr.txt" or "stdout.txt" files handy, I'm wondering if the error message they're seeing on the screen is constructed by "strerror()". I see Tux speaking those in 3 functions, all having to do with saving:

    if (!make_directory("", "Can't create user data directory"))
    draw_tux_text(TUX_OOPS, strerror(errno), 0);

    fname = get_fname("current_id.txt", DIR_SAVE);

    fi = fopen(fname, "w");
    if (fi == NULL)
    draw_tux_text(TUX_OOPS, strerror(errno), 0);

    / Save the file: /

    snprintf(tmp, sizeof(tmp), "saved/%s%s", file_id, FNAME_EXTENSION);
    fname = get_fname(tmp, DIR_SAVE);
    fi = fopen(fname, "wb");
    if (fi == NULL)
    draw_tux_text(TUX_OOPS, strerror(errno), 0);

    ...multiple places during PNG construction & saving...

    Playing around with permissions (e.g., unwritiable 'saved' folder, unwritable 'current_id.txt', trying to replace a picture that is read-only -- all on Linux), was initially unable to replicate the issue at hand.

    HOWEVER, I see that: (1) the strerror() spoken by Tux is often wrong (e.g., I was getting an error about being unable to open audio device when a save failed), (2) there IS no "worldmap_japan-back.jpg" in Starters... Tux Paint will look for this when searching the Starters folder when you click "New" to start a new picture. So that error string seems to hang around, even when a different error occurs (during save).

    So it sounds like it's a permissions issue. I know nothing of the various versions of Windows, nor the precise differences between "Administrator" and "normal user". I am utterly confused how a user running Tux Paint could end up with permissions issues, though. (If user X runs Tux Paint, their files should go in something like "C:\Documents and Settings\X...", right? Regardless as to who installed Tux Paint...!)

  • William Kendrick

    A similar issue was reported April 2011 by Frank K.

  • William Kendrick

    These errors are spurious. Tux Paint was mistakenly showing old errors from SDL_GetError() (ignorable problems loading sounds/etc.), rather than the actual error (via strerror()).

    The errors would have been regarding Tux Paint's ability to create a folder for saving its files. So basically, there was a problem with path given to the savedir option, or perhaps with the system configuration, and Tux Paint was simply showing unrelated errors. Try changing savedir setting.


Log in to post a comment.