with 2019.0beta1, calibrate_lens_gui.app sometimes crashes on startup (crashdump attached - lensgui.txt).
HuginBase::Color::GetMonitorProfile in src/hugin1/base_wx/wxcms.cpp, line 166
This is platform depend code. I can't debug it from here. It is surprising that is starts now. The Mac OS code was written in 2016 and stayed untouched in the meantime.
Maybe there was some changes on Mac OS side?
Could you try to try to isolate the crash further? (Run in a debugger?)
When closing Hugin itself, it seems to get into an infinite loop and segfaults (hugin.txt).
When closing Hugin itself, it seems to get into an infinite loop and segfaults (hugin.txt).This is probably the same as https://bugs.launchpad.net/hugin/+bug/1813404I'm currently debugging this one.
Hi Thomas,
Am Samstag, 26. Januar 2019 19:08:24 UTC+1 schrieb T. Modes:
This is platform depend code. I can't debug it from here. It is surprising that is starts now. The Mac OS code was written in 2016 and stayed untouched in the meantime.
Maybe there was some changes on Mac OS side?
It seems to happen only when f.lux is making my screen more reddish, I guess I never ran that app that late in the evening?
And it's not the platform specific part: http://hg.code.sf.net/p/hugin/hugin/file/7745efc3e3c7/src/hugin1/base_wx/wxcms.cpp#l205
Could you try to try to isolate the crash further? (Run in a debugger?)
cmsCloseProfile fails, but it should really just return false on error?
Given that the segfault happens on a member access, I would say that hProfile isn't actually a cmsHPROFILE object?
// Closes a profile freeing any involved resources
cmsBool CMSEXPORT cmsCloseProfile(cmsHPROFILE hProfile)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
// ..
if (Icc ->IsWrite) { // <-------------------------------- segfault
Adding std::cout << profile << "\n"; here prints 0xffffffffffffffff, not sure what printing is actually printed here, but seems quite suspicious.
Process 49904 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff7d8b9baf)
frame #0: 0x0000000101eff6f6 liblcms2.2.dylib`cmsCloseProfile + 38
liblcms2.2.dylib`cmsCloseProfile:
-> 0x101eff6f6 <+38>: movl $0x0, 0xe98(%r13)
0x101eff701 <+49>: movq (%r13), %r15
0x101eff705 <+53>: movq 0x8(%r13), %rdi
0x101eff709 <+57>: addq $0x18, %r15
Target 0: (calibrate_lens_gui) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff7d8b9baf)
* frame #0: 0x0000000101eff6f6 liblcms2.2.dylib`cmsCloseProfile + 38
frame #1: 0x000000010031dabf libhuginbasewx.0.0.dylib`HuginBase::Color::GetMonitorProfile(profileName=0x00007ffeefbfcd50, profile=0x0000000103899fb8) at wxcms.cpp:206
frame #2: 0x000000010004411a calibrate_lens_gui`LensCalImageCtrl::LensCalImageCtrl(this=0x0000000103899c00) at LensCalImageCtrl.cpp:60
frame #3: 0x00000001000443c5 calibrate_lens_gui`LensCalImageCtrl::LensCalImageCtrl(this=0x0000000103899c00) at LensCalImageCtrl.cpp:45
Am Samstag, 26. Januar 2019 20:09:06 UTC+1 schrieb T. Modes:
I committed a fix. Hopefully this works also for you.
Yes, it does.
Niklas
Actually, the profile passed to GetMonitorProfile is never initialized, this fixes it: