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

Locales (characters in file names) causing program termination on version 5.10-179 when opening files for editing #7034

Closed
kaesa opened this issue Apr 10, 2024 · 1 comment · Fixed by #7039
Labels
priority: high Should be fixed with higher urgency type: bug Something is not doing what it's supposed to be doing
Milestone

Comments

@kaesa
Copy link

kaesa commented Apr 10, 2024

Short description
On version 5.10-179-g11240bc97 - Linux
Using character 'ä' in filenames causes the program to close when trying to open the image file. This happens with Sony A7II generated ARW files, Canon 2000D generated CR2 files, but for some reason, not with Canon R10 generated CR3 files.

Issue didn't exist with 5.10, it started happening after building with the latest commits.

I believe I have narrowed this issue to be caused by an unhandled exception, when the locale settings are messed up. I cannot reproduce the issue with fresh user accounts. I hope it makes sense.

Steps to reproduce
Use any GUI tool that comes with your Linux distribution to mess up the locales to the point starting programs in the console gives the following warning:

(process:69291): Gtk-WARNING **: 19:12:48.138: Locale not supported by C library.
        Using the fallback 'C' locale.

Open raw files that are from Sony A7II or Canon 2000D and that have character 'ä' as part of their filenames.

Additional information
Version: 5.10-179-g11240bc97
Branch: dev
Commit: 11240bc
Commit date: 2024-03-28
Compiler: cc 13.2.1
Processor: x86_64
System: Linux
Bit depth: 64 bits
Gtkmm: V3.24.8
Lensfun: V0.3.4.0
Build type: Debug
Build flags: -std=c++11 -ffp-contract=off -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wno-attributes -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -fopenmp -Werror=unknown-pragmas -g -ftree-vectorize
Link flags:
OpenMP support: ON
MMAP support: ON
Build OS: Linux 5.15.150-1-MANJARO x86_64
Build date: Wed, 10 Apr 2024 15:37:52 +0000 UTC
Build epoch: 1712763472
Build UUID: 44f15405-8d8e-42a0-9385-6e53cc6b08e6

Other useful information:
GDB:

Thread 1 (Thread 0x7ffff1bcbb40 (LWP 68284) "rawtherapee"):
#0  0x00007ffff55a332c in ??? () at /usr/lib/libc.so.6
#1  0x00007ffff55526c8 in raise () at /usr/lib/libc.so.6
#2  0x00007ffff553a4b8 in abort () at /usr/lib/libc.so.6
#3  0x00007ffff57b9a6f in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
        terminating = true
        t = <optimized out>
#4  0x00007ffff57cd11c in __cxxabiv1::__terminate (handler=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
#5  0x00007ffff57cd189 in std::terminate () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58
#6  0x00007ffff57cd3ed in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7ffff6a3edb0 <typeinfo for Glib::ConvertError>, dest=0x7ffff69f8e80) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98
        globals = <optimized out>
        header = 0x55556248fa70
#7  0x00007ffff69f561f in Glib::ConvertError::throw_func(_GError*) () at /usr/lib/libglibmm-2.4.so.1
#8  0x00007ffff6a18c08 in Glib::Error::throw_exception(_GError*) () at /usr/lib/libglibmm-2.4.so.1
#9  0x00007ffff6a1f7af in Glib::operator<<(std::basic_ostream<char, std::char_traits<char> >&, Glib::ustring const&) () at /usr/lib/libglibmm-2.4.so.1
#10 0x0000555555fe33e5 in rtengine::DCPProfile::DCPProfile (this=0x555561dbd840, filename=...) at /home///RawTherapee/rtengine/dcp.cc:1176
        file = 0x555561c36e80
        adobe_camera_raw_default_curve = {0, 0.000780000002, 0.00159999996, 0.00242000003, 0.00313999993, 0.00384999998, 0.0046000001, 0.00539000006, 0.00622999994, 0.0071200002, 0.00805999991, 0.00906000007, 0.0101199998, 0.0112199998, 0.0123800002, 0.0135899996, 0.0148499999, 0.0161600001, 0.0175100006, 0.0188999996, 0.0203300007, 0.0218000002, 0.0233100001, 0.0248499997, 0.0264299996, 0.0280399993, 0.0296700001, 0.0313399993, 0.0330299996, 0.0347499996, 0.0364799984, 0.0382400006, 0.0400200002, 0.0418099985, 0.0436200015, 0.0454499982, 0.0472999997, 0.0491599999, 0.0510299988, 0.0529199988, 0.0548299998, 0.0567499995, 0.0586800016, 0.0606300011, 0.062590003, 0.0645700023, 0.0665500015, 0.0685599968, 0.0705699995, 0.0725900009, 0.0746299997, 0.0766799971, 0.0787400007, 0.080810003, 0.0829000026, 0.0849900022, 0.0870999992, 0.0892100036, 0.0913399979, 0.0934799984, 0.0956299976, 0.0977900028, 0.0999599993, 0.102140002, 0.104330003, 0.106519997, 0.108730003, 0.110950001, 0.113179997, 0.11541, 0.117660001, 0.119910002, 0.12218, 0.124449998, 0.126729995, 0.129020005, 0.13132, 0.133629993, 0.135949999, 0.138270006, 0.140609995, 0.142949998, 0.145300001, 0.147650003, 0.150020003, 0.152390003, 0.154770002, 0.157159999, 0.159559995, 0.161970004, 0.164379999, 0.166800007, 0.169229999, 0.171660006, 0.174099997, 0.176550001, 0.179010004, 0.181480005, 0.183950007, 0.186430007, 0.188909993, 0.191410005, 0.193910003, 0.19641, 0.198929995, 0.201450005, 0.203979999, 0.206510007, 0.20905, 0.211600006, 0.214159995, 0.21672, 0.219290003, 0.221849993, 0.224399999, 0.226960003, 0.229499996, 0.232040003, 0.234579995, 0.237110004, 0.239629999, 0.242149994, 0.244660005, 0.247170001, 0.249669999, 0.252160013, 0.254649997, 0.257129997, 0.259609997, 0.262080014, 0.264539987, 0.26699999, 0.269450009, 0.271890014, 0.27432999, 0.276760012, 0.27917999, 0.281599998, 0.284009993, 0.286410004, 0.288810015, 0.291200012, 0.293579996, 0.295960009, 0.298330009, 0.300689995, 0.303050011, 0.305400014, 0.307740003, 0.310079992, 0.312409997, 0.314729989, 0.317039996, 0.319350004, 0.321649998, 0.323949993, 0.32622999, 0.328509986, 0.330790013, 0.333050013, 0.335310012, 0.337559998, 0.339810014, 0.342049986, 0.344280005, 0.346500009, 0.348720014, 0.350930005, 0.353130013, 0.355320007, 0.35751, 0.359690011, 0.361869991, 0.364039987, 0.3662, 0.368349999, 0.370499998, 0.372640014, 0.374769986, 0.376890004, 0.379009992, 0.381119996, 0.383230001, 0.385329992, 0.387419999, 0.389499992, 0.391579986, 0.393649995, 0.395709991, 0.397769988, 0.39982, 0.401859999, 0.403890014, 0.405919999, 0.40794, 0.409960002, 0.41196999, 0.413969994, 0.415960014, 0.417950004...}
        tiff_float_size = 4
        md = Python Exception <class 'gdb.error'>: No type named std::__detail::_Hash_node<struct std::pair<int const, (anonymous namespace)::DCPMetadata::Tag>, false>.
{file_ = 0x555561c36e80, tags_ = std::unordered_map with 18 elements, order_ = (anonymous namespace)::DCPMetadata::INTEL}
        has_second_hue_sat = false
        tiff_float_size = <optimized out>
        file = <optimized out>
        md = Python Exception <class 'gdb.error'>: value has been optimized out
{file_ = <optimized out>, tags_ = , order_ = <optimized out>}
        has_second_hue_sat = <optimized out>
        row = <optimized out>
        col = <optimized out>
        row = <optimized out>
        col = <optimized out>
        row = <optimized out>
        col = <optimized out>
        i = <optimized out>
        i = <optimized out>
        cm2 = <optimized out>
        row = <optimized out>
        col = <optimized out>
        i = <optimized out>
        curve_points = Python Exception <class 'gdb.error'>: value has been optimized out

        curve_is_linear = <optimized out>
        i = <optimized out>
        n = <optimized out>
        x = <optimized out>
        y = <optimized out>
        curve_points = Python Exception <class 'gdb.error'>: value has been optimized out

        tc_len = <optimized out>
        i = <optimized out>
        x = <optimized out>
        y = <optimized out>
#11 0x0000555555fe8b03 in rtengine::DCPStore::getProfile (this=0x555556a268c0 <rtengine::DCPStore::getInstance()::instance>, filename=...) at /home/>//RawTherapee/rtengine/dcp.cc:2237
        key = "/home/valokuvaus/jono/metsäkauris.arw"
        lock = {<rtengine::NonCopyable> = {<No data fields>}, mutex = @0x555556a268c8, locked = true}
        iter = {first = <error: Cannot access memory at address 0x2>, second = 0x0}
        res = 0x555560bf6190
#12 0x0000555555ac6ccd in ICMPanel::setRawMeta (this=0x555560be8eb0, raw=true, pMeta=0x7fff900017f0) at /home/>//RawTherapee/rtgui/icmpanel.cc:2133
#13 0x0000555555efa703 in ToolPanelCoordinator::initImage (this=0x55555cb5a0c0, ipc_=0x5555624a8ed0, raw=true) at /home/>//RawTherapee/rtgui/toolpanelcoord.cc:1329
        pMetaData = 0x7fff900017f0
