Solved Linux/SlackWare/RT-5.0-r1-gtk2 crashing when opening a directory with close to 1000 pictures

I believe I just found a solution to a recurring problem I had with RT crashing when opening directories with close to 1000 files in. The problem was intermittent since sometimes like last night RT could open some directory that I couldn’t open later this morning. But once RT started to dislike one of my directories it would always crash when opening that directory.

I am posting this for the record since someone else might get into that problem, possibly after updating RT a number of times.

The solution that seems to work for me is to clear the thumbnails in Preferences/File browser/Cache options and now RT no longer crashes when opening the picture directories it didn’t want to open before.

Clearing the cache is definitely recommended and is listed in rawpedia as a fix for crashing problems such as these :slight_smile:

Sorry, I didn’t see the rawpedia entry although I searched a lot to solve that problem. And I believe I double posted while attempting to mark “Closed” a question on that subject I posted here some months ago. I am still not used to this forum format.

No worries! All we want is your participation.

There was also a leak which led to crashes when switching folder with a lot of files, which is fixed now.
For reference: Large memory leak when switching folder in file browser · Issue #3908 · Beep6581/RawTherapee · GitHub, and RT crashes when switching folders · Issue #3940 · Beep6581/RawTherapee · GitHub

Thanks, I have been trying to upgrade to 5.1 but then I need to have gtk+3 installed on my Slackware. I did that, but then I also need to upgrade X11. In short, I have to upgrade to Slackware-14.2 which I can’t do right now. So I will have to live with that bug for some time. I have experimented a couple of crashes since my last post. Then I need to clear the cache and I can use RT on those large directories again…

(edit) I will try the patches and hope that it solves the issue so I wont feel the need to upgrade Slackware.

I think that patch doesn’t apply to 5.0-gtk2. The code looks like,

[rtgui/thumbbrowserentrybase.cc]
    if (!win)
        // Nothing to draw on, so we return
    {
        return;
    }

    backBuffer = Gdk::Pixmap::create (win, exp_width, exp_height);

    // If thumbnail is hidden by a filter drawing to it will crash
    int backbuffer_w = 0, backbuffer_h = 0;
    backBuffer->get_size(backbuffer_w, backbuffer_h);

    // if either with or height is zero then return early
    if (backbuffer_w * backbuffer_h == 0) {
        return;
    }