I observed that the file I mentioned in the strace output, when it segfaulted, is a symlink. I wonder if that is the cause of the problem.
I am now compiling FreeFileSync 9.7, released a few days ago. I am still compiling on gcc 7.2.1.2.fc27.x86_64 against gtk3.
Somehow, when I package the utility up in an rpm, the built file includes the debug info. I'm still trying to figure out the flags passed to gcc (maybe -g or -Og or something like that [cf.
https://www.ostechnix.com/compile-run-c-c-programs-linux/]).
I was able to get a full backtrace from gdb, when debugging that packaged up binary:
#0 0x00007ffff4cef480 in proxy_pixbuf_destroy () at /lib64/libgtk-3.so.0
#1 0x00007ffff3a38f44 in gdk_pixbuf_finalize () at /lib64/libgdk_pixbuf-2.0.so.0
#2 0x00007ffff3458689 in g_object_unref () at /lib64/libgobject-2.0.so.0
#3 0x000055555577bb3a in (anonymous namespace)::<lambda()>::operator() (__closure=<synthetic pointer>) at lib/icon_loader.cpp:87
#4 0x000055555577bb3a in zen::runScopeGuardDestructor<(anonymous namespace)::imageHolderFromGicon(GIcon*, int)::<lambda()> > (fun=<synthetic pointer>...)
at ../../zen/scope_guard.h:58
#5 0x000055555577bb3a in zen::ScopeGuard<(zen::ScopeGuardRunMode)0, (anonymous namespace)::imageHolderFromGicon(GIcon*, int)::<lambda()> >::~ScopeGuard (this=<synthetic pointer>, __in_chrg=<optimized out>) at ../../zen/scope_guard.h:96
#6 0x000055555577bb3a in (anonymous namespace)::imageHolderFromGicon(GIcon*, int) (gicon=gicon@entry=0x555556128120, pixelSize=pixelSize@entry=24) at lib/icon_loader.cpp:87
#7 0x000055555577bd75 in zen::genericFileIcon(int) (pixelSize=24) at lib/icon_loader.cpp:122
#8 0x0000555555776407 in zen::IconBuffer::genericFileIcon(zen::IconBuffer::IconSize) (sz=sz@entry=zen::IconBuffer::SIZE_SMALL) at lib/icon_buffer.cpp:412
#9 0x0000555555709ea7 in MainDialog::MainDialog(zen::Zbase<char, zen::DefaultStoragePolicy> const&, xmlAccess::XmlGuiConfig const&, std::vector<zen::Zbase<char, zen::DefaultStoragePolicy>, std::allocator<zen::Zbase<char, zen::DefaultStoragePolicy> > > const&, xmlAccess::XmlGlobalSettings const&, bool) (this=0x555555e02e00, globalConfigFilePath=..., guiCfg=..., referenceFiles=std::vector of length 1, capacity 1 = {...}, globalSettings=..., startComparison=<optimized out>) at ui/main_dlg.cpp:564
#10 0x000055555570c906 in MainDialog::create(zen::Zbase<char, zen::DefaultStoragePolicy> const&, xmlAccess::XmlGlobalSettings const*, xmlAccess::XmlGuiConfig const&, std::vector<zen::Zbase<char, zen::DefaultStoragePolicy>, std::allocator<zen::Zbase<char, zen::DefaultStoragePolicy> > > const&, bool) (globalConfigFilePath=..., globalSettings=globalSettings@entry=0x7fffffffd030, guiCfg=..., referenceFiles=std::vector of length 1, capacity 1 = {...}, startComparison=startComparison@entry=false) at ui/main_dlg.cpp:387
#11 0x000055555570cf6c in MainDialog::create(zen::Zbase<char, zen::DefaultStoragePolicy> const&) (globalConfigFilePath=...) at ui/main_dlg.cpp:364
#12 0x00005555555ed2b9 in runGuiMode(zen::Zbase<char, zen::DefaultStoragePolicy> const&) (globalConfigFilePath=...) at application.cpp:461
#13 0x00005555555ed2b9 in Application::launch(std::vector<zen::Zbase<char, zen::DefaultStoragePolicy>, std::allocator<zen::Zbase<char, zen::DefaultStoragePolicy> > > const&) (this=0x555555b20470, commandArgs=std::vector of length 0, capacity 0) at application.cpp:365
#14 0x00005555555ee598 in Application::onEnterEventLoop(wxEvent&) (this=0x555555b20470, event=...) at application.cpp:100
#15 0x00007ffff5e3471a in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /lib64/libwx_baseu-3.0.so.0
#16 0x00007ffff5e34b2a in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () at /lib64/libwx_baseu-3.0.so.0
#17 0x00007ffff5e34bbf in wxEvtHandler::TryHereOnly(wxEvent&) () at /lib64/libwx_baseu-3.0.so.0
#18 0x00007ffff5e34c73 in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /lib64/libwx_baseu-3.0.so.0
#19 0x00007ffff5e34cd5 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-3.0.so.0
#20 0x00007ffff5e35e02 in wxEvtHandler::ProcessPendingEvents() () at /lib64/libwx_baseu-3.0.so.0
#21 0x00007ffff5cbc7b7 in wxAppConsoleBase::ProcessPendingEvents() () at /lib64/libwx_baseu-3.0.so.0
#22 0x00007ffff67812dd in wxApp::DoIdle() () at /lib64/libwx_gtk3u_core-3.0.so.0
#23 0x00007ffff6781403 in wxapp_idle_callback () at /lib64/libwx_gtk3u_core-3.0.so.0
#24 0x00007ffff3177597 in g_idle_dispatch () at /lib64/libglib-2.0.so.0
#25 0x00007ffff317abb7 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#26 0x00007ffff317af60 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#27 0x00007ffff317b272 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#28 0x00007ffff4d25ca5 in gtk_main () at /lib64/libgtk-3.so.0
#29 0x00007ffff679f8a5 in wxGUIEventLoop::DoRun() () at /lib64/libwx_gtk3u_core-3.0.so.0
#30 0x00007ffff5cf5ea3 in wxEventLoopBase::Run() () at /lib64/libwx_baseu-3.0.so.0
#31 0x00007ffff5cbdea6 in wxAppConsoleBase::MainLoop() () at /lib64/libwx_baseu-3.0.so.0
#32 0x00005555555ead2b in Application::OnRun() (this=0x555555b20470) at application.cpp:110
#33 0x00007ffff5d463e7 in wxEntry(int&, wchar_t**) () at /lib64/libwx_baseu-3.0.so.0
#34 0x00005555555ce5b8 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at application.cpp:32
So I pulled up file lib/icon_loader.cpp:87 from the FreeFileSync tree.
ImageHolder imageHolderFromGicon(GIcon* gicon, int pixelSize)
{
if (gicon)
if (GtkIconTheme* defaultTheme = ::gtk_icon_theme_get_default()) //not owned!
if (GtkIconInfo* iconInfo = ::gtk_icon_theme_lookup_by_gicon(defaultTheme, gicon, pixelSize, GTK_ICON_LOOKUP_USE_BUILTIN)) //this may fail if icon is not installed on system
{
ZEN_ON_SCOPE_EXIT(::gtk_icon_info_free(iconInfo));
if (GdkPixbuf* pixBuf = ::gtk_icon_info_load_icon(iconInfo, nullptr))
{
ZEN_ON_SCOPE_EXIT(::g_object_unref(pixBuf)); //superseedes "::gdk_pixbuf_unref"!
return copyToImageHolder(pixBuf);
}
}
return ImageHolder();
}
Line 87 is the one with the misspelled "superseedes" comment. Can you guys help me step through this backtrace and see if there's something we can modify or add a try-catch block around?