Можно ли присваивать AlternateFileName нулевой адрес?

Место, где разработчики плагинов могут поделиться своим опытом.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

Latest post of the previous page:

Еще чуть точнее:
Far30b4584.x64.20160320.7z - не падает
Far30b4589.x64.20160322.7z - падает
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Можно ли присваивать AlternateFileName нулевой адрес?

Post by DrKnS »

NightRoman wrote: Под отладчиком пишет, что память испорчена, других деталей у меня нет. С исходниками Фара, может, понятнее будет.
У меня не падает, поэтому предлагаю воспользоваться этим способом.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

Попробую. Но займет время, на работе сорсфорж, кажется заблокирован. А дома тоже не падает (и только 32-бит, может, поэтому).
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

Принес сорсы на работу, собираю в студии (2015.2), получаю ошибку

Code: Select all

Error	C2338	/RTCc rejects conformant code, so it isn't supported by the C++ Standard Library. Either remove this compiler option, or define _ALLOW_RTCc_IN_STL to acknowledge that you have received this warning.	far	C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h	71	
Что с ней делать?
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

Определил _ALLOW_RTCc_IN_STL, построилось. Но все равно настораживает. Что это?
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

Падает стабильно, все время с подобным стеком. Это как-то поможет? Если нет, то что еще могу сделать?

Code: Select all

>	Far.exe!issue_debug_notification(const wchar_t * const message=0x00007ff6242eab00)  Line 125	C++
 	Far.exe!__acrt_report_runtime_error(const wchar_t * const message=0x00007ff6242eab00)  Line 142 + 0xa bytes	C++
 	Far.exe!abort()  Line 61	C++
 	Far.exe!common_assert_to_stderr_direct(const wchar_t * const expression=0x00007ff62416f218, const wchar_t * const file_name=0x00007ff62416f1f8, const unsigned int line_number=224)  Line 124	C++
 	Far.exe!common_assert_to_stderr<wchar_t>(const wchar_t * const expression=0x00007ff62416f218, const wchar_t * const file_name=0x00007ff62416f1f8, const unsigned int line_number=224)  Line 142	C++
 	Far.exe!common_assert<wchar_t>(const wchar_t * const expression=0x00007ff62416f218, const wchar_t * const file_name=0x00007ff62416f1f8, const unsigned int line_number=224, void * const return_address=0x00007ff6237e77c6)  Line 383 + 0x14 bytes	C++
 	Far.exe!_wassert(const wchar_t * const expression=0x00007ff62416f218, const wchar_t * const file_name=0x00007ff62416f1f8, const unsigned int line_number=224)  Line 405	C++
 	Far.exe!memcheck::DebugDeallocator(void * block=0x000000d0279d67b2, memcheck::ALLOCATION_TYPE type=-1484865266)  Line 224 + 0x26 bytes	C++
 	Far.exe!operator delete[](void * block=0x000000d0279d67b2)  Line 339 + 0xf bytes	C++
 	Far.exe!<lambda_fe04213c6c639b25906895b397d40eb7>::operator()(const FileListItem & i={...})  Line 439	C++
 	Far.exe!std::_For_each<FileListItem const * __ptr64,<lambda_fe04213c6c639b25906895b397d40eb7> >(const FileListItem * _First=0x000000d04123a3d0, const FileListItem * _Last=0x000000d04123ee30, FileList::DeleteListData::__l2::<lambda_fe04213c6c639b25906895b397d40eb7> & _Func=)  Line 24 + 0xf bytes	C++
 	Far.exe!std::for_each<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<FileListItem> > >,<lambda_fe04213c6c639b25906895b397d40eb7> >(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<FileListItem> > > * _First=0x000000d02524dd78 {strName={...} strShortName={...} m_Owner={...} ...}, std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<FileListItem> > > * _Last=0x000000d02524dd58 {strName={...} strShortName={...} m_Owner={...} ...}, FileList::DeleteListData::__l2::<lambda_fe04213c6c639b25906895b397d40eb7> _Func={...})  Line 34	C++
 	Far.exe!FileList::DeleteListData(std::vector<FileListItem,std::allocator<FileListItem> > & ListData=[...](...)  Line 442	C++
 	Far.exe!<lambda_2e32091be3b561a44edd6db8e1f65477>::operator()(FileList::PrevDataItem & i={...})  Line 5435	C++
 	Far.exe!std::_For_each<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<FileList::PrevDataItem> > >,<lambda_2e32091be3b561a44edd6db8e1f65477> >(std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<FileList::PrevDataItem> > > _First={...}, std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<FileList::PrevDataItem> > > _Last={...}, FileList::ClearAllItem::__l2::<lambda_2e32091be3b561a44edd6db8e1f65477> & _Func=)  Line 24 + 0x17 bytes	C++
 	Far.exe!std::for_each<std::_List_iterator<std::_List_val<std::_List_simple_types<FileList::PrevDataItem> > >,<lambda_2e32091be3b561a44edd6db8e1f65477> >(std::_List_iterator<std::_List_val<std::_List_simple_types<FileList::PrevDataItem> > > * _First=0x000000d02524dfa8 {strPrevName={...} PrevListData=[...](... PrevTopFile=34 }, std::_List_iterator<std::_List_val<std::_List_simple_types<FileList::PrevDataItem> > > * _Last=0x000000d02524df88 {strPrevName={...} PrevListData=[...](... PrevTopFile=-842150451 }, FileList::ClearAllItem::__l2::<lambda_2e32091be3b561a44edd6db8e1f65477> _Func={...})  Line 34	C++
 	Far.exe!FileList::ClearAllItem()  Line 5436	C++
 	Far.exe!FileList::~FileList()  Line 416 + 0xa bytes	C++
 	Far.exe!FileList::`scalar deleting destructor'()  + 0x2c bytes	C++
 	Far.exe!std::_Ref_count_obj<FileList>::_Destroy()  Line 913 + 0x21 bytes	C++
 	Far.exe!std::_Ref_count_base::_Decref()  Line 113	C++
 	Far.exe!std::_Ptr_base<Panel>::_Decref()  Line 339	C++
 	Far.exe!std::shared_ptr<Panel>::~shared_ptr<Panel>()  Line 567 + 0xa bytes	C++
 	Far.exe!PluginManager::CommandsMenu(int ModalType=1, int StartPos=0, const wchar_t * HistoryName=0x0000000000000000)  Line 1599 + 0x18 bytes	C++
 	Far.exe!Manager::PluginsMenu()  Line 897	C++
 	Far.exe!Manager::ProcessKey(Manager::Key key={...})  Line 749	C++
 	Far.exe!Manager::ProcessMainLoop()  Line 655	C++
 	Far.exe!Manager::EnterMainLoop()  Line 623	C++
 	Far.exe!MainProcess(const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & EditName={...}, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & ViewName={...}, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & DestName1={...}, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & DestName2={...}, int StartLine=-1, int StartChar=-1)  Line 290	C++
 	Far.exe!mainImpl(const range<wchar_t * *> & Args={...})  Line 772 + 0x53 bytes	C++
 	Far.exe!wmain(int Argc=1, wchar_t * * Argv=0x000000d0252f1bd0)  Line 824 + 0x3b bytes	C++
 	Far.exe!invoke_main()  Line 80	C++
 	Far.exe!__scrt_common_main_seh()  Line 255 + 0x5 bytes	C++
 	Far.exe!__scrt_common_main()  Line 300	C++
 	Far.exe!wmainCRTStartup()  Line 17	C++
 	kernel32.dll!00007ff84ca816ad() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	
 	ntdll.dll!00007ff84f0854e4() 	
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Можно ли присваивать AlternateFileName нулевой адрес?

Post by DrKnS »

NightRoman wrote: Определил _ALLOW_RTCc_IN_STL, построилось. Но все равно настораживает. Что это?
Эпично.
Похоже на новшества Update 2 (у нас ещё Update 1) - заметание мусора под ковёр вместо правки багов в библиотеке.
Выключи Smaller Type Check в С/С++ - Code Generation.
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Можно ли присваивать AlternateFileName нулевой адрес?

Post by DrKnS »

NightRoman wrote: что еще могу сделать?
Это уже сильно лучше, но покажи ещё сам ассерт (он в консоль выводится).
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

Code: Select all

> Assertion failed: Info->AllocationType == type, file farrtl.cpp, line 224
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Можно ли присваивать AlternateFileName нулевой адрес?

Post by DrKnS »

И сами Info->AllocationType & type, пожалуйста.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

DrKnS wrote:И сами Info->AllocationType & type, пожалуйста.
Локальные данные DebugDeallocator для двух падений:

Code: Select all

-		Info	0x0000000a83d4efe2 {AllocationType=19310428 Line=-201850880 File=0xf18000007ff62416 <Bad Ptr> ...}	memcheck::MEMINFO * const
		AllocationType	19310428	memcheck::ALLOCATION_TYPE
		Line	-201850880	int
+		File	0xf18000007ff62416 <Bad Ptr>	const char *
+		Function	0x007400007ff62416 <Bad Ptr>	const char *
		Size	10470869133636403200	unsigned __int64
+		prev	0xea000000000a83ff {AllocationType=??? Line=??? File=??? ...}	memcheck::MEMINFO *
+		next	0x00200000000a9d10 {AllocationType=??? Line=??? File=??? ...}	memcheck::MEMINFO *
		Info->AllocationType	19310428	memcheck::ALLOCATION_TYPE
		realBlock	0x0000000a83d4efe2	void *
		type	-1484865266	memcheck::ALLOCATION_TYPE
---

-		Info	0x000000d5021ab0a2 {AllocationType=19310428 Line=-201850880 File=0xf18000007ff62416 <Bad Ptr> ...}	memcheck::MEMINFO * const
		AllocationType	19310428	memcheck::ALLOCATION_TYPE
		Line	-201850880	int
+		File	0xf18000007ff62416 <Bad Ptr>	const char *
+		Function	0x007400007ff62416 <Bad Ptr>	const char *
		Size	5737585925270011904	unsigned __int64
+		prev	0x32a0000000d501e4 {AllocationType=??? Line=??? File=??? ...}	memcheck::MEMINFO *
+		next	0x0020000000d5023c {AllocationType=??? Line=??? File=??? ...}	memcheck::MEMINFO *
		Info->AllocationType	19310428	memcheck::ALLOCATION_TYPE
		realBlock	0x000000d5021ab0a2	void *
		type	-1484865266	memcheck::ALLOCATION_TYPE
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Можно ли присваивать AlternateFileName нулевой адрес?

Post by DrKnS »

Я стек повторил, но у меня там всё ок.
Посмотри ещё на содержимое const FileListItem& i в Far.exe!<lambda_fe04213c6c639b25906895b397d40eb7>::operator()(const FileListItem & i={...}) Line 439 C++, подозреваю, там будет мусор.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

Там что-то такое

Code: Select all

-		i	{strName={...} strShortName={...} m_Owner={...} ...}	const FileListItem &
+		detail::FileListItemPod	{CreationTime={...} AccessTime={...} WriteTime={...} ...}	detail::FileListItemPod
+		strName	{npos=18446744073709551615 }	std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
+		strShortName	{npos=18446744073709551615 }	std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
+		m_Owner	{npos=18446744073709551615 }	std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
		m_NumberOfLinks	4294967294	unsigned long
		m_NumberOfStreams	4294967294	unsigned long
		m_StreamsSize	18446744073709551614	unsigned __int64
+		m_ContentData	{...}	std::unique_ptr<std::unordered_map<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::hash<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >,std::equal_to<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >,std::allocator<std::pair<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > const ,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > >,std::default_delete<std::unordered_map<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::hash<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >,std::equal_to<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >,std::allocator<std::pair<std::basic_string<wchar_t,std::char_traits<wchar_t
+		i.CustomColumnData	0x0000000000000000	wchar_t * *
		i.CustomColumnNumber	0	unsigned __int64
+		i.DizText	0x00000019ac7f80c2 "2 interesting tools scripts"	const wchar_t *
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

А! Кое-что подметил

Code: Select all

i.DizText   0x00000019ac7f80c2 "2 interesting tools scripts"   const wchar_t *
Одна из папок в TEMP имеет описание "2 interesting tools scripts". Если это описания я убираю, то падать перестает. Добавляю, опять начинает падать.
User avatar
NightRoman
Posts: 6184
Joined: Fri 18 Aug, 2006 13:52
Location: Cambridge, UK
Has thanked: 32 times
Been thanked: 62 times
Contact:

Можно ли присваивать AlternateFileName нулевой адрес?

Post by NightRoman »

То есть для воспроизведения, похоже, дополнительно требуется

1. наличие описания в папке C:\TEMP
2. режим панели тоже должен быть с описаниями
3. 64-бит

Если убираю 1, 2, или 3, то вроде не падает.
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Можно ли присваивать AlternateFileName нулевой адрес?

Post by DrKnS »

Да, это оно. 4618.
Post Reply

Return to “Разработка плагинов”