Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSX] Cairo Font Bug (RT Crashes when I open certain tiff or jpeg) #3899

Closed
Benitoite opened this issue May 30, 2017 · 5 comments
Closed

[OSX] Cairo Font Bug (RT Crashes when I open certain tiff or jpeg) #3899

Benitoite opened this issue May 30, 2017 · 5 comments

Comments

@Benitoite
Copy link
Contributor

Benitoite commented May 30, 2017

See also: https://discuss.pixls.us/t/rt-5-1-macosx-10-12-5-crash-when-i-edit-an-image/4320

About this build

Version: 5.1
Branch: 5.1
Commit: f23d70fd
Commit date: 2017-05-15
Compiler: clang-mp-3 3.9.1
Processor: generic x86
System: Apple
Bit depth: 64 bits
Gtkmm: V3.16.0
Build type: debug
Build flags: -arch x86_64 -O0 -std=c++11 -mtune=generic -Werror=unused-label -mmacosx-version-min=10.9 -fopenmp=libomp -Werror=unknown-pragmas -Wall -Wno-unused-result -Wno-deprecated-declarations -g
Link flags:  -mtune=generic -headerpad_max_install_names
OpenMP support: ON
MMAP support: ON

System: MacOS Sierra

How to reproduce, try to open certain tiffs or jpgs like this one: https://filebin.net/goedpl7mm56wf7mj/rt51a.tif
or this one:
https://filebin.net/goedpl7mm56wf7mj/cuChi2016school-Sat.jpg

The crash and bt

Assertion failed: (!scaled_font->cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 459.
Process 83376 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff9ab4dd42 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff9ab4dd42 <+10>: jae    0x7fff9ab4dd4c            ; <+20>
    0x7fff9ab4dd44 <+12>: movq   %rax, %rdi
    0x7fff9ab4dd47 <+15>: jmp    0x7fff9ab46caf            ; cerror_nocancel
    0x7fff9ab4dd4c <+20>: retq   
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff9ab4dd42 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff9ac3b457 libsystem_pthread.dylib`pthread_kill + 90
    frame #2: 0x00007fff9aab3420 libsystem_c.dylib`abort + 129
    frame #3: 0x00007fff9aa7a893 libsystem_c.dylib`__assert_rtn + 320
    frame #4: 0x0000000102a48dc7 libcairo.2.dylib`_cairo_scaled_glyph_page_destroy + 155
    frame #5: 0x0000000102a4b3e4 libcairo.2.dylib`_cairo_scaled_font_free_last_glyph + 146
    frame #6: 0x0000000102a4a535 libcairo.2.dylib`_cairo_scaled_glyph_lookup + 559
    frame #7: 0x0000000102a4abdb libcairo.2.dylib`_cairo_scaled_font_glyph_path + 128
    frame #8: 0x0000000102a1d8d1 libcairo.2.dylib`_cairo_gstate_glyph_path + 203
    frame #9: 0x0000000102a124a7 libcairo.2.dylib`cairo_glyph_path + 42
    frame #10: 0x000000010295b426 libpangocairo-1.0.0.dylib`pango_cairo_renderer_show_text_glyphs + 778
    frame #11: 0x000000010295ab2e libpangocairo-1.0.0.dylib`pango_cairo_renderer_draw_glyphs + 38
    frame #12: 0x0000000102986daa libpango-1.0.0.dylib`pango_renderer_draw_glyphs + 66
    frame #13: 0x00000001029867ce libpango-1.0.0.dylib`pango_renderer_draw_layout_line + 750
    frame #14: 0x00000001029863e7 libpango-1.0.0.dylib`pango_renderer_draw_layout + 236
    frame #15: 0x000000010295a8e0 libpangocairo-1.0.0.dylib`_pango_cairo_do_layout + 59
    frame #16: 0x000000010030f34e rawtherapee-bin`ImageArea::setInfoText(this=0x000000010f24d030, text=(string_ = " Unknown + \n<span size=\"small\">f/</span><span size=\"large\">0.0</span>  <span size=\"large\">0.0</span><span size=\"small\">s</span>  <span size=\"small\">ISO</span><span size=\"large\">0</span>  <span size=\"large\">0.00</span><span size=\"small\">mm</span>\n<span size=\"small\">/Users/tune/Desktop/</span><span>rt51a.tif</span>\n<span size=\"small\"> 2.0 MP (1400x1400)</span>")) at imagearea.cc:186
    frame #17: 0x00000001001b1c26 rawtherapee-bin`EditorPanel::info_toggled(this=0x000000010bf57c90) at editorpanel.cc:1306
    frame #18: 0x00000001001bc6c1 rawtherapee-bin`EditorPanel::open(this=0x000000010bf57c90, tmb=0x0000000127ab5200, isrc=0x000000010f42b3f0) at editorpanel.cc:988
    frame #19: 0x0000000100274ea9 rawtherapee-bin`FilePanel::imageLoaded(this=0x0000000106d57bf0, thm=0x0000000127ab5200, pc=0x000000010ded9d20) at filepanel.cc:290
    frame #20: 0x000000010027ce5c rawtherapee-bin`sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*>::operator(this=0x000000010bb0f820, _A_a1=0x000000010bb0f840, _A_a2=0x000000010bb0f848)(Thumbnail* const&, ProgressConnector<rtengine::InitialImage*>* const&) const at mem_fun.h:1927
    frame #21: 0x000000010027cda4 rawtherapee-bin`sigc::adaptor_functor<sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*> >::deduce_result_type<Thumbnail*&, ProgressConnector<rtengine::InitialImage*>*&, void, void, void, void, void>::type sigc::adaptor_functor<sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*> >::operator(this=0x000000010bb0f818, _A_arg1=0x000000010bb0f840, _A_arg2=0x000000010bb0f848)<Thumbnail*&, ProgressConnector<rtengine::InitialImage*>*&>(Thumbnail*&, ProgressConnector<rtengine::InitialImage*>*&) const at adaptor_trait.h:108
    frame #22: 0x000000010027cd62 rawtherapee-bin`sigc::bind_functor<-1, sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*>, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::operator(this=0x000000010bb0f810)() at bind.h:1339
    frame #23: 0x000000010027cd01 rawtherapee-bin`sigc::internal::slot_call0<sigc::bind_functor<-1, sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*>, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>, bool>::call_it(rep=0x000000010bb0f7e0) at slot.h:103
    frame #24: 0x00000001001c8e25 rawtherapee-bin`sigc::internal::signal_emit0<bool, sigc::nil>::emit(impl=0x00000001035b8e50) at signal.h:687
    frame #25: 0x00000001001c88d9 rawtherapee-bin`sigc::signal0<bool, sigc::nil>::emit(this=0x000000010a2c4df0) const at signal.h:2679
    frame #26: 0x000000010027a1fd rawtherapee-bin`ProgressConnector<rtengine::InitialImage*>::emitEndSignalUI(data=0x000000010a2c4df0) at progressconnector.h:78
    frame #27: 0x00000001028cb931 libgdk-3.0.dylib`gdk_threads_dispatch + 50
    frame #28: 0x0000000101cdf48e libglib-2.0.0.dylib`g_main_context_dispatch + 279
    frame #29: 0x0000000101cdf77d libglib-2.0.0.dylib`g_main_context_iterate + 413
    frame #30: 0x0000000101cdf9d3 libglib-2.0.0.dylib`g_main_loop_run + 207
    frame #31: 0x00000001023e397a libgtk-3.0.dylib`gtk_main + 74
    frame #32: 0x0000000101e1c49a libgtkmm-3.0.1.dylib`Gtk::Main::run(Gtk::Window&) + 156
    frame #33: 0x00000001003604c3 rawtherapee-bin`main(argc=1, argv=0x00007fff5fbff4b0) at main.cc:386
    frame #34: 0x00007fff9aa1f235 libdyld.dylib`start + 1

@Partha1b @ion12 does that look like a familiar bug?

@Partha1b
Copy link

@Benitoite Yes, it is a known bug. Recompile cairo without that offending line and rerun your make script and see if you can reproduce the bug.

@Benitoite
Copy link
Contributor Author

I'm guessing it's file cairo-scaled-font.c, line 459.

@Benitoite
Copy link
Contributor Author

Benitoite commented May 30, 2017

@Partha1b Commented out line 459 but now get the crash at 460.

Assertion failed: (!scaled_font->global_cache_frozen), function _cairo_scaled_glyph_page_destroy, file cairo-scaled-font.c, line 460.

@Benitoite
Copy link
Contributor Author

Benitoite commented May 30, 2017

@Partha1b Ok, I've gotten that crash to go away by also commenting out 460, so far with the debug build.

@Benitoite
Copy link
Contributor Author

Success also in a release build.

Version: 5.1
Branch: 5.1
Commit: f23d70fd
Commit date: 2017-05-15
Compiler: clang-mp-3 3.9.1
Processor: generic x86
System: Apple
Bit depth: 64 bits
Gtkmm: V3.16.0
Build type: release
Build flags: -arch x86_64 -O3 -std=c++11 -mtune=generic -Werror=unused-label -mmacosx-version-min=10.9 -flto -fopenmp=libomp -Werror=unknown-pragmas -Wall -Wno-unused-result -Wno-deprecated-declarations -O3 -DNDEBUG
Link flags:  -mtune=generic -headerpad_max_install_names -flto
OpenMP support: ON
MMAP support: ON

https://filebin.net/fpn3joegylydvr3x/RawTherapee_OSX_10.9_64_5.1.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants