hugin 2015.0.0-beta1 throws ASSERT INFO; invalid list ctrl item index in SetItem when deleteing a mask

Bug #1451172 reported by Stefan Peter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
Undecided
Unassigned

Bug Description

In hugin 2015.0.0-Beta1, when deleting a mask, the following is thrown

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

BACKTRACE:
[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_signal_emit_valist
[19] g_signal_emit
[20] g_closure_invoke
[21] g_signal_emit_valist
[22] g_signal_emit
[23] g_closure_invoke
[24] g_signal_emit_valist
[25] g_signal_emit
[26] gtk_propagate_event
[27] gtk_main_do_event
[28] g_main_context_dispatch
[29] g_main_loop_run
[30] gtk_main
[31] wxGUIEventLoop::DoRun()
[32] wxEventLoopBase::Run()
[33] wxAppConsoleBase::MainLoop()
[34] wxEntry(int&, wchar_t**)
[35] main
[36] __libc_start_main
[37] _start

This is under Ubuntu 14.04 LTS using 2015.0.0~beta1+dfsg-0ubuntu2~trusty from
https://launchpad.net/~hugin/+archive/ubuntu/next.

Please note that this version already has
6903:aace4a6969bc : Fixes a further assert message
and
6904:213b546a477e: Fixes crash in cp editor [1449065]
applied

With kind regards

Stefan Peter

Revision history for this message
tmodes (tmodes) wrote :

I can't reproduce the issue. Tested on 2 different systems: Windows and Linux (both with wxWidgets 3.x).

Could you provide the project file and mention with mask you are deleting (image and mask number) when you get the assert message?
Maybe it is a coincidence of several different issues.
Is the option show extend of masks and crops switched on or off?

Revision history for this message
Stefan Peter (s-peter-deactivatedaccount) wrote : Re: [Bug 1451172] Re: hugin 2015.0.0-beta1 throws ASSERT INFO; invalid list ctrl item index in SetItem when deleteing a mask
Download full text (4.5 KiB)

On 04.05.2015 17:36, tmodes wrote:
> I can't reproduce the issue. Tested on 2 different systems: Windows and
> Linux (both with wxWidgets 3.x).

The following is done in "Expert mode" if this makes a difference.

I can reproduce this easily in 2015.0.0-beta 1:
o Create a new project
o Add two images
o Add a mask to the second image
o save the project (attached as
o press "Delete mask" in Masks

and I immediately get this:
ASSERT INFO:
../src/generic/listctrl.cpp(3367): assert "litem >= 0 && (size_t)litem <
GetItemCount()" failed in SetItemState(): invalid list ctrl item index
in SetItem

BACKTRACE:
[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_signal_emit_valist
[19] g_signal_emit
[20] g_closure_invoke
[21] g_signal_emit_valist
[22] g_signal_emit
[23] g_closure_invoke
[24] g_signal_emit_valist
[25] g_signal_emit
[26] gtk_propagate_event
[27] gtk_main_do_event
[28] g_main_context_dispatch
[29] g_main_loop_run
[30] gtk_main
[31] wxGUIEventLoop::DoRun()
[32] wxEventLoopBase::Run()
[33] wxAppConsoleBase::MainLoop()
[34] wxEntry(int&, wchar_t**)
[35] main
[36] __libc_start_main
[37] _start

I can reproduce this by
o loading the attached pto
o changing to the Masks tab
o selecting image 1
o selecting '0 Exclude region'
o pressing the "Delete mask" button

>
> Could you provide the project file and mention with mask you are deleting (image and mask number) when you get the assert message?
> Maybe it is a coincidence of several different issues.

I will try if I can reproduce this with the master. Maybe one of the
fixes you applied in the meantime has an influence.

> Is the option show extend of masks and crops switched on or off?

it is disabled in my case. However, enabling it doe snot change the
assert message:
ASSERT INFO:
../src/generic/listctrl.cpp(3367): assert "litem >= 0 && (size_t)litem <
GetItemCount()" failed in SetItemState(): invalid list ctrl item index
in SetItem

BACKTRACE:
[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::a...

Read more...

Revision history for this message
Stefan Peter (s-peter-deactivatedaccount) wrote :

On 04.05.2015 20:03, Stefan Peter wrote:
> On 04.05.2015 17:36, tmodes wrote:
>> I can't reproduce the issue. Tested on 2 different systems: Windows and
>> Linux (both with wxWidgets 3.x).

I can still reproduce this with
hugin 2015.1.0+hg6912+dfsg-0ubuntu1~trusty
currently available from
https://launchpad.net/~hugin/+archive/ubuntu/nightly

And I really wonder why nobody else has caught these. Maybe I do
something wrong?

With kind regards

Stefan Peter

--
Any technology that does not appear magical is insufficiently advanced."
~ Gregory Benford

Revision history for this message
tduell (tduell-iinet) wrote :

I can't reproduce the problem here, system as follows...

Operating System: Linux 3.19.5-200.fc21.x86_64 x86_64
Architecture: 64 bit
Free memory: 81615818080 kiB

Hugin
Version: 2015.1.0.575022c1f81d
Path to resources: /usr/share/hugin/xrc/
Path to data: /usr/share/hugin/data/
Hugins camera and lens database: /home/terry/.hugindata/camlens.db
Multi-threading using C++11 std::thread and OpenMP

Libraries
wxWidgets: 2.8.12.0
libpano13: 2.9.19
Boost: 1.55.0
Exiv2: 0.24
SQLite3: 3.8.9

Revision history for this message
tmodes (tmodes) wrote :

@Stefan: please try if changeset c0ae9038be6 fixes the issue (just guessing). Also with your project file I can't reproduce the issue.

Remaining issues: wxWidgets version, GTK version, window manager ??? But this is a wide field and would require a lot of testing.

@Terry: thanks for testing. But with wxWidgets 2.8 you will need a debug version to get the assert message.

Just for information:
wxWidgets 2.8: assert messages are only shown in debug build
wxWidgets 3.x: assert messages are also shown in release build (this is the reason we are getting now often the bug reports with the assert messages)

Revision history for this message
Stefan Peter (s-peter-deactivatedaccount) wrote :

Hi Thomas

On 05.05.2015 18:48, tmodes wrote:
> @Stefan: please try if changeset c0ae9038be6 fixes the issue (just
> guessing). Also with your project file I can't reproduce the issue.
>

I can no longer reproduce this using

Operating System: Linux 3.13.0-51-generic x86_64
Architecture: 64 bit
Free memory: 11436008 kiB

Hugin
Version: 2015.1.0.c0ae9038be6b
Path to resources: /usr/share/hugin/xrc/
Path to data: /usr/share/hugin/data/
Hugins camera and lens database: /home/stefan/.hugindata/camlens.db
Multi-threading using C++11 std::thread and OpenMP

Libraries
wxWidgets: wxWidgets 3.0
wxWidgets Library (wxGTK port)
Version 3.0.0 (Unicode: wchar_t, debug level: 1),
compiled at Dec 2 2013 15:56:33

Runtime version of toolkit used is 2.24.
Compile-time GTK+ version is 2.24.22.

libpano13: 2.9.19
Boost: 1.54.0
Exiv2: 0.23
SQLite3: 3.8.2
Vigra: 1.10.0

available currently from
https://launchpad.net/~hugin/+archive/ubuntu/nightly/+packages

Thanks a bunch !

With kind regards
Stefan Peter

--
Any technology that does not appear magical is insufficiently advanced."
~ Gregory Benford

Revision history for this message
tmodes (tmodes) wrote :

Thanks for testing. I transplanted the changeset to 2015.0 branch.

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