View Issue Details

IDProjectCategoryView StatusLast Update
0000487Far Manager_Commonpublic2008-03-11 16:44
Reporterujos Assigned Toalexy  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.80 alpha 1 
Summary0000487: Memory under FAR_FIND_DATA is removed twice
DescriptionStep to reproduce:
0. Change apiFreeFindData in the following way:

void apiFreeFindData (FAR_FIND_DATA *pData)
{
    assert( NULL != pData );
    assert( NULL != pData->lpwszFileName );
    assert( NULL != pData->lpwszAlternateFileName );

    xf_free (pData->lpwszFileName);
    pData->lpwszFileName = NULL;
    xf_free (pData->lpwszAlternateFileName);
    pData->lpwszAlternateFileName = NULL;
}
dont forget to add #include <cassert> to the top of the farwinapi.cpp file
1. Install 7z plugin.
2. Create archive with dummy text file
3. Enter to the archive
4. Press Alt+F7 and then press Return key. One file should appear in search result
5. Open file by pressing F4 key


After step #5 apiFreeFindData is called twise for the same argument.
Additional InformationCallstack of the first call:
> Far.exe!apiFreeFindData(FAR_FIND_DATA * pData=0x00ac0a00) Line 525 C++
     Far.exe!FindFiles::GetPluginFile(unsigned long ArcIndex=0, PluginPanelItem * PanelItem=0x0012a5c0, const wchar_t * DestPath=0x00a52e70, UnicodeString & strResultName={...}) Line 926 + 0x9 bytes C++
     Far.exe!FindFiles::FindDlgProc(void * hDlg=0x0012ce2c, int Msg=9, int Param1=6, long Param2=65651) Line 1130 + 0x29 bytes C++
     Far.exe!Dialog::DlgProc(void * hDlg=0x0012ce2c, int Msg=9, int Param1=6, long Param2=65651) Line 4861 + 0x1b bytes C++
     Far.exe!Dialog::ProcessKey(int Key=65651) Line 2183 + 0x23 bytes C++
     Far.exe!Manager::ProcessKey(unsigned long Key=65651) Line 920 C++
     Far.exe!Manager::ProcessMainLoop() Line 578 C++
     Far.exe!Manager::ExecuteModal(Frame * Executed=0x0012ce2c) Line 269 C++
     Far.exe!Dialog::Process() Line 4705 C++
     Far.exe!FindFiles::FindFilesProcess() Line 1571 C++
     Far.exe!FindFiles::FindFiles() Line 754 + 0x20 bytes C++
     Far.exe!FilePanels::ProcessKey(int Key=33620086) Line 607 C++
     Far.exe!Manager::ProcessKey(unsigned long Key=33620086) Line 920 C++
     Far.exe!Manager::ProcessMainLoop() Line 578 C++
     Far.exe!Manager::EnterMainLoop() Line 559 C++
     Far.exe!MainProcess(const wchar_t * lpwszEditName=0x00a584d0, const wchar_t * lpwszViewName=0x00a58588, const wchar_t * lpwszDestName1=0x00a58640, const wchar_t * lpwszDestName2=0x00a586f8, int StartLine=-1, int StartChar=-1, int RegOpt=0) Line 273 C++
     Far.exe!wmain(int Argc=1, wchar_t * * Argv=0x00a54788) Line 576 + 0x35 bytes C++
     Far.exe!__tmainCRTStartup() Line 327 + 0x19 bytes C
     Far.exe!wmainCRTStartup() Line 196 C
     kernel32.dll!7c816d4f()
     [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
     kernel32.dll!7c8399f3()
     Far.exe!unaligned_memcmp(const unsigned char * bLHS=0x0075006c, const unsigned char * bRHS=0x002c0073, unsigned int siz=7471216) + 0x2b9 bytes C
     Far.exe!unaligned_memcmp(const unsigned char * bLHS=0x0075006c, const unsigned char * bRHS=0x005f0073, unsigned int siz=3473462) + 0x2b9 bytes C
     Far.exe!unaligned_memcmp(const unsigned char * bLHS=0x006e0061, const unsigned char * bRHS=0x00660069, unsigned int siz=7536741) + 0x2b9 bytes C
     Far.exe!DeleteEmptyKey(HKEY__ * hRoot=0x00000000, const wchar_t * FullKeyName=0x00000000) Line 588 + 0x27 bytes C++






Callstack of the second call:
> Far.exe!apiFreeFindData(FAR_FIND_DATA * pData=0x00ac0a00) Line 525 C++
     Far.exe!FreePanelItemW(PluginPanelItem * PanelItem=0x00ac0a00, int ItemsNumber=1) Line 333 + 0xf bytes C++
     Far.exe!PluginA::FreeFindData(void * hPlugin=0x003a8008, PluginPanelItem * PanelItem=0x00ac0a00, int ItemsNumber=1) Line 1233 + 0xd bytes C++
     Far.exe!PluginManager::FreeFindData(void * hPlugin=0x00a9b3a8, PluginPanelItem * PanelItem=0x00ac0a00, int ItemsNumber=1) Line 759 C++
     Far.exe!FindFiles::GetPluginFile(unsigned long ArcIndex=0, PluginPanelItem * PanelItem=0x0012a5c0, const wchar_t * DestPath=0x00a52e70, UnicodeString & strResultName={...}) Line 936 C++
     Far.exe!FindFiles::FindDlgProc(void * hDlg=0x0012ce2c, int Msg=9, int Param1=6, long Param2=65651) Line 1130 + 0x29 bytes C++
     Far.exe!Dialog::DlgProc(void * hDlg=0x0012ce2c, int Msg=9, int Param1=6, long Param2=65651) Line 4861 + 0x1b bytes C++
     Far.exe!Dialog::ProcessKey(int Key=65651) Line 2183 + 0x23 bytes C++
     Far.exe!Manager::ProcessKey(unsigned long Key=65651) Line 920 C++
     Far.exe!Manager::ProcessMainLoop() Line 578 C++
     Far.exe!Manager::ExecuteModal(Frame * Executed=0x0012ce2c) Line 269 C++
     Far.exe!Dialog::Process() Line 4705 C++
     Far.exe!FindFiles::FindFilesProcess() Line 1571 C++
     Far.exe!FindFiles::FindFiles() Line 754 + 0x20 bytes C++
     Far.exe!FilePanels::ProcessKey(int Key=33620086) Line 607 C++
     Far.exe!Manager::ProcessKey(unsigned long Key=33620086) Line 920 C++
     Far.exe!Manager::ProcessMainLoop() Line 578 C++
     Far.exe!Manager::EnterMainLoop() Line 559 C++
     Far.exe!MainProcess(const wchar_t * lpwszEditName=0x00a584d0, const wchar_t * lpwszViewName=0x00a58588, const wchar_t * lpwszDestName1=0x00a58640, const wchar_t * lpwszDestName2=0x00a586f8, int StartLine=-1, int StartChar=-1, int RegOpt=0) Line 273 C++
     Far.exe!wmain(int Argc=1, wchar_t * * Argv=0x00a54788) Line 576 + 0x35 bytes C++
     Far.exe!__tmainCRTStartup() Line 327 + 0x19 bytes C
     Far.exe!wmainCRTStartup() Line 196 C
     kernel32.dll!7c816d4f()
     [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
     kernel32.dll!7c8399f3()
     Far.exe!unaligned_memcmp(const unsigned char * bLHS=0x0075006c, const unsigned char * bRHS=0x002c0073, unsigned int siz=7471216) + 0x2b9 bytes C
     Far.exe!unaligned_memcmp(const unsigned char * bLHS=0x0075006c, const unsigned char * bRHS=0x005f0073, unsigned int siz=3473462) + 0x2b9 bytes C
     Far.exe!unaligned_memcmp(const unsigned char * bLHS=0x006e0061, const unsigned char * bRHS=0x00660069, unsigned int siz=7536741) + 0x2b9 bytes C
     Far.exe!DeleteEmptyKey(HKEY__ * hRoot=0x00000000, const wchar_t * FullKeyName=0x00000000) Line 588 + 0x27 bytes C++
TagsNo tags attached.
Build429

Activities

alexy

2008-03-10 14:20

administrator   bugnote:0001268

Глюк вижу, тока там всё намного хуже.

alexy

2008-03-10 14:52

administrator   bugnote:0001269

вроде как fixed. 429.

Issue History

Date Modified Username Field Change
2008-03-10 03:35 ujos New Issue
2008-03-10 14:20 alexy Note Added: 0001268
2008-03-10 14:21 alexy Status new => assigned
2008-03-10 14:21 alexy Assigned To => alexy
2008-03-10 14:52 alexy Note Added: 0001269
2008-03-10 14:52 alexy Status assigned => feedback
2008-03-11 16:29 ujos Status feedback => resolved
2008-03-11 16:29 ujos Resolution open => fixed
2008-03-11 16:42 alexy Build => 429
2008-03-11 16:42 alexy Status resolved => closed
2008-03-11 16:44 alexy Fixed in Version => 1.80 alpha 1