RawTherapee crashes when opening specific JPEG

Created on 1 Oct 2020  路  10Comments  路  Source: Beep6581/RawTherapee

Hello.
RawTgerapee version: 5.8
Windows 10 Pro 10.0.18362 build 18362.
When I opening jpg file (in attachment) in Editor, rawtherapee application crashes.
In Windows Events I see:

Name of the failed app: rawtherapee.exe, version: 0.0.0.0, timestamp: 0x5e3b4a80
Name of the failed module: msvcrt.dll, version: 7.0.18362.1, timestamp: 0xf5bdefd7
Exception code: 0xc0000005
Error offset: 0x000000000005d501
Failed process ID: 0x804
Launch time of the failed application: 0x01d697d44c18ad94
Path of the failed app: C:\Program Files\RawTherapee\5.8\rawtherapee.exe
Path of the failed module: C:\WINDOWS\System32\msvcrt.dll
Report ID: e49f0a0b-4657-4001-aad1-6096b11d5175

Steps:
1)Open Rawtherapee
2)In file browser mode select my jpg image
3)Right mouse click on the image and select Open (or select and press Enter) -> app crashes

This jpg image correct opened in other programs (photoshop, paint and so on)

006

bug

All 10 comments

I can confirm your crash

@heckflosse Could you take a look?

Here's a debug log

(...)

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007fff23e2d2f1 in strlen () from C:\WINDOWS\System32\msvcrt.dll
(gdb)   Id   Target Id                         Frame 
* 1    Thread 14008.0x46d8               0x00007fff23e2d2f1 in strlen () from C:\WINDOWS\System32\msvcrt.dll
  2    Thread 14008.0x3e20               0x00007fff2530f814 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\WINDOWS\SYSTEM32\ntdll.dll
  3    Thread 14008.0x46c4               0x00007fff2530f814 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\WINDOWS\SYSTEM32\ntdll.dll
  4    Thread 14008.0x8ac                0x00007fff2530f814 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\WINDOWS\SYSTEM32\ntdll.dll
  5    Thread 14008.0x3da8               0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll
  6    Thread 14008.0x4158               0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll
  7    Thread 14008.0x3f6c               0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll
  8    Thread 14008.0x47d8               0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll
  9    Thread 14008.0x2f14               0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll
  10   Thread 14008.0xcc8                0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll
  11   Thread 14008.0x1fb8               0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll
  12   Thread 14008.0x42ec               0x00007fff2530f814 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\WINDOWS\SYSTEM32\ntdll.dll
  13   Thread 14008.0x184                0x00007fff2530f814 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\WINDOWS\SYSTEM32\ntdll.dll
  14   Thread 14008.0x30a8               0x00007fff2324a104 in win32u!NtUserMsgWaitForMultipleObjectsEx () from C:\WINDOWS\System32\win32u.dll
  15   Thread 14008.0x1060               0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll
  16   Thread 14008.0x4148               0x00007fff23241104 in win32u!NtUserGetMessage () from C:\WINDOWS\System32\win32u.dll
  19   Thread 14008.0x4b4 "pool-spawner" 0x00007fff2530c914 in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\SYSTEM32\ntdll.dll

(...)

Thread 1 (Thread 14008.0x46d8):
#0  0x00007fff23e2d2f1 in strlen () from C:\WINDOWS\System32\msvcrt.dll
No symbol table info available.
#1  0x0000000064a31fbd in ?? () from C:\msys64\mingw64\bin\libglib-2.0-0.dll
No symbol table info available.
#2  0x00000000664e2c0e in libglibmm-2.4-1!_ZNK4Glib7ustring20casefold_collate_keyB5cxx11Ev () from C:\msys64\mingw64\bin\libglibmm-2.4-1.dll
No symbol table info available.
#3  0x00000001404b27a8 in rtengine::DCPStore::getStdProfile (this=0x140efb320 <rtengine::DCPStore::getInstance()::instance>, requested_cam_short_name=...) at C:/msys64/home/Roel/rtdev/rtengine/dcp.cc:1895
        iter = Python Exception <class 'OverflowError'> int too big to convert: 
{first = , second = {static npos = 18446744073709551615, string_ = <error: Cannot access memory at address 0xa9813d834820ec83>}}
#4  0x000000014019d75f in ICMPanel::updateDCP (this=0x15225f70, dcpIlluminant=0, dcp_name=...) at C:/msys64/home/Roel/rtdev/rtgui/icmpanel.cc:398
        dcpillconn_ = {connection = 0x15226108, wasBlocked = true}
        dcp = 0x0
#5  0x000000014019e8d5 in ICMPanel::read (this=0x15225f70, pp=0x2a49b870, pedited=0x0) at C:/msys64/home/Roel/rtdev/rtgui/icmpanel.cc:514
        obpcconn_ = {connection = 0x15226078, wasBlocked = false}
        ipc_ = {connection = 0x15226190, wasBlocked = false}
        tcurveconn_ = {connection = 0x15226038, wasBlocked = false}
        ltableconn_ = {connection = 0x15226048, wasBlocked = false}
        beoconn_ = {connection = 0x15226058, wasBlocked = false}
        hsmconn_ = {connection = 0x15226068, wasBlocked = false}
        wprofnamesconn_ = {connection = 0x15226138, wasBlocked = false}
        oprofnamesconn_ = {connection = 0x15226158, wasBlocked = false}
        orendintentconn_ = {connection = 0x15226168, wasBlocked = false}
        dcpillconn_ = {connection = 0x15226108, wasBlocked = false}
#6  0x000000014041e9fd in ToolPanelCoordinator::profileChange (this=0x1103b0c0, nparams=0x225d5230, event=..., descr=..., paramsEdited=0x0, fromLastSave=true) at C:/msys64/home/Roel/rtdev/rtgui/toolpanelcoord.cc:630
        toolPanel = 0x15225fa0
        __for_range = std::vector of length 57, capacity 64 = {0x12656e60, 0x110500c0, 0x12042ee0, 0x14e21a00, 0x14e9e0a0, 0x1120a400, 0x11444298, 0x114ebc30, 0x1151eae0, 0x115531c0, 0x15d94b78, 0x15e25bb0, 0x16130330, 0x15e7fe50, 0x116d9c28, 0xe713f18, 0x113f8990, 0x16104720, 0x1272e3c8, 0x14cf0080, 0x12730ee0, 0x1157fd60, 0x121000e0, 0x1125b520, 0x112ca180, 0x11276600, 0x15bc2a18, 0x15e9a900, 0x1546e028, 0x12b17068, 0x151be150, 0x150d8790, 0x1511ed48, 0xe75cf28, 0x12036da0, 0x14d29240, 0x119d7e58, 0x1201ab90, 0x14dfee90, 0x126e38e0, 0x15225fa0, 0x15ebfac8, 0x15ec4288, 0x160a6328, 0x15fc5250, 0x16045618, 0x15ec20f8, 0x15f82958, 0x160d9c00, 0x160831d0, 0x1608d798, 0x15fee4d0, 0x15ffbb98, 0x16014f50, 0x161a1b40, 0x1103c3a8, 0x15251678}
        __for_begin = 0x15225fa0
        __for_end = 0xbaadf00dbaadf00d
        fw = 2480
        fh = 3514
        tr = 0
        params = 0x2a49b870
        mergedParams = 0x2df95eb0
        filterRawRefresh = false
        func = {__this = 0x5fe590}
#7  0x00000001403aeafa in ProfilePanel::initProfile (this=0x1625a240, profileFullPath=..., lastSaved=0x2a0e0b00) at C:/msys64/home/Roel/rtdev/rtgui/profilepanel.cc:854
        pse = 0x51c5c80
        defprofile = 0x34a40e0
        ccPrevState = false
        lasSavedEntry = {<Gtk::TreeIterBase> = {gobject_ = {stamp = 1450966510, user_data = 0x162387b0, user_data2 = 0x0, user_data3 = 0x0}}, model_ = 0x227d77a8, is_end_ = false}
#8  0x00000001400f3ba9 in EditorPanel::open (this=0x1103ab00, tmb=0x2ae1c3a0, isrc=0x160d9ce0) at C:/msys64/home/Roel/rtdev/rtgui/editorpanel.cc:1036
        is = 0x160d9ce0
        ldprof = 0x2a0e0b00
        defProf = {static npos = 18446744073709551615, string_ = "Neutral"}
#9  0x000000014014cb4a in FilePanel::imageLoaded (this=0x6355b50, thm=0x2ae1c3a0, pc=0x23099850) at C:/msys64/home/Roel/rtdev/rtgui/filepanel.cc:329
        pl = 0x2a2ebae0
#10 0x0000000140a8eb57 in sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*>::operator() (this=0x224915e0, _A_a1=@0x22491600: 0x2ae1c3a0, _A_a2=@0x22491608: 0x23099850) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/functors/mem_fun.h:2143
No locals.
#11 0x0000000140a8739f in sigc::adaptor_functor<sigc::bound_mem_functor2<bool, FilePanel, Thumbnail*, ProgressConnector<rtengine::InitialImage*>*> >::operator()<Thumbnail*&, ProgressConnector<rtengine::InitialImage*>*&> (this=0x224915d8, _A_arg1=@0x22491600: 0x2ae1c3a0, _A_arg2=@0x22491608: 0x23099850) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:108
No locals.
#12 0x0000000140997407 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=0x224915d0) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/adaptors/bind.h:1340
No locals.
#13 0x00000001409ceb74 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=0x224915a0) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/functors/slot.h:136
        typed_rep = 0x224915a0
#14 0x0000000140a8fe71 in sigc::slot0<bool>::operator() (this=0x22541258) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/functors/slot.h:535
No locals.
#15 0x0000000140a87cac in sigc::adaptor_functor<sigc::slot0<bool> >::operator() (this=0x22541250) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:256
No locals.
#16 0x00000001409f28f4 in sigc::internal::slot_call<sigc::slot0<bool>, bool>::call_it (rep=0x22541220) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/functors/slot.h:483
        typed_rep = 0x22541220
#17 0x00000001409d2fc9 in sigc::internal::signal_emit0<bool, sigc::nil>::emit (impl=0x22d586e0) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/signal.h:705
        slots = {slots_ = std::__cxx11::list = {[0] = {<sigc::functor_base> = {<No data fields>}, rep_ = 0x22541220, blocked_ = false}, [1] = {<sigc::functor_base> = {<No data fields>}, rep_ = 0x0, blocked_ = false}}, placeholder = {<sigc::functor_base> = {<No data fields>}, rep_ = 0x0, blocked_ = false}}
        it = {<sigc::functor_base> = {<No data fields>}, rep_ = 0x22541220, blocked_ = false}
        exec = {sig_ = 0x22d586e0}
        r_ = false
#18 0x0000000140a9015c in sigc::signal0<bool, sigc::nil>::emit (this=0x22d61920) at C:/msys64/mingw64/include/sigc++-2.0/sigc++/signal.h:2800
No locals.
#19 0x00000001409717f6 in ProgressConnector<rtengine::InitialImage*>::emitEndSignalUI (data=0x22d61920) at C:/msys64/home/Roel/rtdev/rtgui/progressconnector.h:83
        lopEnd = 0x22d61920
        r = 39256
#20 0x00007ffeb71133c2 in ?? () from C:\msys64\mingw64\bin\libgdk-3-0.dll
No symbol table info available.
#21 0x00000000649f72df in ?? () from C:\msys64\mingw64\bin\libglib-2.0-0.dll
No symbol table info available.
#22 0x00000000649fa4e6 in ?? () from C:\msys64\mingw64\bin\libglib-2.0-0.dll
No symbol table info available.
#23 0x00000000649faa0c in ?? () from C:\msys64\mingw64\bin\libglib-2.0-0.dll
No symbol table info available.
#24 0x00007ffe93a1231d in ?? () from C:\msys64\mingw64\bin\libgtk-3-0.dll
No symbol table info available.
#25 0x0000000063ea6e5e in libgtkmm-3.0-1!_ZN3Gtk4Main3runERNS_6WindowE () from C:\msys64\mingw64\bin\libgtkmm-3.0-1.dll
No symbol table info available.
#26 0x00000001402cc804 in main (argc=1, argv=0x16b2550) at C:/msys64/home/Roel/rtdev/rtgui/main.cc:569
        m = <incomplete type>
        rtWindow = std::unique_ptr<RTWindow> = {get() = 0x8a98810}
        exname = "C:\\msys64\\home\\Roel\\rtdev\\debugbuild\\debug\\rawtherapee.exe", '\000' <repeats 453 times>
        exePath = {static npos = 18446744073709551615, string_ = "C:\\msys64\\home\\Roel\\rtdev\\debugbuild\\debug"}
        exnameU = L"C:\\msys64\\home\\Roel\\rtdev\\debugbuild\\debug\\rawtherapee.exe", '\000' <repeats 453 times>
        consoleOpened = false
        fatalError = {static npos = 18446744073709551615, string_ = ""}
        ret = 0
(gdb) A debugging session is active.

    Inferior 1 [process 14008] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

I will have a look

I confirm the crash. Searching for a fix...

It doesn't crash on Debian AMD64, but I get some nasty warnings about invalid UTF-8. Here's a patch to fix that:

diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc
index cedf08ca0..16b6a4c91 100644
--- a/rtengine/imagedata.cc
+++ b/rtengine/imagedata.cc
@@ -69,6 +69,15 @@ T getFromFrame(
     return {};
 }

+const std::string& validateUft8(const std::string& str, const std::string& on_error = "???")
+{
+    if (Glib::ustring(str).validate()) {
+        return str;
+    }
+
+    return on_error;
+}
+
 }

 FramesMetaData* FramesMetaData::fromFile(const Glib::ustring& fname, std::unique_ptr<RawMetaDataLocation> rml, bool firstFrameOnly)
@@ -122,7 +131,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
     }

     if (tag) {
-        make = tag->valueToString();
+        make = validateUft8(tag->valueToString());

         // Same dcraw treatment
         for (const auto& corp : {
@@ -158,7 +167,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
     tag = newFrameRootDir->findTagUpward("Model");

     if (tag) {
-        model = tag->valueToString();
+        model = validateUft8(tag->valueToString());
     }

     if (!model.empty()) {
@@ -193,14 +202,14 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
     if (model == "Unknown") {
         tag = newFrameRootDir->findTag("UniqueCameraModel");
         if (tag) {
-            model = tag->valueToString();
+            model = validateUft8(tag->valueToString());
         }
     }

     tag = newFrameRootDir->findTagUpward("Orientation");

     if (tag) {
-        orientation = tag->valueToString();
+        orientation = validateUft8(tag->valueToString());
     }

     // Look for Rating metadata in the following order:
@@ -310,7 +319,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
         }

         if (tag) {
-            serial = tag->valueToString();
+            serial = validateUft8(tag->valueToString());
         }

         // guess lens...
@@ -320,7 +329,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*

         if (!make.compare(0, 8, "FUJIFILM")) {
             if (exif->getTag("LensModel")) {
-                lens = exif->getTag("LensModel")->valueToString();
+                lens = validateUft8(exif->getTag("LensModel")->valueToString());
             }
         } else if (!make.compare(0, 4, "SONY")) {
             if (iso_speed == 65535 || iso_speed == 0) {
@@ -347,9 +356,9 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                         const rtexif::Tag* const lens_make = exif->getTag(0xA433);
                         const std::string make =
                             lens_make
-                                ? lens_make->valueToString()
+                                ? validateUft8(lens_make->valueToString())
                                 : std::string();
-                        const std::string model = lens_model->valueToString();
+                        const std::string model = validateUft8(lens_model->valueToString());

                         if (!model.empty()) {
                             lens = make;
@@ -382,7 +391,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                     bool lensOk = false;

                     if (mnote->getTag("LensData")) {
-                        std::string ldata = mnote->getTag("LensData")->valueToString();
+                        std::string ldata = validateUft8(mnote->getTag("LensData")->valueToString());
                         size_t pos;

                         if (ldata.size() > 10 && (pos = ldata.find("Lens = ")) != Glib::ustring::npos) {
@@ -394,10 +403,10 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                                 size_t pos = lens.find("$FL$");        // is there a placeholder for focallength?

                                 if (pos != Glib::ustring::npos) {               // then fill in focallength
-                                    lens = lens.replace(pos, 4, exif->getTag("FocalLength")->valueToString());
+                                    lens = lens.replace(pos, 4, validateUft8(exif->getTag("FocalLength")->valueToString()));

                                     if (mnote->getTag("LensType")) {
-                                        std::string ltype = mnote->getTag("LensType")->valueToString();
+                                        const std::string ltype = validateUft8(mnote->getTag("LensType")->valueToString());

                                         if (ltype.find("MF = Yes") != Glib::ustring::npos) { // check, whether it's a MF lens, should be always
                                             lens = lens.replace(0, 7, "MF");
@@ -416,7 +425,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                     }

                     if (!lensOk && mnote->getTag("Lens")) {
-                        std::string ldata = mnote->getTag("Lens")->valueToString();
+                        const std::string ldata = validateUft8(mnote->getTag("Lens")->valueToString());
                         size_t i = 0, j = 0;
                         double n[4] = {0.0};

@@ -453,7 +462,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*

                         // Look whether it's MF or AF
                         if (mnote->getTag("LensType")) {
-                            std::string ltype = mnote->getTag("LensType")->valueToString();
+                            const std::string ltype = validateUft8(mnote->getTag("LensType")->valueToString());

                             if (ltype.find("MF = Yes") != Glib::ustring::npos) { // check, whether it's a MF lens
                                 lens = lens.replace(0, 7, "MF");    // replace 'Unknwon' with 'MF'
@@ -478,7 +487,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*

                     if (lt) {
                         if (lt->toInt()) {
-                            std::string ldata = lt->valueToString ();
+                            const std::string ldata = validateUft8(lt->valueToString());

                             if (ldata.size() > 1) {
                                 found = true;
@@ -499,7 +508,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                         lt = mnote->findTag("LensID");

                         if (lt) {
-                            std::string ldata = lt->valueToString();
+                            const std::string ldata = validateUft8(lt->valueToString());

                             if (ldata.size() > 1) {
                                 lens = ldata;
@@ -521,7 +530,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                     }

                     if (mnote->getTag("LensType")) {
-                        lens = mnote->getTag ("LensType")->valueToString();
+                        lens = validateUft8(mnote->getTag("LensType")->valueToString());
                         // If MakeNotes are vague, fall back to Exif LensMake and LensModel if set
                         // https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensType
                         if (lens == "M-42 or No Lens" || lens == "K or M Lens" || lens == "A Series Lens" || lens == "Sigma") {
@@ -548,7 +557,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                     }
                 } else if (!make.compare (0, 4, "SONY") || !make.compare (0, 6, "KONICA")) {
                     if (mnote->getTag ("LensID")) {
-                        lens = mnote->getTag ("LensID")->valueToString ();
+                        lens = validateUft8(mnote->getTag("LensID")->valueToString());
                         if (lens == "Unknown") {
                             lens_from_make_and_model();
                         }
@@ -558,7 +567,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                         rtexif::TagDirectory* eq = mnote->getTag("Equipment")->getDirectory();

                         if (eq->getTag("LensType")) {
-                            lens = eq->getTag("LensType")->valueToString();
+                            lens = validateUft8(eq->getTag("LensType")->valueToString());
                         }
                     }
                     if (lens == "Unknown") {
@@ -566,7 +575,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                     }
                 } else if (!make.compare (0, 9, "Panasonic")) {
                     if (mnote->getTag ("LensType")) {
-                        std::string panalens = mnote->getTag("LensType")->valueToString();
+                        const std::string panalens = validateUft8(mnote->getTag("LensType")->valueToString());

                         if (panalens.find("LUMIX") != Glib::ustring::npos) {
                             lens = "Panasonic " + panalens;
@@ -576,9 +585,9 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
                     }
                 }
             } else if (exif->getTag("DNGLensInfo")) {
-                lens = exif->getTag("DNGLensInfo")->valueToString();
+                lens = validateUft8(exif->getTag("DNGLensInfo")->valueToString());
             } else if (!lens_from_make_and_model() && exif->getTag ("LensInfo")) {
-                lens = exif->getTag("LensInfo")->valueToString();
+                lens = validateUft8(exif->getTag("LensInfo")->valueToString());
             }
         }
     }
diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc
index 341d0f303..3f6bbacb5 100644
--- a/rtgui/exifpanel.cc
+++ b/rtgui/exifpanel.cc
@@ -209,6 +209,9 @@ void ExifPanel::setImageData (const FramesMetaData* id)

 Gtk::TreeModel::Children ExifPanel::addTag (const Gtk::TreeModel::Children& root, Glib::ustring field, Glib::ustring value, rtexif::ActionCode action, bool editable)
 {
+    if (!value.validate()) {
+        value = "???";
+    }

     Gtk::TreeModel::Row row = * (exifTreeModel->append (root));
     row[exifColumns.action]   = action;

HTH,
Fl枚ssie

It's the camera name, which is corrupted

grafik

Fix confirmed.

Hi everybody. To use RawTherapee with a fixed problem, I need to download the latest sources, apply the patch, and compile? Or is there a compiled version somewhere?

To use RawTherapee with a fixed problem, I need to download the latest sources, apply the patch, and compile?

Yes, or wait until there is a nightly build with this patch, which usually is the case one or two days after the issue is closed.

I'll push to dev tonight...

Was this page helpful?
0 / 5 - 0 ratings