RT crashes when trying to open processing queue

Here is a new build to try. Just tried to rebuild cairomm, and updated gtk+ and glibmm.
https://filebin.net/3xsk9qpq868ibky0/RawTherapee_OSX_10.9_64_5.3-602-ge6265cdf.zip
Let us know what errors you get. Also could you tell us what your system locale/language is set to. For example, I am using US-en United States/English.

Hi Hiram
there is no difference with the new build. Crash log attached. - The choice of language in RT is “Use system language”, and system language is English (no choice of US or UK in Mac). Mac system locale is Germany.

RT cras log 6feb2018.rtf.zip (20.4 KB)

I can’t open DMG. Do macOS builds have separate release and debug executables? Is Hening’s log from a debug executable?

@Morgan_Hardwood Just a “release” binary is included in the mac dmg. @hening’s macOS crash log is from a release binary.

So…with the file that is working on the desktop, place it into a new folder called földür or whatever, and see if it crashes when queuing.

Somehow I’d like to reproduce the crash.

Hi Hiram
I attach .zips of my log of today and 3 crash logs. RT crashed upon queuing if the raw was placed in a ‘földür’ folder on the Desktop.

RT log 07feb2018.rtf.zip (1.17 KB)

crash log 1.rtf.zip (15 KB)

crash log 2.rtf.zip (1.6 KB)

crash log 3.rtf.zip (20.4 KB)

Great news. Simply changing my system locale to Germany, I was able to generate this crash. It occurred after putting image in queue with the put-to-queue button, noticing no number in the queue icon, and finally this crashed thread when I clicked on the queue tab. Image resides on the desktop inside a folder named földür.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libcairomm-1.0.1.dylib        	0x0000000105153a60 Cairo::Context::set_source(Cairo::RefPtr<Cairo::Surface> const&, double, double) + 16
1   rawtherapee-bin               	0x00000001033eb77b ThumbBrowserEntryBase::draw(Cairo::RefPtr<Cairo::Context>) + 699
2   rawtherapee-bin               	0x00000001033e8551 ThumbBrowserBase::Internal::on_draw(Cairo::RefPtr<Cairo::Context> const&) + 369
3   libgtkmm-3.0.1.dylib          	0x0000000104374f2f Gtk::Widget_Class::draw_callback(_GtkWidget*, _cairo*) + 175
4   libgtk-3.0.dylib              	0x0000000104ab852e gtk_widget_draw_internal + 350 (gtkwidget.c:7021)
5   libgtk-3.0.dylib              	0x000000010488f655 gtk_container_propagate_draw + 501 (gtkcontainer.c:3840)
6   libgtk-3.0.dylib              	0x000000010488fd83 gtk_container_draw + 211 (gtkcontainer.c:3655)
7   libgtk-3.0.dylib              	0x000000010491bbd5 gtk_grid_render + 37 (gtkgrid.c:1715)
8   libgtk-3.0.dylib              	0x0000000104896b85 gtk_css_custom_gadget_draw + 37 (gtkcsscustomgadget.c:162)
9   libgtk-3.0.dylib              	0x000000010489c1db gtk_css_gadget_draw + 1659 (gtkcssgadget.c:877)
10  libgtk-3.0.dylib              	0x000000010491b041 gtk_grid_draw + 17 (gtkgrid.c:1724)
11  libgtkmm-3.0.1.dylib          	0x000000010437bf87 Gtk::Widget::on_draw(Cairo::RefPtr<Cairo::Context> const&) + 71
12  libgtkmm-3.0.1.dylib          	0x0000000104374f2f Gtk::Widget_Class::draw_callback(_GtkWidget*, _cairo*) + 175
13  libgtk-3.0.dylib              	0x0000000104ab852e gtk_widget_draw_internal + 350 (gtkwidget.c:7021)
14  libgtk-3.0.dylib              	0x000000010488f655 gtk_container_propagate_draw + 501 (gtkcontainer.c:3840)
15  libgtk-3.0.dylib              	0x000000010488fd83 gtk_container_draw + 211 (gtkcontainer.c:3655)
16  libgtk-3.0.dylib              	0x00000001048451b5 gtk_box_draw_contents + 37 (gtkbox.c:450)
17  libgtk-3.0.dylib              	0x0000000104896b85 gtk_css_custom_gadget_draw + 37 (gtkcsscustomgadget.c:162)
18  libgtk-3.0.dylib              	0x000000010489c1db gtk_css_gadget_draw + 1659 (gtkcssgadget.c:877)
19  libgtk-3.0.dylib              	0x0000000104844361 gtk_box_draw + 17 (gtkbox.c:459)
20  libgtkmm-3.0.1.dylib          	0x000000010437bf87 Gtk::Widget::on_draw(Cairo::RefPtr<Cairo::Context> const&) + 71
21  libgtkmm-3.0.1.dylib          	0x0000000104374f2f Gtk::Widget_Class::draw_callback(_GtkWidget*, _cairo*) + 175
22  libgtk-3.0.dylib              	0x0000000104ab852e gtk_widget_draw_internal + 350 (gtkwidget.c:7021)
23  libgtk-3.0.dylib              	0x000000010488f655 gtk_container_propagate_draw + 501 (gtkcontainer.c:3840)
24  libgtk-3.0.dylib              	0x0000000104997bf0 gtk_notebook_draw_stack + 64 (gtknotebook.c:2519)
25  libgtk-3.0.dylib              	0x0000000104896b85 gtk_css_custom_gadget_draw + 37 (gtkcsscustomgadget.c:162)
26  libgtk-3.0.dylib              	0x000000010489c1db gtk_css_gadget_draw + 1659 (gtkcssgadget.c:877)
27  libgtk-3.0.dylib              	0x00000001048476fc gtk_box_gadget_draw + 188 (gtkboxgadget.c:504)
28  libgtk-3.0.dylib              	0x000000010489c1db gtk_css_gadget_draw + 1659 (gtkcssgadget.c:877)
29  libgtk-3.0.dylib              	0x000000010499277e gtk_notebook_draw + 46 (gtknotebook.c:2532)
30  libgtkmm-3.0.1.dylib          	0x000000010437500b Gtk::Widget_Class::draw_callback(_GtkWidget*, _cairo*) + 395
31  libgtk-3.0.dylib              	0x0000000104ab852e gtk_widget_draw_internal + 350 (gtkwidget.c:7021)
32  libgtk-3.0.dylib              	0x000000010488f655 gtk_container_propagate_draw + 501 (gtkcontainer.c:3840)
33  libgtk-3.0.dylib              	0x000000010488fd83 gtk_container_draw + 211 (gtkcontainer.c:3655)
34  libgtk-3.0.dylib              	0x0000000104ad7a88 gtk_window_draw + 744
35  libgtkmm-3.0.1.dylib          	0x000000010437bf87 Gtk::Widget::on_draw(Cairo::RefPtr<Cairo::Context> const&) + 71
36  libgtkmm-3.0.1.dylib          	0x0000000104374f2f Gtk::Widget_Class::draw_callback(_GtkWidget*, _cairo*) + 175
37  libgtk-3.0.dylib              	0x0000000104ab852e gtk_widget_draw_internal + 350 (gtkwidget.c:7021)
38  libgtk-3.0.dylib              	0x0000000104ab9869 gtk_widget_render + 313 (gtkwidget.c:17494)
39  libgtk-3.0.dylib              	0x00000001049602e6 gtk_main_do_event + 1830 (gtkmain.c:1937)
40  libgdk-3.0.dylib              	0x0000000105007791 _gdk_event_emit + 49 (gdkevents.c:75)
41  libgdk-3.0.dylib              	0x000000010501d1c6 _gdk_window_process_updates_recurse_helper + 326
42  libgdk-3.0.dylib              	0x000000010502d84f -[GdkQuartzView drawRect:] + 319 (GdkQuartzView.c:641)
43  com.apple.AppKit              	0x00007fff771bdf99 -[NSView _drawRect:clip:] + 2276
44  com.apple.AppKit              	0x00007fff7720df2f -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1753
45  com.apple.AppKit              	0x00007fff771bbad2 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 837
46  com.apple.AppKit              	0x00007fff771bc6d1 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3908
47  com.apple.AppKit              	0x00007fff771bb2af -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334
48  com.apple.AppKit              	0x00007fff771b96d8 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2452
49  com.apple.AppKit              	0x00007fff771b4fca -[NSView displayIfNeeded] + 1748
50  com.apple.AppKit              	0x00007fff771b48db -[NSWindow displayIfNeeded] + 230
51  com.apple.AppKit              	0x00007fff77914cb4 ___NSWindowGetDisplayCycleObserver_block_invoke.6228 + 277
52  com.apple.AppKit              	0x00007fff771b43b9 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 454
53  com.apple.QuartzCore          	0x00007fff7f459cc6 CA::Transaction::run_commit_handlers(CATransactionPhase) + 46
54  com.apple.QuartzCore          	0x00007fff7f5638ac CA::Context::commit_transaction(CA::Transaction*) + 160
55  com.apple.QuartzCore          	0x00007fff7f4587a1 CA::Transaction::commit() + 475
56  com.apple.AppKit              	0x00007fff774978b1 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323
57  com.apple.CoreFoundation      	0x00007fff7958ede7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
58  com.apple.CoreFoundation      	0x00007fff7958ed57 __CFRunLoopDoObservers + 391
59  com.apple.CoreFoundation      	0x00007fff7956fb09 __CFRunLoopRun + 873
60  com.apple.CoreFoundation      	0x00007fff7956f544 CFRunLoopRunSpecific + 420
61  com.apple.HIToolbox           	0x00007fff78aceebc RunCurrentEventLoopInMode + 240
62  com.apple.HIToolbox           	0x00007fff78acebf9 ReceiveNextEventCommon + 184
63  com.apple.HIToolbox           	0x00007fff78aceb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
64  com.apple.AppKit              	0x00007fff77065a54 _DPSNextEvent + 1120
65  com.apple.AppKit              	0x00007fff777e17ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
66  libgdk-3.0.dylib              	0x0000000105034cec poll_func + 172 (gdkeventloop-quartz.c:742)
67  libglib-2.0.0.dylib           	0x0000000104194f7f g_main_context_iterate + 340
68  libglib-2.0.0.dylib           	0x000000010419522a g_main_loop_run + 207
69  libgtk-3.0.dylib              	0x000000010495fa4a gtk_main + 74 (gtkmain.c:1323)
70  libgtkmm-3.0.1.dylib          	0x00000001042f7abd Gtk::Main::run(Gtk::Window&) + 253
71  rawtherapee-bin               	0x0000000103325796 main + 5158
72  libdyld.dylib                 	0x00007fff8f139235 start + 1

