faile assertion when deleting mask

Bug #1698048 reported by clepsdyrae on 2017-06-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I'm getting a failed assertion dialog when trying to delete a mask when there is more than one mask.

To recreate:
* start hugin, add one image, go to masks tab
* add an "exclude region from all images of this lens" mask
* add a second mask
* click "Delete mask"
* failed assertion window appears

If I select the first mask before clicking delete, it works.

Fencepost error?


This is latest nightly on Kubuntu 16.10: 2017.1.0.6a5ba6861da0
libpano13: 2.9.19
Boost: 1.61.0
Exiv2: 0.25
SQLite3: 3.14.1
Vigra: 1.11.0
LittleCMS2: 2.7

Let me know if you have trouble reproducing.




../src/generic/listctrl.cpp(3386): assert "litem >= 0 && (size_t)litem < GetItemCount()" failed in SetItemState(): invalid list ctrl item index in SetItem

[1] wxGenericListCtrl::SetItemState(long, long, long)
[2] MaskEditorPanel::panoramaImagesChanged(HuginBase::Panorama&, std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> > const&)
[3] HuginBase::Panorama::changeFinished(bool)
[4] PanoCommand::PanoCommand::execute()
[5] PanoCommand::CommandHistory::addCommand(PanoCommand::PanoCommand*, bool)
[6] MaskEditorPanel::OnMaskDelete(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] wxWindowBase::TryAfter(wxEvent&)
[16] wxWindowBase::TryAfter(wxEvent&)
[17] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[18] g_closure_invoke
[19] g_signal_emit_valist
[20] g_signal_emit
[21] g_closure_invoke
[22] g_signal_emit_valist
[23] g_signal_emit
[24] g_closure_invoke
[25] g_signal_emit_valist
[26] g_signal_emit
[27] gtk_propagate_event
[28] gtk_main_do_event
[29] g_main_context_dispatch
[30] g_main_loop_run
[31] gtk_main
[32] wxGUIEventLoop::DoRun()
[33] wxEventLoopBase::Run()
[34] wxAppConsoleBase::MainLoop()
[35] wxEntry(int&, wchar_t**)
[36] main
[37] __libc_start_main
[38] _start

tmodes (tmodes) wrote :

> Let me know if you have trouble reproducing.
I can't reproduce the assertion. (Trying on 2 different systems.)
(Who the heck does such a ..., add mask and immediately delete it)

Trying a blind fix in repository.

Changed in hugin:
milestone: none → 2017.0rc2
status: New → Fix Committed
clepsdyrae (myopenid) wrote :

Would my .hugin help? Attached just in case.

> (Who the heck does such a ..., add mask and immediately delete it)

I found the bug by making two exclude-from-all-images-of-this-lens masks: I was using the masks to control where the CP's are placed. After the CPs are placed and the geometry optimized, I have to remove the masks so I can stitch the pano (in this case using it to align an image stack) without excluding that region of the images from the final result.

But more generally, the bug happens (for me) any time I delete the last of any kind of mask from a list of masks. It doesn't need to be done immediately.

Fortunately the workaround is simple: don't delete the last mask. If I delete the first (or second, as long as it is not the last) it works fine. (This is why I guessed it was a fencepost error...)

tmodes (tmodes) wrote :

I can also delete the last mask without an assertion.

clepsdyrae (myopenid) wrote :

Yeah, it works fine in Windows 8.1 for me, just not in linux.

I just tried it in a fresh install in a Kubuntu 16.10 VM... added the nightlies repo, installed hugin, dismissed the help dialog, changed to expert mode, added an image, made two masks, deleted the second, and got the same issue.

tmodes (tmodes) wrote :

I tested also on Fedora. And there were no assertions.

clepsdyrae (myopenid) wrote :

Looks like it's fixed in the latest nightly, thanks!


tmodes (tmodes) on 2017-06-17
Changed in hugin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments