2014.0.0 assert errors in hugin and PTBatcherGUI

Bug #1385707 reported by Andreas Metzler
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
Undecided
Unassigned

Bug Description

Hello,

on Debian some of our users still see assertion errors with hugin 2014.0.0 (plus 52_044b08eb6adf_Several_fixes_to_treelistctrl.diff and 53_f88dc95914ae_Use_correct_class_wxStaticBitmap_for_bitmap_controls.diff) either in hugin itself or in PTBatcherGUI:

in https://bugs.debian.org/764759 boris writes:
I'm starting with:

$ hugin IMG_4749.png

open: View -> Panorama Editor

in Panorama Editor:

Select tab: Stitcher
switching to format png (but shouldn't matter)

and click the "Stitch!" botton which triggers (sorry forgot to add this too):

ASSERT INFO:
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype &
/(wxFormatStringSpecifier<T>::value)) == argtype" failed in
/wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
[1] FillPlaceholders(std::map<wxString, wxString, std::less<wxString>,
std::allocator<std::pair<wxString const, wxString> > >&, HuginBase::Panorama
const&)
[2] getDefaultProjectName(HuginBase::Panorama const&, wxString)
[3] MainFrame::OnSaveProjectAs(wxCommandEvent&)
[4] MainFrame::OnSaveProject(wxCommandEvent&)
[5] PanoPanel::DoSendToBatch()
[6] PanoPanel::OnDoStitch(wxCommandEvent&)
[7] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&,
wxEvent&) const
[8] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[9] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[10] wxEvtHandler::TryHereOnly(wxEvent&)
[11] wxEvtHandler::ProcessEventLocally(wxEvent&)
[12] wxEvtHandler::ProcessEvent(wxEvent&)
[13] wxWindowBase::TryAfter(wxEvent&)
[14] wxWindowBase::TryAfter(wxEvent&)
[15] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[16] g_signal_emit_valist
[17] g_signal_emit
[18] g_signal_emit_valist
[19] g_signal_emit
[20] g_closure_invoke
[21] g_signal_emit_valist
[22] g_signal_emit
[23] gtk_propagate_event
[24] gtk_main_do_event
[25] g_main_context_dispatch
[26] g_main_loop_run
[27] gtk_main
[28] wxGUIEventLoop::DoRun()
[29] wxEventLoopBase::Run()
[30] wxAppConsoleBase::MainLoop()
[31] wxEntry(int&, wchar_t**)
[32] main
[33] __libc_start_main
[34] _start

Click: Continue

In the "Save project file" Window
(default filename)

Click: Save

Which triggers:

ASSERT INFO:
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype &
/(wxFormatStringSpecifier<T>::value)) == argtype" failed in
/wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
[1] ProjectListBox::GetAttributeString(int, Project*)
[2] ProjectListBox::AppendProject(Project*)
[3] ProjectListBox::Fill(Batch*)
[4] BatchFrame::BatchFrame(wxLocale*, wxString)
[5] PTBatcherGUI::OnInit()
[6] wxEntry(int&, wchar_t**)
[7] main
[8] __libc_start_main
[9] _start
-------------------------------

And in
https://bugs.debian.org/766093 Yuri D'Elia says
-------------------------------
Something seems to be broken in either hugin or wxgtk3 right now.

Starting hugin with no existing configuration gives me the following startup
assertion failures:

$ hugin
10:22:20 PM: Debug: Failed to connect to session manager: SESSION_MANAGER environment variable not defined
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): GdkPixbuf-CRITICAL **: gdk_pixbuf_new: assertion 'width > 0' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): GdkPixbuf-CRITICAL **: gdk_pixbuf_new: assertion 'width > 0' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed
(hugin:28839): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed

When trying to stich a panorama, the following assertions are emitted:

/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type
10:24:39 PM: Debug: Failed to connect to session manager: SESSION_MANAGER environment variable not defined
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type
.../include/wx/datetime.h(1740): assert "IsValid()" failed in GetTicks(): invalid wxDateTime
.../src/common/datetime.cpp(1392): assert "IsValid()" failed in GetTm(): invalid wxDateTime
.../include/wx/datetime.h(1740): assert "IsValid()" failed in GetTicks(): invalid wxDateTime
.../include/wx/datetime.h(1740): assert "IsValid()" failed in GetTicks(): invalid wxDateTime
.../src/common/datetime.cpp(1392): assert "IsValid()" failed in GetTm(): invalid wxDateTime
.../include/wx/datetime.h(1740): assert "IsValid()" failed in GetTicks(): invalid wxDateTime
.../src/common/datetime.cpp(1392): assert "IsValid()" failed in GetTm(): invalid wxDateTime
.../include/wx/datetime.h(1740): assert "IsValid()" failed in GetTicks(): invalid wxDateTime
.../src/common/datetime.cpp(1392): assert "IsValid()" failed in GetTm(): invalid wxDateTime
.../include/wx/datetime.h(1740): assert "IsValid()" failed in GetTicks(): invalid wxDateTime

I was thinking that something was broken in libwxgtk3, but I'm also using pgadmin3
and it seems to work just fine.
-------------------------------

Both submitters see these as the messy click-and-confirm assertions. Personally I see the assertions Yuri reports on the starting console, without click-through

cu Andreas

Revision history for this message
tmodes (tmodes) wrote :

Changeset 59938e35626e2a5efb681597047414921bbc5e4d should fix the assert error with wxArgNormalizer in FillPlaceholders and ProjectListBox::GetAttributeString

But I can't reproduce the issue with
.../include/wx/datetime.h(1740): assert "IsValid()" failed in GetTicks(): invalid wxDateTime
.../src/common/datetime.cpp(1392): assert "IsValid()" failed in GetTm(): invalid wxDateTime
Here I need more information (maybe a longer backtrace?)
TIA

tmodes (tmodes)
Changed in hugin:
status: New → Fix Committed
Revision history for this message
tmodes (tmodes) wrote :

Hi Andreas,

just one question: I don't understand why the assert triggers a message at all.

From the documentation (http://docs.wxwidgets.org/stable/group__group__funcmacro__debug.html#ga204cc264ee560b67e6c6467ba8ffee5f )

cite: "Please note that the condition in wxASSERT() should have no side effects because it will not be executed in release mode at all."

So this would mean, that Hugin and/or wxWidgets is build as debug version. This would result in speed penalties and for distributing Hugin should be build as release version (not as debug version).

If Hugin and/or wxWidgets are build as release version and the assert still triggers a message box, this should be investigated and maybe report upstreams to wxWidgets.

Revision history for this message
Laurent Claudel (laurent-claudel) wrote :

I've got the very same issue just after upgrading from Ubuntu 14.04 to 14.10 and using Hugin 2014.0.0.5da69bc383dd (from stable
hugin-builds ppa)

Revision history for this message
Georg Lipps (georg-lipps) wrote :

I also got these assertion messages:

/usr/include/wx-3.0/wx/strvararg.h(451): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

messages can be quit with continue

setup is Ubunto 14.04.2 with Hugin 2014.0.0.5da69bc383dd (installed from Hugin PPA Packagers <email address hidden>)

Error was not present with previous version.

tmodes (tmodes)
Changed in hugin:
milestone: none → 2015.0beta1
status: Fix Committed → Fix Released
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.