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

[32-bit ppc/i386] Advice needed to fix GUI binary, which crashes on launch with KERN_INVALID_ADDRESS at 0x00000000fffffffc (CLI binary works) #7052

Open
barracuda156 opened this issue Apr 22, 2024 · 40 comments

Comments

@barracuda156
Copy link

Could someone help me a bit? I got 5.10 built on macOS PowerPC and CLI converter seems working (I was able to throw a PEF at it and get a jpeg), but GUI crashes on launch:

Process:         rawtherapee [52993]
Path:            /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/destroot/opt/local/bin/rawtherapee
Identifier:      rawtherapee
Version:         ??? (???)
Code Type:       PPC (Native)
Parent Process:  zsh [18477]

Date/Time:       2024-04-22 08:44:22.756 +0800
OS Version:      Mac OS X 10.6 (10A190)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000fffffffc
Crashed Thread:  0

Thread 0 Crashed:
0   libstdc++.6.dylib             	0x044c9aa8 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_is_leaked() const + 0
1   libglibmm-2.4.1.dylib         	0x02766c88 __ZNSsC4ERKSs.isra.0 + 28
2   rawtherapee                   	0x00017584 rtengine::procparams::ColorManagementParams::ColorManagementParams() + 356
3   rawtherapee                   	0x00b1f5c4 _GLOBAL__sub_I_histogrampanel.cc + 84 (histogrampanel.cc:42)
4   dyld                          	0x8fe15d5c ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 388
5   dyld                          	0x8fe0f708 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 368
6   dyld                          	0x8fe0f800 ImageLoader::runInitializers(ImageLoader::LinkContext const&) + 60
7   dyld                          	0x8fe02704 dyld::initializeMainExecutable() + 132
8   dyld                          	0x8fe0868c dyld::_main(mach_header const*, unsigned long, int, char const**, char const**, char const**) + 3428
9   dyld                          	0x8fe017c8 dyldbootstrap::start(mach_header const*, int, char const**, long) + 952
10  dyld                          	0x8fe01060 _dyld_start + 56

Thread 0 crashed with PPC Thread State 32:
  srr0: 0x044c9aa8  srr1: 0x0200f030   dar: 0xfffffffc dsisr: 0x40000000
    r0: 0x02766c8c    r1: 0xbfffd170    r2: 0x0000018b    r3: 0xfffffff4
    r4: 0x00000000    r5: 0x00b17438    r6: 0x00b17438    r7: 0x00000001
    r8: 0x00be7438    r9: 0x00b17438   r10: 0xbfe6b0dd   r11: 0x42000408
   r12: 0x044c9aa8   r13: 0x8fe37930   r14: 0x8fe336bc   r15: 0x8fe37930
   r16: 0x0001dca0   r17: 0x8fe34d60   r18: 0x8fe2b954   r19: 0x00000037
   r20: 0x8fe36a24   r21: 0x00000002   r22: 0x0000158c   r23: 0x000012f0
   r24: 0x8fe33ca0   r25: 0x000000b9   r26: 0x00be501c   r27: 0x8fe33c48
   r28: 0x0000136c   r29: 0x00da4400   r30: 0xfffffff4   r31: 0x00017438
    cr: 0x42000402   xer: 0x00000000    lr: 0x02766c8c   ctr: 0x044c9aa8
vrsave: 0x00000000

