View Issue Details

IDProjectCategoryView StatusLast Update
0003721PluginsColorerpublic2019-07-11 20:20
ReporterAlfonZAssigned To 
PrioritynormalSeverityminorReproducibilitysometimes
Status newResolutionopen 
Platformx64OSWindowsOS Version10
Product Version3.0 
Target VersionFixed in Version 
Summary0003721: Nonexisting filetype in settings may cause an exception during initialization
DescriptionIf Colorer's configuration refers to a filetype not existing in the hrc, the following exception may occur on Colorer's initialization.
When opening the editor:
Exception:   0xC0000005 - EXCEPTION_ACCESS_VIOLATION
Details:     Memory at 0000000000000042 could not be read
Address:     0x7FFA99CB40F0 - colorer.dll!ProcessSynchroEventW
Function:    ProcessEditorEventW
Module:      E:\Test\Far30b5421.x64.20190710\Plugins\FarColorer\bin\colorer.dll

Stack:
0x7FFA99CB40F0 colorer.dll!ProcessSynchroEventW
0x7FFA99CA8F3E colorer.dll!ProcessSynchroEventW
0x7FFA99CA3D93 colorer.dll!ProcessSynchroEventW
0x7FFA99CA379F colorer.dll!ProcessEditorEventW
0x7FF6735BA8C6 Far.exe!Plugin::ExecuteFunctionSeh<Plugin::ExecuteStruct<21,1>,ProcessEditorEventInfo 
* &> (c:\src\far\plclass.hpp:367)
0x7FF6735B98EE Far.exe!seh_invoke<<lambda_277908084991edb90e213618db83bbbf>,<lambda_0ad32d823795d3c9cdc4edb585ccd12c>,<lambda_28f4bc79db6ab077e9a910a61553e100> 
> (c:\src\far\exception_handler.hpp:89)
0x7FF6735B6B07 Far.exe!Plugin::ProcessEditorEvent (c:\src\far\plclass.cpp:834)
0x7FF6735E5D9B Far.exe!PluginManager::ProcessEditorEvent (c:\src\far\plugins.cpp:823)
0x7FF67348B96A Far.exe!Editor::ShowEditor (c:\src\far\editor.cpp:288)
0x7FF6734C3B8F Far.exe!FileEditor::DisplayObject (c:\src\far\fileedit.cpp:771)
0x7FF673607A61 Far.exe!ScreenObject::Show (c:\src\far\scrobj.cpp:128)
0x7FF673584628 Far.exe!Manager::RefreshCommit (c:\src\far\manager.cpp:1059)
0x7FF673584AB5 Far.exe!Manager::RefreshAllCommit (c:\src\far\manager.cpp:1156)
0x7FF67358446F Far.exe!Manager::DoActivation (c:\src\far\manager.cpp:1032)
0x7FF673583EB1 Far.exe!Manager::InsertCommit (c:\src\far\manager.cpp:932)
0x7FF673583DD2 Far.exe!Manager::Commit (c:\src\far\manager.cpp:912)
0x7FF6735828BE Far.exe!Manager::EnterMainLoop (c:\src\far\manager.cpp:596)
0x7FF67357AAB6 Far.exe!MainProcess (c:\src\far\main.cpp:316)
0x7FF67357E97D Far.exe!mainImpl (c:\src\far\main.cpp:761)
0x7FF67357EC3D Far.exe!wmain_seh (c:\src\far\main.cpp:805)
0x7FF67357ED60 Far.exe!<lambda_8f2f0bd4b7d1490fa7a6ad6faa2eb08a>::operator() (c:\src\far\main.cpp:840)

0x7FF67357EDAE Far.exe!seh_invoke<<lambda_8f2f0bd4b7d1490fa7a6ad6faa2eb08a>,<lambda_77530d1d64a83d765fd4b1b9db18d042>,<lambda_bfb2e667102826df920419a99d47d7cb> 
> (c:\src\far\exception_handler.hpp:89)
0x7FF67357ED16 Far.exe!main (c:\src\far\main.cpp:847)
0x7FF673660034 Far.exe!__scrt_common_main_seh (d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)

0x7FFAB9E98102 KERNEL32.DLL!BaseThreadInitThunk
0x7FFABA09C5B4 ntdll.dll!RtlUserThreadStart

Minidump is at https://drive.google.com/file/d/1_rx1P6OqFbqlVCMhJMJlnBR6C1zaYGcX/view?usp=sharing

When opening Colorer's configuration:
Exception:   0xC0000005 - EXCEPTION_ACCESS_VIOLATION
Details:     Memory at 0000000000000042 could not be read
Address:     0x7FFA99CB40F0 - colorer.dll!ProcessSynchroEventW
Function:    ConfigureW
Module:      E:\Test\Far30b5421.x64.20190710\Plugins\FarColorer\bin\colorer.dll

Stack:
0x7FFA99CB40F0 colorer.dll!ProcessSynchroEventW
0x7FFA99CA8F3E colorer.dll!ProcessSynchroEventW
0x7FFA99CA3D93 colorer.dll!ProcessSynchroEventW
0x7FFA99CA3728 colorer.dll!ConfigureW
0x7FF6735BBA06 Far.exe!Plugin::ExecuteFunctionSeh<Plugin::ExecuteStruct<17,1>,ConfigureInfo 
* &> (c:\src\far\plclass.hpp:367)
0x7FF6735BA06E Far.exe!seh_invoke<<lambda_a9ad98f4a237e81195541c47d5bf3c7f>,<lambda_14a53f33b06f77a6f4f9156cd024b8b2>,<lambda_260f4e190a442b6bcbebbfb8f81189c4> 
> (c:\src\far\exception_handler.hpp:89)
0x7FF6735B7F67 Far.exe!Plugin::Configure (c:\src\far\plclass.cpp:1053)
0x7FF6735E769A Far.exe!PluginManager::ConfigureCurrent (c:\src\far\plugins.cpp:1174)
0x7FF6735E8468 Far.exe!PluginManager::Configure (c:\src\far\plugins.cpp:1347)
0x7FF673401655 Far.exe!Options::ShellOptions (c:\src\far\config.cpp:3170)
0x7FF673509D4A Far.exe!FilePanels::ProcessKey (c:\src\far\filepanels.cpp:827)
0x7FF6735831D2 Far.exe!Manager::ProcessKey (c:\src\far\manager.cpp:795)
0x7FF673582BDB Far.exe!Manager::ProcessMainLoop (c:\src\far\manager.cpp:626)
0x7FF6735828B6 Far.exe!Manager::EnterMainLoop (c:\src\far\manager.cpp:596)
0x7FF67357AAB6 Far.exe!MainProcess (c:\src\far\main.cpp:316)
0x7FF67357E97D Far.exe!mainImpl (c:\src\far\main.cpp:761)
0x7FF67357EC3D Far.exe!wmain_seh (c:\src\far\main.cpp:805)
0x7FF67357ED60 Far.exe!<lambda_8f2f0bd4b7d1490fa7a6ad6faa2eb08a>::operator() (c:\src\far\main.cpp:840)

0x7FF67357EDAE Far.exe!seh_invoke<<lambda_8f2f0bd4b7d1490fa7a6ad6faa2eb08a>,<lambda_77530d1d64a83d765fd4b1b9db18d042>,<lambda_bfb2e667102826df920419a99d47d7cb> 
> (c:\src\far\exception_handler.hpp:89)
0x7FF67357ED16 Far.exe!main (c:\src\far\main.cpp:847)
0x7FF673660034 Far.exe!__scrt_common_main_seh (d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)

0x7FFAB9E98102 KERNEL32.DLL!BaseThreadInitThunk
0x7FFABA09C5B4 ntdll.dll!RtlUserThreadStart


Tested with FAR v3.0.5421 x64 and v3.0.5423 x64, Colorer v1.2.11.0, Windows 10 64bit.
I wasn't able to reproduce it with FAR v3.0.5423 x86.
Steps To Reproduce1. Import the following farconfig into a new profile:
<?xml version="1.0" encoding="UTF-8"?>
<farconfig version="3.0.5421">
  <pluginsconfig>
    <plugin guid="D2F36B62-A470-418D-83A3-ED7A3710E5B5">
      <hierarchicalconfig>
        <key name="D2F36B62-A470-418D-83A3-ED7A3710E5B5" description="FarColorer">
          
<key name="HrcSettings">
            <key name="foobar">
              <value name="favorite" type="text" value="true"/>
            
</key>
          </key>
        </key>
      </hierarchicalconfig>
    </plugin>
  </pluginsconfig>
</farconfig>

2. Start FAR
3. Open a file in the editor as soon as possible, without doing other actions. (I settled for SaveOldPluginSettings.cmd; that is "End F4" in FAR's main folder.)
4. An exception occurs.

It may be needed to repeat steps 2-4 several times, as the exception occurred only about 25% of times in my testing. (I didn't manage to distill the cause further.)
Alternatively, instead of opening the editor, you can initialize Colorer by opening its configuration (Options, Plugins configuration, FarColorer). The same 25% applies, the stack differs a little.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-07-11 20:20 AlfonZ New Issue