View Issue Details

IDProjectCategoryView StatusLast Update
0003812Far ManagerPlugins APIpublic2020-07-27 19:18
Reporterctapmex Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status newResolutionopen 
Product Version3.0 
Summary0003812: работа api при выходе из far
DescriptionПри выходе из Far, если в фоне остался хотя бы один открытый редактор, происходит падение. Источником которого является colorer. Стек ниже.
Причина в том, что EditorControl(ECTL_GETINFO ) возвращает false. Да, правильнее такой ответ обрабатывать. Но это приведет к отображению msgbox при закрытии far, и то если вызов данного api не вызовет ошибку.
тут скорее ошибка в том, что far не посылает сообщений плагинам при выходе об уничтожении редакторов. По стеку получаем что сразу после удаления windowmanager в редактор приходят события redraw. Плагин при обработке пытается вызвать api, а оно не работает в виду удаленного windowmanager

поведение достаточно старое. проверил сборки за несколько месяцев - везде воспроизводится.

Steps To Reproducecolorer <=1.3.15 или 1.3.18
1. запустить far
2. открыть в редакторе любой файл
3. перейти на панели
4. f10 и подтвердить выход из far
Additional Information
                                                                                                                                                       Exception: 0xC0000094 - EXCEPTION_INT_DIVIDE_BY_ZERO
Details:   {ИСКЛЮЧЕНИЕ}  Деление на ноль при целочисленной операции.
errno:     0x00000000 - No error
LastError: 0x00000012 - Больше файлов не осталось.
NTSTATUS:  0x80000006 - {Больше нет файлов}  Не найдены другие файлы, соответствующие заданному шаблону.
Address:   0x000C40FC - colorer.dll!BaseEditor::validate
Function:  ProcessEditorEventW
Source:    C:\Work\code\FarColorer\libs\colorer\src\colorer\editor\BaseEditor.cpp:459
File:      C:\Work\code\sandbox\Far_debug\Plugins\FarColorer\bin\colorer.dll
Plugin:    FarColorer 1.3.17.0 (Syntax highlighting in Far editor, Igor Ruskih, Dobrunov Aleksey, Eugene Efremov)
Far:       3.0.0.5645 (Private) x64 (bba2935)
OS:        10.0.19041.2.0.0.256.1 (version 2004, OS build 19041.388)

0x000C40FC colorer.dll!BaseEditor::validate (C:\Work\code\FarColorer\libs\colorer\src\colorer\editor\BaseEditor.cpp:459)
0x000C3EB5 colorer.dll!BaseEditor::getLineRegions (C:\Work\code\FarColorer\libs\colorer\src\colorer\editor\BaseEditor.cpp:379)
0x000C5811 colorer.dll!BaseEditor::getPairMatch (C:\Work\code\FarColorer\libs\colorer\src\colorer\editor\BaseEditor.cpp:225)
0x000C39C8 colorer.dll!BaseEditor::searchLocalPair (C:\Work\code\FarColorer\libs\colorer\src\colorer\editor\BaseEditor.cpp:259)
0x00042BEB colorer.dll!FarEditor::editorEvent (C:\Work\code\FarColorer\src\FarEditor.cpp:721)
0x0007BB5C colorer.dll!FarEditorSet::editorEvent (C:\Work\code\FarColorer\src\FarEditorSet.cpp:548)
0x000A1F91 colorer.dll!ProcessEditorEventW (C:\Work\code\FarColorer\src\pcolorer.cpp:131)
0x00872A85 Far.exe!Plugin::ExecuteFunctionSeh<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &> (C:\Work\code\FarManager\far\plclass.hpp:339)
0x0089BDEC Far.exe!`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>::operator() (C:\Work\code\FarManager\far\plclass.hpp:361)
0x0089F777 Far.exe!`seh_invoke<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`seh_invoke_with_ui<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`5'::<lambda_1>::operator() (C:\Work\code\FarManager\far\exception_handler.hpp:85)
0x0087926C Far.exe!std::_Invoker_functor::_Call<`seh_invoke<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`seh_invoke_with_ui<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`5'::<lambda_1> const &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1612)
0x0088434C Far.exe!std::invoke<`seh_invoke<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`seh_invoke_with_ui<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`5'::<lambda_1> const &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1612)
0x008A0029 Far.exe!`function_ref<void __cdecl(void)>::function_ref<void __cdecl(void)><`seh_invoke<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`seh_invoke_with_ui<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`5'::<lambda_1>,0>'::`1'::<lambda_27_>::operator() (C:\Work\code\FarManager\far\common\function_ref.hpp:54)
0x0085E366 Far.exe!_Closure_wrapper_c29936e6_25::<lambda_invoker_cdecl> (C:\Work\code\FarManager\far\common\function_ref.hpp:49)
0x00487F64 Far.exe!function_ref<void __cdecl(void)>::operator() (C:\Work\code\FarManager\far\common\function_ref.hpp:68)
0x0049250F Far.exe!detail::seh_invoke_impl (C:\Work\code\FarManager\far\exception_handler.cpp:1015)
0x008881BD Far.exe!seh_invoke<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`seh_invoke_with_ui<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> >'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> > (C:\Work\code\FarManager\far\exception_handler.hpp:95)
0x0088B08F Far.exe!seh_invoke_with_ui<`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_1>,`Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &>'::`2'::<lambda_2> > (C:\Work\code\FarManager\far\exception_handler.hpp:104)
0x0086E005 Far.exe!Plugin::ExecuteFunction<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo * &> (C:\Work\code\FarManager\far\plclass.hpp:367)
0x008A9F72 Far.exe!Plugin::ProcessEditorEvent (C:\Work\code\FarManager\far\plclass.cpp:821)
0x00990BCC Far.exe!PluginManager::ProcessEditorEvent (C:\Work\code\FarManager\far\plugins.cpp:835)
0x00434162 Far.exe!Editor::ShowEditor (C:\Work\code\FarManager\far\editor.cpp:311)
0x0040F994 Far.exe!Editor::DisplayObject (C:\Work\code\FarManager\far\editor.cpp:234)
0x00A0A3AD Far.exe!SimpleScreenObject::Show (C:\Work\code\FarManager\far\scrobj.cpp:86)
0x004D7E80 Far.exe!FileEditor::DisplayObject (C:\Work\code\FarManager\far\fileedit.cpp:813)
0x00A0A3AD Far.exe!SimpleScreenObject::Show (C:\Work\code\FarManager\far\scrobj.cpp:86)
0x00A0A2D5 Far.exe!ScreenObject::Show (C:\Work\code\FarManager\far\scrobj.cpp:129)
0x004EA6EC Far.exe!FileEditor::Show (C:\Work\code\FarManager\far\fileedit.cpp:804)
0x00DCCDA8 Far.exe!window::Refresh (C:\Work\code\FarManager\far\window.cpp:87)
0x007A567B Far.exe!Manager::RefreshCommit (C:\Work\code\FarManager\far\manager.cpp:1085)
0x007A5160 Far.exe!Manager::RefreshAllCommit (C:\Work\code\FarManager\far\manager.cpp:1183)
0x007A001C Far.exe!Manager::DoActivation (C:\Work\code\FarManager\far\manager.cpp:1056)
0x0079F41E Far.exe!Manager::DeleteCommit (C:\Work\code\FarManager\far\manager.cpp:999)
0x0078970D Far.exe!std::_Invoker_pmf_pointer::_Call<void (__cdecl Manager::*)(std::shared_ptr<window> const &),Manager * const &,std::shared_ptr<window> const &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1612)
0x00793E58 Far.exe!std::invoke<void (__cdecl Manager::*const &)(std::shared_ptr<window> const &),Manager * const &,std::shared_ptr<window> const &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1612)
0x0079CE89 Far.exe!`Manager::PushWindow'::`2'::<lambda_1>::operator() (C:\Work\code\FarManager\far\manager.cpp:293)
0x0078939C Far.exe!std::_Invoker_functor::_Call<`Manager::PushWindow'::`2'::<lambda_1> &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1612)
0x00793CFC Far.exe!std::invoke<`Manager::PushWindow'::`2'::<lambda_1> &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1612)
0x007893FC Far.exe!std::_Invoker_ret<void,1>::_Call<`Manager::PushWindow'::`2'::<lambda_1> &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1631)
0x007A96CB Far.exe!std::_Func_impl_no_alloc<`Manager::PushWindow'::`2'::<lambda_1>,void>::_Do_call (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\functional:911)
0x00271A3F Far.exe!std::_Func_class<void>::operator() (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\functional:959)
0x0079ED42 Far.exe!Manager::Commit (C:\Work\code\FarManager\far\manager.cpp:935)
0x0079EC12 Far.exe!Manager::CloseAll (C:\Work\code\FarManager\far\manager.cpp:282)
0x002FBF7A Far.exe!ControlObject::~ControlObject (C:\Work\code\FarManager\far\ctrlobj.cpp:144)
0x0069103C Far.exe!ControlObject::`scalar deleting destructor'
0x0077DAB4 Far.exe!`mainImpl'::`2'::<lambda_2>::operator() (C:\Work\code\FarManager\far\main.cpp:730)
0x0077CCD3 Far.exe!scope_exit::scope_guard<0,`mainImpl'::`2'::<lambda_2> >::~scope_guard<0,`mainImpl'::`2'::<lambda_2> > (C:\Work\code\FarManager\far\common\scope_exit.hpp:76)
0x00785190 Far.exe!mainImpl (C:\Work\code\FarManager\far\main.cpp:752)
0x00785D87 Far.exe!wmain_seh (C:\Work\code\FarManager\far\main.cpp:786)
0x0077D395 Far.exe!`main'::`2'::<lambda_1>::operator() (C:\Work\code\FarManager\far\main.cpp:822)
0x0077D498 Far.exe!`seh_invoke<`main'::`2'::<lambda_1>,`seh_invoke_with_ui<`main'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`7'::<lambda_1>::operator() (C:\Work\code\FarManager\far\exception_handler.hpp:90)
0x0077AC4C Far.exe!std::_Invoker_functor::_Call<`seh_invoke<`main'::`2'::<lambda_1>,`seh_invoke_with_ui<`main'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`7'::<lambda_1> const &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1612)
0x0077BE9C Far.exe!std::invoke<`seh_invoke<`main'::`2'::<lambda_1>,`seh_invoke_with_ui<`main'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`7'::<lambda_1> const &> (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\type_traits:1612)
0x0077D9F9 Far.exe!`function_ref<void __cdecl(void)>::function_ref<void __cdecl(void)><`seh_invoke<`main'::`2'::<lambda_1>,`seh_invoke_with_ui<`main'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`7'::<lambda_1>,0>'::`1'::<lambda_1_>::operator() (C:\Work\code\FarManager\far\common\function_ref.hpp:54)
0x00779516 Far.exe!_Closure_wrapper_35a519c7_1::<lambda_invoker_cdecl> (C:\Work\code\FarManager\far\common\function_ref.hpp:49)
0x00487F64 Far.exe!function_ref<void __cdecl(void)>::operator() (C:\Work\code\FarManager\far\common\function_ref.hpp:68)
0x0049250F Far.exe!detail::seh_invoke_impl (C:\Work\code\FarManager\far\exception_handler.cpp:1015)
0x0077C3FB Far.exe!seh_invoke<`main'::`2'::<lambda_1>,`seh_invoke_with_ui<`main'::`2'::<lambda_1>,`main'::`2'::<lambda_2> >'::`2'::<lambda_1>,`main'::`2'::<lambda_2> > (C:\Work\code\FarManager\far\exception_handler.hpp:91)
0x0077C50F Far.exe!seh_invoke_with_ui<`main'::`2'::<lambda_1>,`main'::`2'::<lambda_2> > (C:\Work\code\FarManager\far\exception_handler.hpp:104)
0x00785F06 Far.exe!main (C:\Work\code\FarManager\far\main.cpp:829)
0x00E1E9F9 Far.exe!invoke_main (d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
0x00E1E8DE Far.exe!__scrt_common_main_seh (d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
0x00E1E79E Far.exe!__scrt_common_main (d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
0x00E1EA89 Far.exe!mainCRTStartup (d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
0x00016FD4 KERNEL32.DLL!BaseThreadInitThunk
0x0004CEC1 ntdll.dll!RtlUserThreadStart
TagsNo tags attached.
Build

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-07-27 19:18 ctapmex New Issue