I’ll see if I can get any data from a debug build (and open an issue on GH).

@heckflosse @Morgan_Hardwood

This issue seems similar. In @hening’s case, we have successfully processed queues of images from folders with international characters like ö and ü. At this point however changing the system region from United States to Germany causes a different crash upon switching to queue.

In a previous issue

we added this to the executable loader:

# Prevent crash when directory name contains special characters
AppleLocale=\`defaults read -g AppleLocale\`
export LANG=${AppleLocale%@*}.UTF-8

To fix another ö/ü crash related to the language set.

Now that those errors are fixed, I notice the new crash involving a cairomm call when I switch my system region to Germany from US (and use ö’s and ü’s).

As you mentioned me: Is there anything I can do to help fixing the issue?

@heckflosse Do you think en_DE is being handled as normally as en_US in RT, for instance in the code above?

Wait, that rings a bell with me. There’s new code here, that overwrites LANG without the .UTF-8 suffix. If that was a problem before, it is again now.

HTH,
Flössie

@HIRAM can you try this patch please?

diff --git a/rtgui/multilangmgr.cc b/rtgui/multilangmgr.cc
index b4896d69..23bf4c45 100644
--- a/rtgui/multilangmgr.cc
+++ b/rtgui/multilangmgr.cc
@@ -117,9 +117,13 @@ void setGtkLanguage(const Glib::ustring &language)
     auto l = localeToLang.getLocale(language);
 #ifdef WIN32
     putenv(("LANG=" + l).c_str());
+#else
+#ifdef __APPLE__
+    setenv("LANG", (l + ".UTF-8").c_str(), true);
 #else
     setenv("LANG", l.c_str(), true);
 #endif
+#endif
 }
 
 }

@heckflosse, still have the problems and crash when switching to queue.

I even tried
#elifdef __APPLE__
{;} //do nothing
but always the same crash…

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libcairomm-1.0.1.dylib        	0x000000010a47efe0 Cairo::Context::set_source(Cairo::RefPtr<Cairo::Surface> const&, double, double) + 16 (surface.h:364)
1   rawtherapee-bin               	0x00000001087262ab ThumbBrowserEntryBase::draw(Cairo::RefPtr<Cairo::Context>) + 699
2   rawtherapee-bin               	0x0000000108723081 ThumbBrowserBase::Internal::on_draw(Cairo::RefPtr<Cairo::Context> const&) + 369
3   libgtkmm-3.0.1.dylib          	0x0000000109726f2f Gtk::Widget_Class::draw_callback(_GtkWidget*, _cairo*) + 175
4   libgtk-3.0.dylib              	0x0000000109e1971c gtk_widget_draw_internal + 364 (gtkwidget.c:7027)
5   libgtk-3.0.dylib              	0x0000000109c35e9a gtk_container_propagate_draw + 362 (gtkcontainer.c:3840)
6   libgtk-3.0.dylib              	0x0000000109c36443 gtk_container_draw + 147 (gtkcontainer.c:3655)

I’m not a developer, so my idea is probably naïve, but let go: Is it not possible just to take the corresponding parts of the code from RT 4.2 which had overcome this problem, unlike earlier versions?

That sounds good, but

  1. rt 4.2 used gtk2 while rt 5.3 uses gtk3
  2. we didn’t yet indentify the culprit

I have no idea what gtk means, but I have a version of RT 4.2 that has gtk3 in the name. That does not solve problem 2. of course. But should it not have something to do with non-ASCII characters in the Path, since also 5.3 works if the image file is on the Desktop?

That seems to correspond to this code:

Now, when backBuffer is NULL or garbage that will crash. Can that happen? After all, that case is checked a few lines earlier? Yes, it can, as updateBackBuffer returns early when there is no parent:

If any of that is relevant I don’t know. But it might be a start for some further debugging.

Edit: I might have been wrong there. It could be that backbuffer is fine but that it has no surface set.

Thanks, @houz, for looking into it. Our current problem is, why locales are so difficult (under macOS). I would be really glad, if you could share some thoughts on the issue.

Thanks,
Flössie

Interesting @houz
Perhaps having a weird combo like en_DE causes problems with backBuffer or surface?