#14 0x0000555555937764 in EditorPanel::open (this=0x55555cb569a0, tmb=0x7fffc0063dc0, isrc=0x7fff90002b10) at /home/>//RawTherapee/rtgui/editorpanel.cc:1267
        is = 0x11d
        ldprof = 0x55555738e630
        defProf = {static npos = 18446744073709551615, string_ = ""}
#15 0x0000555555a02872 in FilePanel::imageLoaded (this=0x5555571be600, thm=0x7fffc0063dc0, pc=0x555562fd46e0) at /home/>//RawTherapee/rtgui/filepanel.cc:334
        pl = 0x55556239a420
#16 0x0000555555a09c9c in sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*>::operator() (this=0x55555c5e3ce0, _A_a1=@0x55555c5e3d00: 0x7fffc0063dc0, _A_a2=@0x55555c5e3d08: 0x555562fd46e0) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:2143
#17 0x0000555555a091fd in sigc::adaptor_functor<sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*> >::operator()<Thumbnail*&, ProgressConnector<rtengine::InitialImage*>*&> (this=0x55555c5e3cd8, _A_arg1=@0x55555c5e3d00: 0x7fffc0063dc0, _A_arg2=@0x55555c5e3d08: 0x555562fd46e0) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:108
#18 0x0000555555a0820a in 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=0x55555c5e3cd0) at /usr/include/sigc++-2.0/sigc++/adaptors/bind.h:1340
#19 0x0000555555a06feb in 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=0x55555c5e3ca0) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:136
        typed_rep = 0x55555c5e3ca0
#20 0x0000555555952b7d in sigc::slot0<bool>::operator() (this=0x555560d67ea8) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:540
#21 0x00005555559513ea in sigc::adaptor_functor<sigc::slot0<bool> >::operator() (this=0x555560d67ea0) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:256
#22 0x000055555594ed1a in sigc::internal::slot_call<sigc::slot0<bool>, bool>::call_it (rep=0x555560d67e70) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:483
        typed_rep = 0x555560d67e70
#23 0x0000555555951573 in sigc::internal::signal_emit0<bool, sigc::nil>::emit (impl=0x55555b71a6a0) at /usr/include/sigc++-2.0/sigc++/signal.h:705
        slots = Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'pointer'
Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'pointer'
{slots_ = std::__cxx11::list, placeholder = }
        it = {<sigc::functor_base> = {<No data fields>}, rep_ = 0x555560d67e70, blocked_ = false}
        exec = {sig_ = 0x55555b71a6a0}
        r_ = false
#24 0x000055555594f000 in sigc::signal0<bool, sigc::nil>::emit (this=0x7fff90061870) at /usr/include/sigc++-2.0/sigc++/signal.h:2805
#25 0x0000555555a07163 in ProgressConnector<rtengine::InitialImage*>::emitEndSignalUI (data=0x7fff90061870) at /home///RawTherapee/rtgui/progressconnector.h:83
        lopEnd = 0x7fff90061870
        r = 32767
#26 0x00007ffff758869e in gdk_threads_dispatch (data=0x7fff90057520) at ../gtk/gdk/gdk.c:769
        dispatch = 0x7fff90057520
        ret = 0
#27 0x00007ffff6edaf69 in ??? () at /usr/lib/libglib-2.0.so.0
#28 0x00007ffff6f393a7 in ??? () at /usr/lib/libglib-2.0.so.0
#29 0x00007ffff6edbb97 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#30 0x00007ffff78422bf in gtk_main () at ../gtk/gtk/gtkmain.c:1329
        loop = 0x55555cb2ef70
#31 0x0000555555ccd245 in main (argc=1, argv=0x7fffffffdcd8) at /home///RawTherapee/rtgui/main.cc:541
        m = <incomplete type>
        rtWindow = std::unique_ptr<RTWindow> = {get() = 0x55555724fa00}
        fatalError = {static npos = 18446744073709551615, string_ = ""}
        ret = 0
@Lawrence37
Copy link
Collaborator

It crashes here:

std::cerr << "DCP '" << filename << "' is missing 'ColorMatrix1'. Skipped." << std::endl;

It doesn't like streaming the Glib::ustring. Unrelated, but this message ideally should only be printed if verbose mode is enabled.

@Lawrence37 Lawrence37 added the type: bug Something is not doing what it's supposed to be doing label Apr 12, 2024
@Lawrence37 Lawrence37 added this to the v5.11 milestone Apr 12, 2024
@Lawrence37 Lawrence37 added the priority: high Should be fixed with higher urgency label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high Should be fixed with higher urgency type: bug Something is not doing what it's supposed to be doing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants