hugin 2023.0.0: three asserts with wxgtk 3.2.4

Bug #2045960 reported by Timo Gurr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Committed
Undecided
Unassigned

Bug Description

On startup when compiled against wxgtk 3.2.4 I get 3 asserts (that I don't get when compiled against wxgtk 3.1.7) I can click continue and hugin appears to work despite the errors on startup:

ASSERT INFO:
/var/tmp/paludis/build/x11-libs-wxGTK-3.2.4/work/wxWidgets-3.2.4/src/gtk/dc.cpp(497): assert ""cr"" failed in wxPaintDCImpl(): using wxPaintDC without being in a native paint event

BACKTRACE:
[1] wxPaintDC::wxPaintDC(wxWindow*)
[2] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[3] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[4] wxEvtHandler::TryHereOnly(wxEvent&)
[5] wxEvtHandler::ProcessEventLocally(wxEvent&)
[6] wxEvtHandler::ProcessEvent(wxEvent&)
[7] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[8] wxWindow::GTKSendPaintEvents(_cairo*)
[9] g_closure_invoke
[10] g_signal_emit_valist
[11] g_signal_emit
[12] gtk_container_propagate_draw
[13] g_closure_invoke
[14] g_signal_emit_valist
[15] g_signal_emit
[16] gtk_container_propagate_draw
[17] g_closure_invoke
[18] g_signal_emit_valist
[19] g_signal_emit
[20] gtk_container_propagate_draw
[21] g_closure_invoke
[22] g_signal_emit_valist
[23] g_signal_emit
[24] gtk_container_propagate_draw
[25] gtk_container_propagate_draw
[26] gtk_main_do_event
[27] wxWindow::Update()
[28] wxAuiManager::OnSize(wxSizeEvent&)
[29] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[30] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[31] wxEvtHandler::TryHereOnly(wxEvent&)
[32] wxEvtHandler::ProcessEventLocally(wxEvent&)
[33] wxEvtHandler::ProcessEvent(wxEvent&)
[34] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[35] wxWindow::DoSetSize(int, int, int, int, int)
[36] wxBoxSizer::RepositionChildren(wxSize const&)
[37] wxSizer::Layout()
[38] wxWindowBase::Layout()
[39] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[40] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[41] wxEvtHandler::TryHereOnly(wxEvent&)
[42] wxEvtHandler::ProcessEventLocally(wxEvent&)
[43] wxEvtHandler::ProcessEvent(wxEvent&)
[44] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[45] g_closure_invoke
[46] g_signal_emit_valist
[47] g_signal_emit
[48] gtk_widget_size_allocate_with_baseline
[49] gtk_widget_size_allocate_with_baseline
[50] g_closure_invoke
[51] g_signal_emit_valist
[52] g_signal_emit
[53] gtk_widget_size_allocate_with_baseline
[54] g_signal_emit_valist
[55] g_signal_emit
[56] g_closure_invoke
[57] g_signal_emit_valist
[58] g_signal_emit
[59] g_main_context_iteration
[60] gtk_main_iteration
[61] wxGUIEventLoop::DoYieldFor(long)
[62] wxEventLoopBase::YieldFor(long)
[63] wxAppConsoleBase::Yield(bool)
[64] wxEntry(int&, wchar_t**)
[65] __libc_start_main

ASSERT INFO:
/var/tmp/paludis/build/x11-libs-wxGTK-3.2.4/work/wxWidgets-3.2.4/src/common/dcgraph.cpp(466): assert ""IsOk()"" failed in SetTextForeground(): wxGCDC(cg)::SetTextForeground - invalid DC

BACKTRACE:
[1] wxGCDCImpl::SetTextForeground(wxColour const&)
[2] wxDCImpl::InheritAttributes(wxWindow*)
[3] wxPaintDC::wxPaintDC(wxWindow*)
[4] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[5] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[6] wxEvtHandler::TryHereOnly(wxEvent&)
[7] wxEvtHandler::ProcessEventLocally(wxEvent&)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[10] wxWindow::GTKSendPaintEvents(_cairo*)
[11] g_closure_invoke
[12] g_signal_emit_valist
[13] g_signal_emit
[14] gtk_container_propagate_draw
[15] g_closure_invoke
[16] g_signal_emit_valist
[17] g_signal_emit
[18] gtk_container_propagate_draw
[19] g_closure_invoke
[20] g_signal_emit_valist
[21] g_signal_emit
[22] gtk_container_propagate_draw
[23] g_closure_invoke
[24] g_signal_emit_valist
[25] g_signal_emit
[26] gtk_container_propagate_draw
[27] gtk_container_propagate_draw
[28] gtk_main_do_event
[29] wxWindow::Update()
[30] wxAuiManager::OnSize(wxSizeEvent&)
[31] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[32] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[33] wxEvtHandler::TryHereOnly(wxEvent&)
[34] wxEvtHandler::ProcessEventLocally(wxEvent&)
[35] wxEvtHandler::ProcessEvent(wxEvent&)
[36] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[37] wxWindow::DoSetSize(int, int, int, int, int)
[38] wxBoxSizer::RepositionChildren(wxSize const&)
[39] wxSizer::Layout()
[40] wxWindowBase::Layout()
[41] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[42] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[43] wxEvtHandler::TryHereOnly(wxEvent&)
[44] wxEvtHandler::ProcessEventLocally(wxEvent&)
[45] wxEvtHandler::ProcessEvent(wxEvent&)
[46] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[47] g_closure_invoke
[48] g_signal_emit_valist
[49] g_signal_emit
[50] gtk_widget_size_allocate_with_baseline
[51] gtk_widget_size_allocate_with_baseline
[52] g_closure_invoke
[53] g_signal_emit_valist
[54] g_signal_emit
[55] gtk_widget_size_allocate_with_baseline
[56] g_signal_emit_valist
[57] g_signal_emit
[58] g_closure_invoke
[59] g_signal_emit_valist
[60] g_signal_emit
[61] g_main_context_iteration
[62] gtk_main_iteration
[63] wxGUIEventLoop::DoYieldFor(long)
[64] wxEventLoopBase::YieldFor(long)
[65] wxAppConsoleBase::Yield(bool)
[66] wxEntry(int&, wchar_t**)
[67] __libc_start_main

ASSERT INFO:
/var/tmp/paludis/build/x11-libs-wxGTK-3.2.4/work/wxWidgets-3.2.4/src/common/dcgraph.cpp(480): assert ""IsOk()"" failed in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC

BACKTRACE:
[1] wxGCDCImpl::SetTextBackground(wxColour const&)
[2] wxDCImpl::InheritAttributes(wxWindow*)
[3] wxPaintDC::wxPaintDC(wxWindow*)
[4] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[5] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[6] wxEvtHandler::TryHereOnly(wxEvent&)
[7] wxEvtHandler::ProcessEventLocally(wxEvent&)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[10] wxWindow::GTKSendPaintEvents(_cairo*)
[11] g_closure_invoke
[12] g_signal_emit_valist
[13] g_signal_emit
[14] gtk_container_propagate_draw
[15] g_closure_invoke
[16] g_signal_emit_valist
[17] g_signal_emit
[18] gtk_container_propagate_draw
[19] g_closure_invoke
[20] g_signal_emit_valist
[21] g_signal_emit
[22] gtk_container_propagate_draw
[23] g_closure_invoke
[24] g_signal_emit_valist
[25] g_signal_emit
[26] gtk_container_propagate_draw
[27] gtk_container_propagate_draw
[28] gtk_main_do_event
[29] wxWindow::Update()
[30] wxAuiManager::OnSize(wxSizeEvent&)
[31] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[32] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[33] wxEvtHandler::TryHereOnly(wxEvent&)
[34] wxEvtHandler::ProcessEventLocally(wxEvent&)
[35] wxEvtHandler::ProcessEvent(wxEvent&)
[36] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[37] wxWindow::DoSetSize(int, int, int, int, int)
[38] wxBoxSizer::RepositionChildren(wxSize const&)
[39] wxSizer::Layout()
[40] wxWindowBase::Layout()
[41] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[42] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[43] wxEvtHandler::TryHereOnly(wxEvent&)
[44] wxEvtHandler::ProcessEventLocally(wxEvent&)
[45] wxEvtHandler::ProcessEvent(wxEvent&)
[46] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[47] g_closure_invoke
[48] g_signal_emit_valist
[49] g_signal_emit
[50] gtk_widget_size_allocate_with_baseline
[51] gtk_widget_size_allocate_with_baseline
[52] g_closure_invoke
[53] g_signal_emit_valist
[54] g_signal_emit
[55] gtk_widget_size_allocate_with_baseline
[56] g_signal_emit_valist
[57] g_signal_emit
[58] g_closure_invoke
[59] g_signal_emit_valist
[60] g_signal_emit
[61] g_main_context_iteration
[62] gtk_main_iteration
[63] wxGUIEventLoop::DoYieldFor(long)
[64] wxEventLoopBase::YieldFor(long)
[65] wxAppConsoleBase::Yield(bool)
[66] wxEntry(int&, wchar_t**)
[67] __libc_start_main

Revision history for this message
tmodes (tmodes) wrote :

Tested with wxWidgets 3.2.4 and don't get any asserts. So it may only appear with some special parameters.
How have you configured wxWidgets and Hugin during build process?

Changed in hugin:
status: New → Incomplete
Revision history for this message
Bruno Postle (brunopostle) wrote :

I don't see this with Hugin 2023.0.0 and wxgtk 3.2.4 (fedora 39 default packages)

Revision history for this message
Timo Gurr (timo-gurr) wrote :
Download full text (4.2 KiB)

wxGTK:

/var/tmp/paludis/build/x11-libs-wxGTK-3.2.4/work/wxWidgets-3.2.4/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --prefix=/usr/x86_64-pc-linux-gnu --bindir=/usr/x86_64-pc-linux-gnu/bin --sbindir=/usr/x86_64-pc-linux-gnu/bin --libdir=/usr/x86_64-pc-linux-gnu/lib --datadir=/usr/share --datarootdir=/usr/share --infodir=/usr/share/info --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking PKG_CONFIG=/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-pkg-config --disable-gtktest --enable-compat28 --enable-controls --enable-graphics_ctx --enable-gui --enable-intl --enable-ipv6 --enable-shared --enable-threads --enable-unicode --enable-precomp-headers --disable-spellcheck --disable-webviewedge --with-expat --with-gtk=3 --with-gtkprint --with-libjpeg=sys --with-liblzma --with-libpng=sys --with-libxpm=sys --with-libiconv --with-nanosvg --with-opengl --with-regex=sys --with-zlib=sys --without-gnomevfs --enable-webrequest --enable-mediactrl --disable-joystick --disable-secretstore --enable-webview --enable-webviewwebkit --disable-glcanvasegl --without-libnotify --with-sdl --with-libtiff=sys

Configured wxWidgets 3.2.4 for `x86_64-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use? GTK+ 3 with support for GTK+ printing
  Should wxWidgets be compiled into single library? no
  Should wxWidgets be linked as a shared library? yes
  Should wxWidgets support Unicode? yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8 yes
                                       wxWidgets 3.0 yes
  Which libraries should wxWidgets use?
                                       STL no
                                       jpeg sys
                                       png sys
                                       regex sys
                                       tiff sys
                                       lzma sys
                                       zlib sys
                                       expat sys
                                       libmspack no
                                       sdl yes

Hugin:

cmake -DCMAKE_BUILD_TYPE:STRING=None -DCMAKE_C_FLAGS:STRING=-march=native -O2 -pipe -DCMAKE_CXX_FLAGS:STRING=-march=native -O2 -pipe -DCMAKE_AR:PATH=x86_64-pc-linux-gnu-ar -DCMAKE_RANLIB:PATH=x86_64-pc-linux-gnu-ranlib -DCMAKE_NM:PATH=x86_64-pc-linux-gnu-nm -DCMAKE_C_COMPILER:PATH=x86_64-pc-linux-gnu-cc -DCMAKE_CXX_COMPILER:PATH=x86_64-pc-linux-gnu-c++ -DCMAKE_INSTALL_PREFIX:PATH=/usr/x86_64-pc-linux-gnu -DCMAKE_FIND_ROOT_PATH:PATH=/usr/x86_64-pc-linux-gnu -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM:STRING=NEVER -DCMAKE_SYSTEM_PREFIX_PATH:PATH=/usr/x86_64-pc-linux-gnu -DCMAKE_INSTALL_LIBDIR:STRING=lib -DCMAKE_INSTALL_DATAROOTDIR:PATH=/usr/share/ -DBUILD_WITH_EPOXY:BOOL=TRUE -DCMAKE_EXE_LINKER_FLAGS:STRING=-lpthread -DDISABLE_DPKG:BOOL=TRUE -DHUGIN_SHARED:BOOL=TRUE -DOPENEXR_INCLUDE_DIR:PATH=/usr/x86_64-pc-linux-gnu/include/OpenEX...

Read more...

Revision history for this message
tmodes (tmodes) wrote :

I had no time to look into the asserts.

But some comments after a first look:
* You are adding many parameters with default settings. This makes reading the command line more complicated than needed.
* The command lines are very long. No sure if all settings are really needed. Do you really need all your user defined changes?
* The settings will result in crashes when running under Wayland because you disabled all settings which are added to support this window manager.
* Using -DCMAKE_BUILD_TYPE:STRING=None is completely unsupported. I think only the default build types Debug, Release, RelWithDebInfo and MinSizeRel are supported by the underlying CMake modules (shipped with CMake). And Hugin does not add any additional build types. So passing this build type can result in unwanted side effects. I strongly discourage from using the build type and instead stick with the standard build types.

Revision history for this message
tmodes (tmodes) wrote :

The assert should now be fixed in default branch.

My comments in #4 are still valid. So there is still some room for improvement in your build script.

Changed in hugin:
milestone: none → 2024.0beta1
status: Incomplete → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.