Binary Images:
    0x1000 -   0xbe4feb +rawtherapee ??? (???) <3f62f5f4f11852828822223dbb404ce5> /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/destroot/opt/local/bin/rawtherapee
 0x1172000 -  0x117afff +libcanberra-gtk3.0.dylib ??? (???) <43e855b5d0d7746cd0b6b16dcd8c19f2> /opt/local/lib/libcanberra-gtk3.0.dylib
 0x117d000 -  0x127bffc +libX11.6.dylib ??? (???) <8208a1cefe7d0ac2c54309a6017211ae> /opt/local/lib/libX11.6.dylib
 0x1295000 -  0x12a0fff +libcanberra.0.dylib ??? (???) <7aaa7de13fd96f5438193e535315ae5c> /opt/local/lib/libcanberra.0.dylib
 0x12a5000 -  0x1930ffb +libgtk-3.0.dylib ??? (???) <13d299bfe60dc3e83e18fce0a7f42258> /opt/local/lib/libgtk-3.0.dylib
 0x1bd3000 -  0x1c5effb +libgdk-3.0.dylib ??? (???) <a75d346dd63eadad11e487074fbcd6e3> /opt/local/lib/libgdk-3.0.dylib
 0x1ca3000 -  0x1cafffb +libpangocairo-1.0.0.dylib ??? (???) <2a305d48622594d12c23eb2413e9daaf> /opt/local/lib/libpangocairo-1.0.0.dylib
 0x1cb8000 -  0x1d01ffb +libpango-1.0.0.dylib ??? (???) <a25f404245ce49548d1cb6c2f895e77c> /opt/local/lib/libpango-1.0.0.dylib
 0x1d2c000 -  0x1de9ffb +libharfbuzz.0.dylib ??? (???) <8d27014f96f8b21c1addc1764b91e46a> /opt/local/lib/libharfbuzz.0.dylib
 0x1e26000 -  0x1e43fff +libatk-1.0.0.dylib ??? (???) <8b77ff2e9c46138fce98cc93803dd711> /opt/local/lib/libatk-1.0.0.dylib
 0x1e5b000 -  0x1e63ffc +libcairo-gobject.2.dylib ??? (???) <538c11107798851db239410f56e654a7> /opt/local/lib/libcairo-gobject.2.dylib
 0x1e67000 -  0x1f4cfff +libcairo.2.dylib ??? (???) <3864121d34b80c3bf592f1b1eb94c32e> /opt/local/lib/libcairo.2.dylib
 0x1f78000 -  0x1f9afff +libgdk_pixbuf-2.0.0.dylib ??? (???) <f8a17793b54aa4668f2a45f18bbb61d3> /opt/local/lib/libgdk_pixbuf-2.0.0.dylib
 0x1fad000 -  0x210effb +libgio-2.0.0.dylib ??? (???) <58338fb7c3961d60ba1d92c6d548e01f> /opt/local/lib/libgio-2.0.0.dylib
 0x2215000 -  0x2251fff +libgobject-2.0.0.dylib ??? (???) <c4a3bd56376b1d29c8ca07b996688a97> /opt/local/lib/libgobject-2.0.0.dylib
 0x227d000 -  0x2375ff7 +libglib-2.0.0.dylib ??? (???) <15c2b47be68f26ada6ffddadb0b454bb> /opt/local/lib/libglib-2.0.0.dylib
 0x23d6000 -  0x23effff +libintl.8.dylib ??? (???) <e614775697f80c705e9a5000be1a088a> /opt/local/lib/libintl.8.dylib
 0x23f5000 -  0x2420fff +libexpat.1.dylib ??? (???) <0281bd0cefe7d466bcad7a1747954d9a> /opt/local/lib/libexpat.1.dylib
 0x2427000 -  0x2576ff7 +libfftw3f.3.dylib ??? (???) <3487b92750db790001e1d1d089667d3c> /opt/local/lib/libfftw3f.3.dylib
 0x2594000 -  0x2598fff +libfftw3f_omp.3.dylib ??? (???) <ee9392164a8154172ee329846d4ee283> /opt/local/lib/libfftw3f_omp.3.dylib
 0x259c000 -  0x268afff +libgiomm-2.4.1.dylib ??? (???) <9ee9daca88a9d22bc2a7d85d979fd961> /opt/local/lib/libgiomm-2.4.1.dylib
 0x2742000 -  0x2789fff +libglibmm-2.4.1.dylib ??? (???) <09e6228784691a3e4fab32a4cb058453> /opt/local/lib/libglibmm-2.4.1.dylib
 0x27bc000 -  0x27bffff +libsigc-2.0.0.dylib ??? (???) <ef2816a369325b89e2c1d29ba4546eeb> /opt/local/lib/libsigc-2.0.0.dylib
 0x27c6000 -  0x27c7ffd +libgthread-2.0.0.dylib ??? (???) <7838c918a136d87514d931c916122796> /opt/local/lib/libgthread-2.0.0.dylib
 0x27ca000 -  0x29d5fff +libgtkmm-3.0.1.dylib ??? (???) <604ffced2968950b38427c49896c9290> /opt/local/lib/libgtkmm-3.0.1.dylib
 0x2d90000 -  0x2dbdfff +libatkmm-1.6.1.dylib ??? (???) <1fad2a93f12900f5207883738b126395> /opt/local/lib/libatkmm-1.6.1.dylib
 0x2dda000 -  0x2e0afff +libgdkmm-3.0.1.dylib ??? (???) <1a894ff936865e04e7be9233a2eae779> /opt/local/lib/libgdkmm-3.0.1.dylib
 0x2e51000 -  0x2e69fff +libpangomm-1.4.1.dylib ??? (???) <a3c23a496a5e479c207200bc7861e932> /opt/local/lib/libpangomm-1.4.1.dylib
 0x2e7e000 -  0x2e95fff +libcairomm-1.0.1.dylib ??? (???) <4d80c7304fae3196daf11d38d1e8409b> /opt/local/lib/libcairomm-1.0.1.dylib
 0x2ea7000 -  0x2eadffe +libiptcdata.0.dylib ??? (???) <de0ff93e165376050891f949f47c0814> /opt/local/lib/libiptcdata.0.dylib
 0x2eb3000 -  0x2f25fff +libjpeg.8.dylib ??? (???) <db769f8503fbe0a86ddd4f496558f6ff> /opt/local/lib/libjpeg.8.dylib
 0x2f2f000 -  0x2f75fff +liblcms2.2.dylib ??? (???) <a91197d01783f2dba6b465b1227eddc4> /opt/local/lib/liblcms2.2.dylib
 0x2f85000 -  0x2fabffb +libpng16.16.dylib ??? (???) <a2f7c02d2c79ca1ce7e0d7bc13c14d1c> /opt/local/lib/libpng16.16.dylib
 0x2fb2000 -  0x2fc5ffc +libz.1.dylib ??? (???) <b137603b6672e715558e6403b48f02ad> /opt/local/lib/libz.1.dylib
 0x2fc9000 -  0x3037ffb +libtiff.6.dylib ??? (???) <1b19caa843c9cdbd24b3291bc7ecc2e0> /opt/local/lib/libtiff.6.dylib
 0x3046000 -  0x305fff3 +liblensfun.1.dylib ??? (???) <476f9310b51c8c4fd808fbd2f25c1b98> /opt/local/lib/liblensfun.1.dylib
 0x3067000 -  0x3096ffa +librsvg-2.2.dylib ??? (???) <cea7924fe37bcb74c3524e4ccb153aea> /opt/local/lib/librsvg-2.2.dylib
 0x30a1000 -  0x3273ffb +libexiv2.27.dylib ??? (???) <db4e74618c1f91ae255641d911f93397> /opt/local/lib/libexiv2.27.dylib
 0x3353000 -  0x337dffb +libgomp.1.dylib ??? (???) <10cf78145ebd4566e69e263bc405d6c0> /opt/local/lib/libgcc/libgomp.1.dylib
 0x3384000 -  0x34e7ff7 +libstdc++.6.dylib ??? (???) <193a69f840df6803b931da7a8d644c57> /opt/local/lib/libgcc/libstdc++.6.dylib
 0x3565000 -  0x37bdfff  com.apple.Foundation 6.6 (711.1) <42ee053ddba592040925af9eb9542462> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
 0x3907000 -  0x390cff7 +libgcc_s.1.1.dylib ??? (???) <7f950a0be1f0ed57669bf0564e2534be> /opt/local/lib/libgcc/libgcc_s.1.1.dylib
 0x390f000 -  0x391afff  libgcc_s.1.dylib ??? (???) <1eb48ae6b07dcb096bda0433409722c1> /usr/lib/libgcc_s.1.dylib
 0x391f000 -  0x3ae9fe7  libSystem.B.dylib ??? (???) <420b38fe0fa0944f6f5bc4840bf29a4e> /usr/lib/libSystem.B.dylib
 0x3b71000 -  0x3cc9ff7  com.apple.CoreFoundation 6.6 (511.1) <b82d52070a5949f92c5001e06d67044b> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 0x3dd3000 -  0x3dd9fff +libvorbisfile.3.dylib ??? (???) <6dc1d59c326e991ca41ef8e9a299f7de> /opt/local/lib/libvorbisfile.3.dylib
 0x3ddd000 -  0x3de3ffd +libltdl.7.dylib ??? (???) <f4feb81f25254641c2ddf1138d4c85ec> /opt/local/lib/libltdl.7.dylib
 0x3de7000 -  0x3de8ff8  com.apple.ApplicationServices 36 (36) <8d5530987cce48c3375a350c7f134b9c> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
 0x3dfe000 -  0x3e01ffe +libgmodule-2.0.0.dylib ??? (???) <81f264a23f6e5a8f0068e45deb1b0bd3> /opt/local/lib/libgmodule-2.0.0.dylib
 0x3e05000 -  0x3e16fff +libpangoft2-1.0.0.dylib ??? (???) <5f0c242fc78e7ca3a8d56c4b20b20af4> /opt/local/lib/libpangoft2-1.0.0.dylib
 0x3e26000 -  0x3e5ffff +libfontconfig.1.dylib ??? (???) <11e37ced4af26fd3aafb0a4d1c4cfbbc> /opt/local/lib/libfontconfig.1.dylib
 0x3e69000 -  0x3e83fff +libfribidi.0.dylib ??? (???) <e8e72c4a679647cc021c37d950f52d89> /opt/local/lib/libfribidi.0.dylib
 0x3e86000 -  0x3f1cfff +libepoxy.0.dylib ??? (???) <ae79219b0112f886c5901584e8e060bd> /opt/local/lib/libepoxy.0.dylib
 0x401a000 -  0x4027fff +libXi.6.dylib ??? (???) <46f489e7551553ad6c06b9614d1cc89b> /opt/local/lib/libXi.6.dylib
 0x402b000 -  0x404efff +libatk-bridge-2.0.0.dylib ??? (???) <99a4d17266d6984303182af173bdbcc5> /opt/local/lib/libatk-bridge-2.0.0.dylib
 0x4066000 -  0x406afff +libXfixes.3.dylib ??? (???) <506fbea86a7fb28e5d287c52ba21a95a> /opt/local/lib/libXfixes.3.dylib
 0x406d000 -  0x407afff +libXext.6.dylib ??? (???) <61bd4715fd902b83b34a7461159cabad> /opt/local/lib/libXext.6.dylib
 0x407f000 -  0x4086fff +libXcursor.1.dylib ??? (???) <9d5686a8e320e3376a270371b7f4ec35> /opt/local/lib/libXcursor.1.dylib
 0x408a000 -  0x408cffe +libXdamage.1.dylib ??? (???) <9925bbf068d405dfc9359a9d57b225da> /opt/local/lib/libXdamage.1.dylib
 0x408f000 -  0x4091ffd +libXcomposite.1.dylib ??? (???) <fbadbb5f96a07858725e4a625aa1dcd4> /opt/local/lib/libXcomposite.1.dylib
 0x4094000 -  0x409cfff +libXrandr.2.dylib ??? (???) <d11127c3ab6a16d12f65d2d1cef0d203> /opt/local/lib/libXrandr.2.dylib
 0x409f000 -  0x40a1ffc +libXinerama.1.dylib ??? (???) <ac1ee030eb34d1a5a06e982dc516fbfe> /opt/local/lib/libXinerama.1.dylib
 0x40a4000 -  0x41a9fff +libiconv.2.dylib ??? (???) <71dfab8f77eb71baebdb38550a0ed408> /opt/local/lib/libiconv.2.dylib
 0x41b8000 -  0x41b8ffa  com.apple.CoreServices 41 (41) <97bf3903384c706ba0f7d19577f0ef8c> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
 0x41ce000 -  0x41d3ff6  libmathCommon.A.dylib ??? (???) <e166c8e59a80a82b4504b1dd43d1f50a> /usr/lib/system/libmathCommon.A.dylib
 0x41d7000 -  0x420aff1  libauto.dylib ??? (???) <2848423526fb9c0f381c6ceacc4f2c27> /usr/lib/libauto.dylib
 0x4216000 -  0x439ffff  libicucore.A.dylib ??? (???) <28f339176d9e26b663f19c1cad91784e> /usr/lib/libicucore.A.dylib
 0x43ef000 -  0x4470fe7  libobjc.A.dylib ??? (???) <bb09ce82013fa9c4a4010c58fe6c1e10> /usr/lib/libobjc.A.dylib
 0x4482000 -  0x4490fff  libz.1.dylib ??? (???) <c296d00fd65aa7271f3d5592c25c0f96> /usr/lib/libz.1.dylib
 0x4495000 -  0x44ffffb  libstdc++.6.dylib ??? (???) <5824de0c43054a01c556e9ef288f33c7> /usr/lib/libstdc++.6.dylib
 0x4549000 -  0x486fff7  com.apple.CoreServices.CarbonCore 818 (818) <3e631022aef7f9d15373e1f56e74ff00> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
 0x48f8000 -  0x49b8ffb  com.apple.CFNetwork 417.1 (417.1) <911e0fa87591b77e8bb8ec4759941216> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
 0x4a20000 -  0x4a60fff  com.apple.Metadata 10.6.0 (429.1) <d8b50a8ca605800f8f36caf448daed42> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
 0x4a79000 -  0x4b51fff  com.apple.CoreServices.OSServices 310 (310) <633ea4081155a516c80bf948f004d235> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
 0x4bbc000 -  0x4c39ffb  com.apple.SearchKit 1.3.0 (1.3.0) <4c7ffa79c1cd48d28eb165768fbfc2f4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
 0x4c78000 -  0x4cb0fff  com.apple.AE 464 (464) <492b7cdb81e64fca5af300b0c231ebec> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
 0x4cc8000 -  0x4d5fff7  com.apple.LaunchServices 318.1 (318.1) <5ee43f629f636d1863e73dc312c736c2> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
 0x4da5000 -  0x4dc8fff  com.apple.DictionaryServices 1.0.0 (1.0.0) <f2f1f85469f3036ec9890bfa888edbe2> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
 0x4dde000 -  0x4e34ff3  com.apple.framework.IOKit 1.5.1 (???) <21f9b751b7578a33306804af2c6ded8d> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
 0x4e4d000 -  0x4e56fff  com.apple.DiskArbitration 2.2.1 (2.2.1) <daa422fc5a934366c8f0a12204b46cb1> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
 0x4e5f000 -  0x4e71fff  libbsm.0.dylib ??? (???) <c43c47af4211639e8828d3e8ff93a019> /usr/lib/libbsm.0.dylib
 0x4e77000 -  0x4e84ffe  NetFS ??? (???) <5125b2c825637b243afa1ea942ba8220> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
 0x4e8b000 -  0x4e94ffc  libkxld.dylib ??? (???) <725cd6e644549962b0110493f4bb7c08> /usr/lib/system/libkxld.dylib
 0x4e98000 -  0x50c6ff7  com.apple.security 6.0 (34772) <df4f0710dfee6e04e7fdba557064977b> /System/Library/Frameworks/Security.framework/Versions/A/Security
 0x51dd000 -  0x528eff7  libsqlite3.0.dylib ??? (???) <cc6135a5433e43988bf825e149e47483> /usr/lib/libsqlite3.0.dylib
 0x529a000 -  0x52d5fff  com.apple.SystemConfiguration 1.10 (1.10) <2daf422a1a7ca90ba32720000e56b3aa> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
 0x52f1000 -  0x531dfff  libxslt.1.dylib ??? (???) <da4552da93bf856897f6b399bb10806d> /usr/lib/libxslt.1.dylib
 0x5326000 -  0x5441fff  libxml2.2.dylib ??? (???) <2bdb2ca8d4aabba550ba9f2111ebf46a> /usr/lib/libxml2.2.dylib
 0x5464000 -  0x546afff +libMacportsLegacySupport.dylib ??? (???) <95200f933bfbcb561128ab18dd2db51b> /opt/local/lib/libMacportsLegacySupport.dylib
 0x546e000 -  0x54f1ffe +libpcre2-8.0.dylib ??? (???) <d3c6858763646927f568cbe4e06e99f4> /opt/local/lib/libpcre2-8.0.dylib
 0x54f6000 -  0x54fcff7 +libffi.8.dylib ??? (???) <add3c4427db4e056068e049a433ab42b> /opt/local/lib/libffi.8.dylib
 0x54ff000 -  0x551ffff  libresolv.9.dylib ??? (???) <2b57f734cfd1eb7ebf2eb9a4bbbc5a23> /usr/lib/libresolv.9.dylib
 0x5528000 -  0x5584ff3 +libpixman-1.0.dylib ??? (???) <fdcc607fe277d8904f0bcce37d2fb323> /opt/local/lib/libpixman-1.0.dylib
 0x55a9000 -  0x563fffc +libfreetype.6.dylib ??? (???) <fb0d4dd6d5834105c5513e3752ba29c9> /opt/local/lib/libfreetype.6.dylib
 0x5657000 -  0x5657fff +libX11-xcb.1.dylib ??? (???) <a3d49e554a3b1696f7d393af4b8192bb> /opt/local/lib/libX11-xcb.1.dylib
 0x565a000 -  0x566fffe +libxcb.1.dylib ??? (???) <c9cfffe71e61cc106c75aaddb18a6327> /opt/local/lib/libxcb.1.dylib
 0x567b000 -  0x5681ffe +libxcb-render.0.dylib ??? (???) <98f2e99de82b98e43ef3d9854ce55825> /opt/local/lib/libxcb-render.0.dylib
 0x5687000 -  0x568efff +libXrender.1.dylib ??? (???) <b1ebb3eedaa4f8f3dc17e4193460555d> /opt/local/lib/libXrender.1.dylib
 0x5691000 -  0x569fff5 +libbz2.1.0.dylib ??? (???) <561eabf373907c3899487650867150dc> /opt/local/lib/libbz2.1.0.dylib
 0x56a3000 -  0x56adffd +libbrotlidec.1.dylib ??? (???) <3b0762d3ef2c19b08f78da5664895226> /opt/local/lib/libbrotlidec.1.dylib
 0x56b0000 -  0x56d0ffc +libbrotlicommon.1.dylib ??? (???) <813aa6ca2e727bab74f2ca8ac1bad64d> /opt/local/lib/libbrotlicommon.1.dylib
 0x56d3000 -  0x56d4ffc +libXau.6.dylib ??? (???) <e68c7e2d4490bcf51a71d84e19814e24> /opt/local/lib/libXau.6.dylib
 0x56d7000 -  0x56dafff +libXdmcp.6.dylib ??? (???) <6a871e87ffc66f5dabe23e43c35d6325> /opt/local/lib/libXdmcp.6.dylib
 0x56dd000 -  0x5778fff  com.apple.ApplicationServices.ATS 4.0 (???) <4210dabffcc1cafdf05b6a22996a4eb6> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
 0x579f000 -  0x5873ff7  com.apple.ColorSync 4.6.0 (4.6.0) <c4746bb1c5e21b1ff1ee9e23150dae91> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
 0x58b2000 -  0x5f19ff7  com.apple.CoreGraphics 1.507.2 (???) <dc83caa82d24f470958a99ca6e198a2f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
 0x5fe0000 -  0x6043fff  com.apple.CoreText 3.0.0 (???) <367767da30e7fda6ac4302fc54116f29> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
 0x607c000 -  0x60d5fff  com.apple.HIServices 1.7.0 (???) <4e20ca5a0f021908e274610eab85af23> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
 0x6101000 -  0x62acffb  com.apple.ImageIO.framework 3.0.0 (3.0.0) <840a13dc20c1c1a1ed50edef6d706239> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
 0x6319000 -  0x632cfff  com.apple.LangAnalysis 1.6.5 (1.6.5) <e7713c1bde76548000a0a0e7b9f27324> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
 0x6339000 -  0x63e9ffb  com.apple.QD 3.18 (???) <f6b3db0d330e0268a24dc5e3fdb820a5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
 0x6418000 -  0x642bffb  com.apple.speech.synthesis.framework 3.10.1 (3.10.1) <67907b42aecf8e5cef273ce5085f19b5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
 0x643a000 -  0x6471fff  libFontParser.dylib ??? (???) <e83c633b4e6ac7de6acfa5edbe925f7a> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
 0x649f000 -  0x6582ff3  libcrypto.0.9.8.dylib ??? (???) <90068ab1dc24a941bdd01726024c515d> /usr/lib/libcrypto.0.9.8.dylib
 0x65d3000 -  0x65d3fff  com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) <e8c929e9ed651c210e5238b66b947e6e> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
 0x65d7000 -  0x65f6fff  com.apple.vecLib 3.4.2 (vecLib 3.4.2) <9e27768a4224789f73942ddb2e03e729> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
 0x6653000 -  0x6773ffa  com.apple.vImage 4.0 (4.0) <40c9ff1a236e54afc0af0dbe01d59ae0> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
 0x6782000 -  0x67a1fff  com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) <c56e0d707296e54bceac01b6944e99e3> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
 0x67fe000 -  0x6878fff  libvMisc.dylib ??? (???) <2607b58a270aca106281054e078194d1> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
 0x6882000 -  0x691ffe3  libvDSP.dylib ??? (???) <18d61ac588914626b88c2c2babb2ac25> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
 0x6939000 -  0x6fa6ff7  libBLAS.dylib ??? (???) <b09754bb15f771807655be04f5200efd> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
 0x6fe4000 -  0x737cff7  libLAPACK.dylib ??? (???) <7f1ccd1f986607cb24ada410c3548482> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
 0x74f5000 -  0x7539ff3  libTIFF.dylib ??? (???) <7b0f8b579d3fd66175f0e695370c2232> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
 0x7544000 -  0x7548ffc  libGIF.dylib ??? (???) <ebdc74ca8b923dc8281d8644db5bf855> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
 0x754d000 -  0x7568fff  libPng.dylib ??? (???) <ce17de27142c8af8406c282b45de241a> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
 0x756f000 -  0x7571fff  libRadiance.dylib ??? (???) <8c97d9ae80dd2661573bb62db798e710> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
 0x7575000 -  0x7597ff2  libJPEG.dylib ??? (???) <df09b8c643d8325deae52adf5818b338> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
 0x759e000 -  0x75ccfff  libcups.2.dylib ??? (???) <dfcb272c0281e5d2ec0f89f1f75f6d88> /usr/lib/libcups.2.dylib
 0x75d7000 -  0x75ecffe +libgraphite2.3.dylib ??? (???) <f50d8f8421e2c2482a832278e2253aa7> /opt/local/lib/libgraphite2.3.dylib
 0x75f5000 -  0x762dfff +libdbus-1.3.dylib ??? (???) <ea6bceac04ce6fdc86a44bf84a34d228> /opt/local/lib/libdbus-1.3.dylib
 0x763d000 -  0x765cfff +libatspi.0.dylib ??? (???) <b7355b187897fe2afc0342285323ef41> /opt/local/lib/libatspi.0.dylib
 0x7679000 -  0x769eff8 +libvorbis.0.dylib ??? (???) <ca879fc23aca93e86cff452f5d990253> /opt/local/lib/libvorbis.0.dylib
 0x76a6000 -  0x76abfff +libogg.0.dylib ??? (???) <333ad130bd17d2523596f3dbf6ad6c1e> /opt/local/lib/libogg.0.dylib
 0x76ae000 -  0x773dffb +libzstd.1.dylib ??? (???) <bb932d99a956d55e10b1189f300229d6> /opt/local/lib/libzstd.1.dylib
 0x7749000 -  0x776fffc +liblzma.5.dylib ??? (???) <03bc800fb47b9ef63899316e0156af75> /opt/local/lib/liblzma.5.dylib
 0x7775000 -  0x779fffb +libLerc.4.dylib ??? (???) <f223c9561fbccc5efad3e57d9b1f7075> /opt/local/lib/libLerc.4.dylib
 0x77ab000 -  0x77b5fff +libdeflate.0.dylib ??? (???) <a29d5ec592fb3cb6e64ccce96b170f3d> /opt/local/lib/libdeflate.0.dylib
 0x77b8000 -  0x77e1fff +libcroco-0.6.3.dylib ??? (???) <47151eba44a4abf133692fbdd606ad99> /opt/local/lib/libcroco-0.6.3.dylib
 0x77ef000 -  0x78fffff +libxml2.2.dylib ??? (???) <e64bc22d5d469ab1a3649e1a72591249> /opt/local/lib/libxml2.2.dylib
 0x7926000 -  0x7ae4ffb +libicui18n.74.dylib ??? (???) <cb340e3dec04d832ed5e4fb8d09b3fa7> /opt/local/lib/libicui18n.74.dylib
 0x7bd8000 -  0x7d28fff +libicuuc.74.dylib ??? (???) <13fd9d08463db337089d7c3b8b4fdd36> /opt/local/lib/libicuuc.74.dylib
 0x7d93000 -  0x9aeffff +libicudata.74.dylib ??? (???) <a11a64364b5f0f9fcaf3c4e3b2e68d73> /opt/local/lib/libicudata.74.dylib
0x20000000 - 0x2009efff  edu.mit.Kerberos 6.5.3 (6.5.3) <af8fd279b2ec6f91e99e82352f2541c9> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x8fe00000 - 0x8fe31143  dyld 113.0 (???) <ee555e655e1cf66cac80728801add419> /usr/lib/dyld
0xfa100000 - 0xfa189ffb  com.apple.print.framework.PrintCore 6.0 (276) <049c93926212fa9408e9e56186970e4b> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0xffff8000 - 0xffff9703  libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib

It is likely this is NOT a bug in RawTherapee, but rather a consequence of using an unsupported presently Unix-like build on macOS. That is, I had to patch out Cocoa-specific chunks in a couple of source files (which uses gtkosxapplication).

It would be great though if this issue is not just closed as wontfix, since while Cocoa stuff is pretty broken on older macOS, GTK3 as such and X11 work fine and are well-tested in real applications. Also RawTherapee as such also works (conversion functionality at least).
So it could be a matter of a few minor tweaks, and we get the app working. People will be happy to have a modern RAW converter on PowerPC :)

Any suggestions are greatly appreciated. I realize that the hardware may not be available for testing, but making an educated guess can be nevertheless helpful. I can try any potential fixes on my end and provide logs and GDB output.

@barracuda156
Copy link
Author

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xfffffffc
0x053cfaa8 in std::string::_Rep::_M_is_leaked ()
(gdb) bt
#0  0x053cfaa8 in std::string::_Rep::_M_is_leaked ()
#1  0x0369dc8c in _ZNSsC4ERKSs.isra.0 ()
#2  0x000469c8 in rtengine::procparams::ColorManagementParams::ColorManagementParams ()
#3  0x0001ee44 in __static_initialization_and_destruction_0 ()
#4  0x0001ee94 in _GLOBAL__sub_I_histogrampanel.cc ()
#5  0x8fe15d60 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#6  0x8fe0f70c in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#7  0x8fe0f804 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE ()
#8  0x8fe02708 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#9  0x8fe08690 in __dyld__ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_ ()
#10 0x8fe017cc in __dyld__ZN13dyldbootstrap5startEPK11mach_headeriPPKcl ()
#11 0x8fe01064 in __dyld__dyld_start ()
(gdb) disassemble $pc-0x10 $pc+0x10
Dump of assembler code from 0x53cfa98 to 0x53cfab8:
0x053cfa98 <_ZNSs4_Rep12_S_empty_repEv+12>:	mtlr    r0
0x053cfa9c <_ZNSs4_Rep12_S_empty_repEv+16>:	addis   r3,r10,4
0x053cfaa0 <_ZNSs4_Rep12_S_empty_repEv+20>:	addi    r3,r3,9180
0x053cfaa4 <_ZNSs4_Rep12_S_empty_repEv+24>:	blr
0x053cfaa8 <_ZNKSs4_Rep12_M_is_leakedEv+0>:	lwz     r3,8(r3)
0x053cfaac <_ZNKSs4_Rep12_M_is_leakedEv+4>:	rlwinm  r3,r3,1,31,31
0x053cfab0 <_ZNKSs4_Rep12_M_is_leakedEv+8>:	blr
0x053cfab4 <_ZNKSs4_Rep12_M_is_sharedEv+0>:	lwz     r0,8(r3)
End of assembler dump.
(gdb)  info registers
r0             0x369dc8c	57269388
r1             0xbfffd4e0	3221214432
r2             0x23a	570
r3             0xfffffff4	4294967284
r4             0x0	0
r5             0x8	8
r6             0x686f746f	1752134767
r7             0xabfc094	180338836
r8             0x2	2
r9             0x140c998	21023128
r10            0x98	152
r11            0x42000408	1107297288
r12            0x53cfaa8	87882408
r13            0x8fe37930	2414049584
r14            0x8fe336bc	2414032572
r15            0x8fe37930	2414049584
r16            0x4f47c	324732
r17            0x8fe34d60	2414038368
r18            0x8fe2b954	2414000468
r19            0x35	53
r20            0x8fe36a24	2414045732
r21            0x2	2
r22            0x147c	5244
r23            0x11e0	4576
r24            0x8fe33ca0	2414034080
r25            0xb9	185
r26            0x124601c	19161116
r27            0x8fe33c48	2414033992
r28            0x125c	4700
r29            0x140c998	21023128
r30            0xfffffff4	4294967284
r31            0x467a0	288672
pc             0x53cfaa8	87882408
ps             0x100000000200f030	1152921504640462896
cr             0x42000402	1107297282
lr             0x369dc8c	57269388
ctr            0x53cfaa8	87882408
xer            0x0	0
mq             0x0	0
fpscr          0x82000000	2181038080
vscr           0x10000	65536
vrsave         0x0	0

@barracuda156
Copy link
Author

During the build there are a number of array bounds warnings:

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.h:165:40: warning: array subscript 0 is outside array bounds of 'void [220]' [-Warray-bounds=]
  165 |             castedSrcImg->resizeImgTo<>(nw, nh, interp, imgPtr);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc: In static member function 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:498:31: note: at offset -68 into object of size 220 allocated by 'operator new'
  498 |     Image8* img = new Image8 ();
      |                               ^
In static member function 'static IC* rtengine::Thumbnail::resizeTo(int, int, rtengine::TypeInterpolation, rtengine::ImageIO*) [with IC = rtengine::Image8]',
    inlined from 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:567:42:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.h:162:40: warning: array subscript 0 is outside array bounds of 'void [220]' [-Warray-bounds=]
  162 |             castedSrcImg->resizeImgTo<>(nw, nh, interp, imgPtr);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc: In static member function 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:498:31: note: at offset -68 into object of size 220 allocated by 'operator new'
  498 |     Image8* img = new Image8 ();
      |                               ^
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/imageio.h:24,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/image8.h:24,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:38:
In member function 'void rtengine::PlanarRGBData<T>::resizeImgTo(int, int, rtengine::TypeInterpolation, IC*) const [with IC = rtengine::Image8; T = short unsigned int]',
    inlined from 'static IC* rtengine::Thumbnail::resizeTo(int, int, rtengine::TypeInterpolation, rtengine::ImageIO*) [with IC = rtengine::Image8]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.h:162:40,
    inlined from 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:567:42:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/iimage.h:883:13: warning: array subscript 0 is outside array bounds of 'void [220]' [-Warray-bounds=]
  883 |         if (width == nw && height == nh) {
      |             ^~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc: In static member function 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:498:31: note: at offset -64 into object of size 220 allocated by 'operator new'
  498 |     Image8* img = new Image8 ();
      |                               ^
In member function 'void rtengine::PlanarRGBData<T>::resizeImgTo(int, int, rtengine::TypeInterpolation, IC*) const [with IC = rtengine::Image8; T = short unsigned int]',
    inlined from 'static IC* rtengine::Thumbnail::resizeTo(int, int, rtengine::TypeInterpolation, rtengine::ImageIO*) [with IC = rtengine::Image8]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.h:162:40,
    inlined from 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:567:42:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/iimage.h:885:33: warning: array subscript 0 is outside array bounds of 'void [220]' [-Warray-bounds=]
  885 |             for (int i = 0; i < height; i++) {
      |                                 ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc: In static member function 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:498:31: note: at offset -64 into object of size 220 allocated by 'operator new'
  498 |     Image8* img = new Image8 ();
      |                               ^
In member function 'void rtengine::PlanarRGBData<T>::resizeImgTo(int, int, rtengine::TypeInterpolation, IC*) const [with IC = rtengine::Image8; T = short unsigned int]',
    inlined from 'static IC* rtengine::Thumbnail::resizeTo(int, int, rtengine::TypeInterpolation, rtengine::ImageIO*) [with IC = rtengine::Image8]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.h:162:40,
    inlined from 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:567:42:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/iimage.h:886:37: warning: array subscript 0 is outside array bounds of 'void [220]' [-Warray-bounds=]
  886 |                 for (int j = 0; j < width; j++) {
      |                                     ^~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc: In static member function 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:498:31: note: at offset -64 into object of size 220 allocated by 'operator new'
  498 |     Image8* img = new Image8 ();
      |                               ^
In member function 'void rtengine::PlanarRGBData<T>::resizeImgTo(int, int, rtengine::TypeInterpolation, IC*) const [with IC = rtengine::Image8; T = short unsigned int]',
    inlined from 'static IC* rtengine::Thumbnail::resizeTo(int, int, rtengine::TypeInterpolation, rtengine::ImageIO*) [with IC = rtengine::Image8]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.h:162:40,
    inlined from 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:567:42:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/iimage.h:894:30: warning: array subscript 0 is outside array bounds of 'void [220]' [-Warray-bounds=]
  894 |                 int ri = i * height / nh;
      |                              ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc: In static member function 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:498:31: note: at offset -64 into object of size 220 allocated by 'operator new'
  498 |     Image8* img = new Image8 ();
      |                               ^
In member function 'void rtengine::PlanarRGBData<T>::resizeImgTo(int, int, rtengine::TypeInterpolation, IC*) const [with IC = rtengine::Image8; T = short unsigned int]',
    inlined from 'static IC* rtengine::Thumbnail::resizeTo(int, int, rtengine::TypeInterpolation, rtengine::ImageIO*) [with IC = rtengine::Image8]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.h:162:40,
    inlined from 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:567:42:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/iimage.h:897:34: warning: array subscript 0 is outside array bounds of 'void [220]' [-Warray-bounds=]
  897 |                     int ci = j * width / nw;
      |                                  ^~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc: In static member function 'static rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw(const Glib::ustring&, rtengine::eSensorType&, int&, int&, int, bool, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtengine/rtthumbnail.cc:498:31: note: at offset -64 into object of size 220 allocated by 'operator new'
  498 |     Image8* img = new Image8 ();
      |                               ^

@10110111
Copy link
Contributor

What if you run the binary under Valgrind?

@barracuda156
Copy link
Author

What if you run the binary under Valgrind?

@10110111 Valgrind does not work on Darwin ppc (I think it never did). The only debugger is GDB. Rather dated, but it works.

@10110111
Copy link
Contributor

10110111 commented Apr 22, 2024

#0  0x053cfaa8 in std::string::_Rep::_M_is_leaked ()
#1  0x0369dc8c in _ZNSsC4ERKSs.isra.0 ()
#2  0x000469c8 in rtengine::procparams::ColorManagementParams::ColorManagementParams ()

May be useful to build in debug mode and see what's happening at the source level. Maybe the crash will even shift to another place.

@barracuda156
Copy link
Author

@10110111 I will try.

By the way do you know if anyone tried building RT against GTK3 X11 (non-quartz) on any macOS? I am a bit concerned here, because source code just injects dedicated chunks without any else parts. Maybe it actually has to have non-Cocoa replacements and not just being removed.

@10110111
Copy link
Contributor

No idea, but given that your crash happens at static initialization, I'd expect there's something in addition to the quartz/X11 distinction. I wonder though, why does RT need such platform-specific code? Where did you find it?

@barracuda156
Copy link
Author

@10110111 I wonder as well, it should not be required (though cocoa interface is expected to be smoother, at the cost of poor compatibility).
But nearly always pure GTK+x11 work fine.

I am on mobile now, so no BBEdit, but you could search for __APPLE__ through the sources, it will return those instances. They aren’t numerous, but they are present, and that was the reason the port for RT in Macports was designed to be broken on ppc and i386; I think, completely unnecessarily.

@barracuda156
Copy link
Author

barracuda156 commented Apr 23, 2024

@10110111 By the way, I just built it on Sonoma as macOS app (so with gkt3+quartz and without my patches), and it crashes on launch as well, though perhaps for unrelated reason:

Process:               rawtherapee [29058]
Path:                  /Applications/MacPorts/RawTherapee.app/Contents/MacOS/rawtherapee
Identifier:            com.rawtherapee.RawTherapee
Version:               5.10 (5.10)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-04-23 15:35:19.9171 +0800
OS Version:            macOS 14.4.1 (23E224)
Report Version:        12
Anonymous UUID:        08288255-726E-11E3-9DE3-9407366F4C9A

Sleep/Wake UUID:       4F63D358-BC70-4859-8223-6E1B76A354D5

Time Awake Since Boot: 390000 seconds
Time Since Wake:       2070 seconds

System Integrity Protection: enabled

Crashed Thread:        4

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   rawtherapee [29058]

Application Specific Information:
abort() called


Thread 0::  Dispatch queue: com.apple.main-thread
0   liblensfun.0.3.4.dylib        	       0x102a3157c cmp_vignetting(void const*, void const*) + 32
1   liblensfun.0.3.4.dylib        	       0x102a38ed8 _lf_addobj(void***, void const*, unsigned long, bool (*)(void const*, void const*)) + 68
2   liblensfun.0.3.4.dylib        	       0x102a2dfcc _xml_start_element(_GMarkupParseContext*, char const*, char const**, char const**, void*, _GError**) + 3912
3   libglib-2.0.0.dylib           	       0x102cdd090 emit_start_element + 416
4   libglib-2.0.0.dylib           	       0x102cdc244 g_markup_parse_context_parse + 2636
5   liblensfun.0.3.4.dylib        	       0x102a2cfdc lfDatabase::Load(char const*, char const*, unsigned long) + 220
6   liblensfun.0.3.4.dylib        	       0x102a2cd40 lfDatabase::LoadDirectory(char const*) + 216
7   liblensfun.0.3.4.dylib        	       0x102a2cec0 lfDatabase::Load() + 156
8   rawtherapee                   	       0x101764e08 rtengine::LFDatabase::init(Glib::ustring const&) + 212
9   rawtherapee                   	       0x1015677a8 .omp_outlined. + 340
10  libomp.dylib                  	       0x1039656dc __kmp_invoke_microtask + 156
11  ???                           	               0x0 ???
12  ???                           	             0x370 ???
13  ???                           	       0x10397fa98 __kmp_user_lock_kind + 8

Thread 1:
0   libsystem_pthread.dylib       	       0x18fcc5d20 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	       0x18fcc5d20 start_wqthread + 0

Thread 3:
0   libsystem_kernel.dylib        	       0x18fc8d9ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x18fccb55c _pthread_cond_wait + 1228
2   libomp.dylib                  	       0x103949cb4 void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 364
3   libomp.dylib                  	       0x10392b524 kmp_flag_64<false, true>::wait(kmp_info*, int, void*) + 1832
4   libomp.dylib                  	       0x103926aac __kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*) + 160
5   libomp.dylib                  	       0x10392a1b8 __kmp_fork_barrier(int, int) + 640
6   libomp.dylib                  	       0x10390435c __kmp_launch_thread + 336
7   libomp.dylib                  	       0x1039487ac __kmp_launch_worker(void*) + 280
8   libsystem_pthread.dylib       	       0x18fccaf94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x18fcc5d34 thread_start + 8

Thread 4 Crashed:
0   libsystem_kernel.dylib        	       0x18fc92a60 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x18fccac20 pthread_kill + 288
2   libsystem_c.dylib             	       0x18fbd7a20 abort + 180
3   libc++abi.dylib               	       0x18fc81d30 abort_message + 132
4   libc++abi.dylib               	       0x18fc71ec0 demangling_terminate_handler() + 52
5   libc++abi.1.0.dylib           	       0x103f0765c std::__terminate(void (*)()) + 12
6   libc++abi.1.0.dylib           	       0x103f0760c std::terminate() + 60
7   rawtherapee                   	       0x101567a58 .omp_outlined. + 1028
8   libomp.dylib                  	       0x1039656dc __kmp_invoke_microtask + 156
9   ???                           	               0x2 ???
10  ???                           	               0x0 ???
11  ???                           	             0x200 ???
12  ???                           	    0x726854207265 ???

Thread 5:
0   libsystem_kernel.dylib        	       0x18fc8d9ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x18fccb55c _pthread_cond_wait + 1228
2   libomp.dylib                  	       0x103949cb4 void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 364
3   libomp.dylib                  	       0x10392b524 kmp_flag_64<false, true>::wait(kmp_info*, int, void*) + 1832
4   libomp.dylib                  	       0x103926aac __kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*) + 160
5   libomp.dylib                  	       0x10392a1b8 __kmp_fork_barrier(int, int) + 640
6   libomp.dylib                  	       0x10390435c __kmp_launch_thread + 336
7   libomp.dylib                  	       0x1039487ac __kmp_launch_worker(void*) + 280
8   libsystem_pthread.dylib       	       0x18fccaf94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x18fcc5d34 thread_start + 8

Thread 6:
0   libsystem_kernel.dylib        	       0x18fc8d9ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x18fccb55c _pthread_cond_wait + 1228
2   libomp.dylib                  	       0x103949cb4 void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 364
3   libomp.dylib                  	       0x10392b524 kmp_flag_64<false, true>::wait(kmp_info*, int, void*) + 1832
4   libomp.dylib                  	       0x103926aac __kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*) + 160
5   libomp.dylib                  	       0x10392a1b8 __kmp_fork_barrier(int, int) + 640
6   libomp.dylib                  	       0x10390435c __kmp_launch_thread + 336
7   libomp.dylib                  	       0x1039487ac __kmp_launch_worker(void*) + 280
8   libsystem_pthread.dylib       	       0x18fccaf94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x18fcc5d34 thread_start + 8

Thread 7:
0   libsystem_kernel.dylib        	       0x18fc8d9ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x18fccb55c _pthread_cond_wait + 1228
2   libomp.dylib                  	       0x103949cb4 void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 364
3   libomp.dylib                  	       0x10392b524 kmp_flag_64<false, true>::wait(kmp_info*, int, void*) + 1832
4   libomp.dylib                  	       0x103926aac __kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*) + 160
5   libomp.dylib                  	       0x10392a1b8 __kmp_fork_barrier(int, int) + 640
6   libomp.dylib                  	       0x10390435c __kmp_launch_thread + 336
7   libomp.dylib                  	       0x1039487ac __kmp_launch_worker(void*) + 280
8   libsystem_pthread.dylib       	       0x18fccaf94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x18fcc5d34 thread_start + 8

Thread 8:
0   libsystem_kernel.dylib        	       0x18fc8d9ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x18fccb55c _pthread_cond_wait + 1228
2   libomp.dylib                  	       0x103949cb4 void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 364
3   libomp.dylib                  	       0x10392b524 kmp_flag_64<false, true>::wait(kmp_info*, int, void*) + 1832
4   libomp.dylib                  	       0x103926aac __kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*) + 160
5   libomp.dylib                  	       0x10392a1b8 __kmp_fork_barrier(int, int) + 640
6   libomp.dylib                  	       0x10390435c __kmp_launch_thread + 336
7   libomp.dylib                  	       0x1039487ac __kmp_launch_worker(void*) + 280
8   libsystem_pthread.dylib       	       0x18fccaf94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x18fcc5d34 thread_start + 8

Thread 9:
0   libsystem_kernel.dylib        	       0x18fc8d9ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x18fccb55c _pthread_cond_wait + 1228
2   libomp.dylib                  	       0x103949cb4 void __kmp_suspend_64<false, true>(int, kmp_flag_64<false, true>*) + 364
3   libomp.dylib                  	       0x10392b524 kmp_flag_64<false, true>::wait(kmp_info*, int, void*) + 1832
4   libomp.dylib                  	       0x103926aac __kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int, void*) + 160
5   libomp.dylib                  	       0x10392a1b8 __kmp_fork_barrier(int, int) + 640
6   libomp.dylib                  	       0x10390435c __kmp_launch_thread + 336
7   libomp.dylib                  	       0x1039487ac __kmp_launch_worker(void*) + 280
8   libsystem_pthread.dylib       	       0x18fccaf94 _pthread_start + 136
9   libsystem_pthread.dylib       	       0x18fcc5d34 thread_start + 8


Thread 4 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x000000018fc86268   x5: 0x000000016ffaea00   x6: 0x0000000000000067   x7: 0x0000000000000000
    x8: 0x600cd4d9f2df8126   x9: 0x600cd4d89d257126  x10: 0x0000000000000200  x11: 0x000000016ffae530
   x12: 0x0000600000f4968c  x13: 0x00000000001ff800  x14: 0x00000000000007fb  x15: 0x00000000a6a10002
   x16: 0x0000000000000148  x17: 0x0000000201d42c30  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x000000016ffaf000  x21: 0x0000000000002103  x22: 0x000000016ffaf0e0  x23: 0x0000000000000002
   x24: 0x0000000073656c69  x25: 0x0000000101a649c0  x26: 0x0000000101a5e038  x27: 0x0000000000000002
   x28: 0x000000010181030c   fp: 0x000000016ffae970   lr: 0x000000018fccac20
    sp: 0x000000016ffae950   pc: 0x000000018fc92a60 cpsr: 0x40001000
   far: 0x0000000000000000  esr: 0x56000080  Address size fault

UPD. Okay, this is because OpenMP support is broken. Disabling it fixes the app.
Okay, now I have a reference: if I can make X11 version work on Sonoma, then that should be reproducible on PowerPC.

@10110111
Copy link
Contributor

And I guess the official release doesn't crash, does it?

@barracuda156
Copy link
Author

barracuda156 commented Apr 23, 2024

And I guess the official release doesn't crash, does it?

I build the release version, not the latest master. But anyway, Sonoma crash is caused by OpenMP-related stuff. Without OpenMP it works.

UPD. I will open a separate issue re GTK3+x11, since it crashes on Sonoma without OpenMP enabled either.

UPD2. I got it working on Sonoma with GTK3+x11! Now will try to build the same thing on PowerPC.

@barracuda156
Copy link
Author

@10110111 Ok, I am sure now that GTK stuff is unrelated.

While GTK3+x11 may need a bit of work to make it properly usable, it certainly should not segfault on launch if built correctly.

On PowerPC it still does though, with the same error as before.

@barracuda156
Copy link
Author

@10110111 Could it be that something implicitly assumes that size of bool is 1 byte and either struct size, or alignments, or sfinae are conditional on that? If so, that gonna explain the breakage on ppc, since bool is 4 bytes.

@10110111
Copy link
Contributor

Debugging broken assumptions about type sizes can be really hard. But it still may be useful to build with debug symbols and look where exactly and how the crash occurs. If it's still inside static initialization, then look at which variables are being initialized, what they contain etc.

@Floessie
Copy link
Collaborator

If so, that gonna explain the breakage on ppc, since bool is 4 bytes.

I used to build RT on Debian PPC where it ran just fine. In this environment sizeof(bool) is 1, though.

@barracuda156
Copy link
Author

If so, that gonna explain the breakage on ppc, since bool is 4 bytes.

I used to build RT on Debian PPC where it ran just fine. In this environment sizeof(bool) is 1, though.

@Floessie Given that conversion with rawtherapee-cli works fine, and GTK-x11 issues seem to be ruled out, I suspect it is something silly like size of bool or spinlock. The problem is that @10110111 is right, these things are hard to track down.

@barracuda156
Copy link
Author

@Floessie @10110111 Somewhat good news, in a sense: I have built it now on 10.6 i386 and got the same segfault on launch with the same message.

So this has nothing to do with PowerPC, endianness or size of bool (which is standard on i386).
It is very likely it is just broken on 32-bit now. If not, then some settings for GCC builds are wrong.

@barracuda156 barracuda156 changed the title [PowerPC] Advice needed to fix GUI binary, which crashes on launch with KERN_INVALID_ADDRESS at 0x00000000fffffffc (CLI binary works) [32-bit ppc/i386] Advice needed to fix GUI binary, which crashes on launch with KERN_INVALID_ADDRESS at 0x00000000fffffffc (CLI binary works) Apr 25, 2024
@barracuda156
Copy link
Author

This on i386:

(gdb) where
#0  0x91ed9436 in std::string::_Rep::_M_is_leaked ()
#1  0x01a17857 in _ZNSsC4ERKSs.isra.0 ()
#2  0x008cf855 in rtengine::procparams::ColorManagementParams::ColorManagementParams ()
#3  0x00b1f7cb in _GLOBAL__sub_I_histogrampanel.cc ()
#4  0x8fe0ec6d in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#5  0x8fe0ed59 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE ()
#6  0x8fe052e2 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#7  0x8fe083e9 in __dyld__ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_ ()
#8  0x8fe01960 in __dyld__ZN13dyldbootstrap5startEPK11mach_headeriPPKcl ()
#9  0x8fe01057 in __dyld__dyld_start ()
(gdb) disassemble $pc-0x10 $pc+0x10
Dump of assembler code from 0x91ed9426 to 0x91ed9446:
0x91ed9426 <_ZNSs4_Rep12_S_empty_repEv+7>:	add    %bl,-0x73(%ecx)
0x91ed9429 <_ZNSs4_Rep12_S_empty_repEv+10>:	subl   $0xe58955c3,-0x36f1c064(%ecx)
0x91ed9433 <_ZNKSs4_Rep12_M_is_leakedEv+3>:	mov    0x8(%ebp),%eax
0x91ed9436 <_ZNKSs4_Rep12_M_is_leakedEv+6>:	mov    0x8(%eax),%eax
0x91ed9439 <_ZNKSs4_Rep12_M_is_leakedEv+9>:	shr    $0x1f,%eax
0x91ed943c <_ZNKSs4_Rep12_M_is_leakedEv+12>:	leave  
0x91ed943d <_ZNKSs4_Rep12_M_is_leakedEv+13>:	ret    
0x91ed943e <_ZNKSs4_Rep12_M_is_sharedEv+0>:	push   %ebp
0x91ed943f <_ZNKSs4_Rep12_M_is_sharedEv+1>:	mov    %esp,%ebp
0x91ed9441 <_ZNKSs4_Rep12_M_is_sharedEv+3>:	mov    0x8(%ebp),%eax
0x91ed9444 <_ZNKSs4_Rep12_M_is_sharedEv+6>:	mov    0x8(%eax),%eax
End of assembler dump.
(gdb) info registers
eax            0xfffffff4	-12
ecx            0x0	0
edx            0x0	0
ebx            0xf8c64c	16303692
esp            0xbfffd698	0xbfffd698
ebp            0xbfffd698	0xbfffd698
esi            0xfffffff4	-12
edi            0xf8c5ac	16303532
eip            0x91ed9436	0x91ed9436 <std::string::_Rep::_M_is_leaked() const+6>
eflags         0x10282	66178
cs             0x17	23
ss             0x1f	31
ds             0x1f	31
es             0x1f	31
fs             0x0	0
gs             0x37	55

@10110111
Copy link
Contributor

It is very likely it is just broken on 32-bit now.

I wouldn't be surprised, given the issue where you pinged me.

On my machine with 32-bit userspace I have RT 5.5 built (with the patch ed5cf13 and a few compatibility hacks for GTK<3.16), which works well enough. So one way to debug this for you is to try building 5.5 and see if it works, and then use git bisect to find the commit where things break.

Or you can actually use Valgrind now. Just note that it doesn't support SSE4, AVX or newer extensions on 32-bit x86, so you may need to make sure your binary and all the libraries it loads don't use them (or just execute this on an SSE4&AVX-disabled CPU/kernel/VM). And don't forget to build in debug mode, it'll make your life easier.

@barracuda156
Copy link
Author

@10110111 I suspect this commit might have broken it: 8accebe
So I will start from reverting this one. Bisecting back to 5.5 will be a pretty non-trivial endeavor :)

@barracuda156
Copy link
Author

@10110111 @Floessie Bingo, it is exactly that commit.

I got now another error on launch, but this looks trivial:

36-242% rawtherapee
ERROR: Can't create "/Users/svacchanda/Library/Application Support/RawTherapee/cache/svg2png/72" cache folder: Unknown error: -1
ERROR: Can't create "/Users/svacchanda/Library/Application Support/RawTherapee/cache/svg2png/72" cache folder: Unknown error: -1
ERROR: Can't create "/Users/svacchanda/Library/Application Support/RawTherapee/cache/svg2png/72" cache folder: Unknown error: -1

P. S. @Lawrence37 Could you please take a look at the issue? 8accebe commit led to segfaults on 32-bit platforms.

@barracuda156
Copy link
Author

Did not notice, this is the end of the new error message:

ERROR: Can't create "/Users/svacchanda/Library/Application Support/RawTherapee/cache/svg2png/72" cache folder: Unknown error: -1

(rawtherapee-orig:70848): Gdk-ERROR **: 13:51:28.832: The program 'rawtherapee-orig' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 241 error_code 8 request_code 140 (RENDER) minor_code 27)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
zsh: trace trap  rawtherapee

@barracuda156
Copy link
Author

Maybe it was not the best idea to build from a commit (I used 6a11c59 which directly preceded the breakage); let me try 5.10-rc1 instead.

@10110111
Copy link
Contributor

Note that the problem may have existed before the commit you found. This commit may have simply uncovered it.

From your stack trace, this line seems to be the one that triggers the crash. You could try adding it on top of a working revision to see if it will start crashing. But the struct itself doesn't seem bad, so it may be that memory is corrupted before this object is constructed.

@Floessie
Copy link
Collaborator

@barracuda156 Sorry, but I'm unable to reproduce the crash on Debian Testing i386 with current dev and GCC 13.2.0 as well as Clang 16.0.6. And as @10110111 already mentioned, the code looks valid. Tooling/toolchain issue?

@barracuda156
Copy link
Author

@barracuda156 Sorry, but I'm unable to reproduce the crash on Debian Testing i386 with current dev and GCC 13.2.0 as well as Clang 16.0.6. And as @10110111 already mentioned, the code looks valid. Tooling/toolchain issue?

@Floessie Thank you, this is helpful to know.

At the moment I do not know the cause, I am building now 5.9, and I am yet to build from current dev (I have been using 5.10 release initially).
Generally speaking, gcc should be fine (especially given that I got the same error on i386, so ppc-specific stuff should be irrelevant), and gtk3 works fine with numerous other ports. However, there are too many “moving parts”, the only conclusive way will be to eventually bisect and get the first breaking commit.

@barracuda156
Copy link
Author

barracuda156 commented Apr 26, 2024

@10110111 @Floessie A quick update. I got 5.9 GUI starting up on PowerPC.
However, it is unresponsive. Nothing is clickable, though it does not crash.

UPD. No, it actually works. It is just slow LOL
UPD2. It is even usable. Starting up is slow, once that done, it is okay.

image

@barracuda156
Copy link
Author

rawtherapee

@barracuda156
Copy link
Author

@barracuda156 Sorry, but I'm unable to reproduce the crash on Debian Testing i386 with current dev and GCC 13.2.0 as well as Clang 16.0.6. And as @10110111 already mentioned, the code looks valid. Tooling/toolchain issue?

Unfortunately, building from dev is problematic now, since the following two commits have effectively pulled in Rust dependency. And Rust is broken.
89d2bdc
36222d1

I have opened an issue for that: #7060

(I could revert them as a one-time fix in the worst case, but it won’t be practical to keep carrying those, it is 2000 LoC. I may not even be allowed to add such a monstrous patch, since I am not a port’s maintainer.)

@barracuda156
Copy link
Author

@10110111 @Floessie

I can confirm that reverting 8accebe from 5.10 release fixes the segfault on launch with GUI.

I still get a very odd effect of the interface being initially unresponsive: when I built 5.9, I thought it is just dead, but then suddenly it started working without any action from my side (I think I restarted the app, but that’s it).
I have 5.10 now, and interface again unresponsive. I will perhaps return to this tomorrow to investigate, however as a matter of fact segfault issue is clearly fixed by reverting that single commit.

@10110111
Copy link
Contributor

If you can reproduce the crash on some clean x86 Linux installation (e.g. in a VM), please post the instructions. I might have a look.

@barracuda156
Copy link
Author

@10110111 Could you suggest what might lead to GUI being non-reacting to anything? There is no freeze of the app, no errors, GUI is just not responding to clicks on anything. The only thing which works is pop-up commentaries when I place a cursor over something.

I think I have used identical build for 5.10 (where GUI is unresponsive) and 5.9 (where everything works), save for the patch to fix segfault on 5.10.

@10110111
Copy link
Contributor

The only thing which works is pop-up commentaries when I place a cursor over something.

Do you mean the black rounded-rectangular tooltip windows like e.g. "Show only images not in trash."? And what about the buttons themselves — do they change their look to prelit when hovered over?

Such behavior doesn't sound familiar. But, since you have a working version and a non-working one, binary search is again the easiest way to go.

@barracuda156
Copy link
Author

The only thing which works is pop-up commentaries when I place a cursor over something.

Do you mean the black rounded-rectangular tooltip windows like e.g. "Show only images not in trash."? And what about the buttons themselves — do they change their look to prelit when hovered over?

Yes to the tooltips, no to button being prelit. Scrolling does not work either.

Such behavior doesn't sound familiar. But, since you have a working version and a non-working one, binary search is again the easiest way to go.

I browsed through commit history, and one thing which looks suspicious is a massive change related to mutices. Looks like that landed in 5.10-pre.
Binary search – you mean via hex editor?

@10110111
Copy link
Contributor

Binary search – you mean via hex editor?

No, git bisect.

@barracuda156
Copy link
Author

Binary search – you mean via hex editor?

No, git bisect.

Ah okay, got it. May take a bit of time, but yes, I will proceed with that. I want this working, certainly.

@barracuda156
Copy link
Author

@10110111 Looks like it was a ridiculously silly issue (not the segfault, that one is real, but the unresponsiveness): the app opens a welcome window behind the main one and expects one to click there to confirm. Since it is behind, I simply did not see it LOL

So everything works in 5.10, it seems, after reverting 8accebe
There is no problem with mutices etc.

@10110111
Copy link
Contributor

the app opens a welcome window behind the main one and expects one to click there to confirm.

This is crazy. Given the symptoms, the dialog is modal (just checked with GEdit's About dialog), which implies it must be on top of its parent. If your WM doesn't show it on top of its parent, then I'd call it a bug in the WM.

@barracuda156
Copy link
Author

barracuda156 commented Apr 28, 2024

the app opens a welcome window behind the main one and expects one to click there to confirm.

This is crazy. Given the symptoms, the dialog is modal (just checked with GEdit's About dialog), which implies it must be on top of its parent. If your WM doesn't show it on top of its parent, then I'd call it a bug in the WM.

Possibly, I make no claim that this is a bug in RT.
Rebuilding now to ensure it works reproducibly.

If yes, then the only issue is that segfault. I will see if it happens with a standard Macports setup for 10.6.8 i386 (which uses clang); if it does, then it is reproducible. If not, it could be an issue with gcc or something else. My PowerPC setup is anything but standard :)

P. S. For the silly window issue, I think we can add a note to the port, which will be displayed only for archaic macOS versions, informing a user about this caveat.

@barracuda156
Copy link
Author

@10110111 Looks good, yeah:

rt5 10ppc

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

3 participants