treesheets icon indicating copy to clipboard operation
treesheets copied to clipboard

Crashes in `FindNextSearchMatch` when called from `OnTabChange`

Open aardappel opened this issue 7 months ago • 4 comments

I've seen this crash log a few times now:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xstring (2492): std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
C:\w\treesheets\src\cell.h (416): treesheets::Cell::FindNextSearchMatch
C:\w\treesheets\src\document.h (2020): treesheets::Document::SearchNext
C:\w\treesheets\src\myframe.h (826): treesheets::MyFrame::OnTabChange

It's an illegal access: ExpCode: 0xC0000005 ExpFlags: 0 ExpAddress: 0x69D4405B

I can't see from the code why it would do this, but it looks like some part of the state is not set up correctly when switching tabs.

aardappel avatar Dec 06 '23 19:12 aardappel

@aardappel How do you reproduce the crash?

tobiolo avatar Dec 07 '23 16:12 tobiolo

Not sure.. it happened at random times when I was using the app as a user in release mode, so only have that log to go on.

My guess is to have something active in the search bar, then switch tabs in some combination..

aardappel avatar Dec 07 '23 19:12 aardappel

I tried to reproduce the issue on Linux (wxGTK) but it does not seem to be a problem there. I will try it out the next time I cross a Windows installation.

tobiolo avatar Dec 08 '23 13:12 tobiolo

Yeah I can repro it either, but wanted us to be aware since it has happened multiple times.. I'll be on the lookout as well.

aardappel avatar Dec 08 '23 17:12 aardappel