Hallo,
ich habe ein Problem bei meinem Ingame Wiki, wenn ich die game mit zusätzlichen flags compile, habe ich einen direkten Absturz wenn die Droptable im Wiki enthalten ist.
mob_drop_item.txt
special_item_group.txt
folgender Fehler kommt dann zum Vorschein :
Code
- Program terminated with signal SIGSEGV, Segmentation fault.
- Address not mapped to object.
- #0 DESC::GetCharacter (this=0x6e656c65) at ./desc.h:105
- 105 ./desc.h: No such file or directory.
- [Current thread is 1 (LWP 101292)]
- (gdb) bt full
- #0 DESC::GetCharacter (this=0x6e656c65) at ./desc.h:105
- No locals.
- #1 0x080bf38e in CHARACTER::GetLanguage (this=0x2b9d5a50) at char.cpp:9127
- No locals.
- #2 0x08301c58 in ITEM_MANAGER::GetWikiItemBaseRefineName (this=0xffffbd90, dwVnum=30575) at item_manager.cpp:2310
- ch = 0x2b9d5a50
- tbl = 0x2d0b5f12
- p = 0x2b9d5a50 ""
- sFirstItemName = {<std::__1::__basic_string_common<true>> = {<No data fields>}, static __short_mask = 1, static __long_mask = 1,
- __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__cap_ = 4294932016, __size_ = 4294932028, __data_ = 0xffff7640 "ow"}, __s = {{__size_ = 48 '0', __lx = 48 '0'},
- __data_ = "v\377\377<v\377\377@v\377\377"}, __r = {__words = {4294932016, 4294932028,
- 4294932032}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<No data fields>}, <No data fields>}, <No data fields>}, static npos = 4294967295}
- #3 0x0830137b in ITEM_MANAGER::GetWikiItemStartRefineVnum (this=0xffffbd90, dwVnum=30575) at item_manager.cpp:2284
- baseItemName = {<std::__1::__basic_string_common<true>> = {<No data fields>}, static __short_mask = 1, static __long_mask = 1,
- __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__cap_ = 4294931480, __size_ = 4294931472, __data_ = 0x2d8d93ac "ow"}, __s = {{__size_ = 24 '\030',
- __lx = 24 '\030'}, __data_ = "t\377\377\020t\377\377\254\223\215-"}, __r = {__words = {4294931480, 4294931472,
- 764253100}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<No data fields>}, <No data fields>}, <No data fields>}, static npos = 4294967295}
- manage_vnum = 4294931472
- #4 0x08533dd0 in ITEM_MANAGER::ReadMonsterDropItemGroup (this=0xffffbd90, c_pszFileName=0xffffa7e4 "locale/europe/mob_drop_item.txt",
- isReloading=false) at item_manager_read_tables.cpp:994
- dwPct = 700000
- pTableTemp = 0x2d0b5f12
- dwItemVnum = 30575
- iCount = 1
- tbl = 0x2b9d5a50
- currVnum = 30575
- name = @0x2d7dae80: {<std::__1::__basic_string_common<true>> = {<No data fields>}, static __short_mask = 1, static __long_mask = 1,
- __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__cap_ = 892351242, __size_ = 13623, __data_ = 0x0}, __s = {{__size_ = 10 '\n', __lx = 10 '\n'},
- __data_ = "30575\000\000\000\000\000"}, __r = {__words = {892351242, 13623,
- 0}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<No data fields>}, <No data fields>}, <No data fields>}, static npos = 4294967295}
- fPct = 70
- startRefineVnum = 0
- origin_info = {vnum = 8467, is_mob = true}
- buf = "2\000}-"
- k = 2
- pkLevelItemGroup = 0x2d8d9160
- stName = {<std::__1::__basic_string_common<true>> = {<No data fields>}, static __short_mask = 1, static __long_mask = 1,
- __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__cap_ = 0, __size_ = 0, __data_ = 0x0}, __s = {{__size_ = 0 '\000', __lx = 0 '\000'},
- __data_ = "\000\000\000\000\000\000\000\000\000\000"}, __r = {__words = {0, 0,
- 0}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<No data fields>}, <No data fields>}, <No data fields>}, static npos = 4294967295}
Ich denke dass es an folgender Zeile liegt weil dort der NULL Wert zurückgegeben wird
Code
- std::string ITEM_MANAGER::GetWikiItemBaseRefineName(DWORD dwVnum)
- {
- LPCHARACTER ch;
- if(!ch)
- return "";
- auto* tbl = GetTable(dwVnum);
- if (!tbl)
- return "";
- auto* p = const_cast<char*>(strrchr(tbl->szLocaleName[ch->GetLanguage()], '+'));
- if (!p)
- return "";
- std::string sFirstItemName(tbl->szLocaleName[ch->GetLanguage()],
- (tbl->szLocaleName[ch->GetLanguage()] + (p - tbl->szLocaleName[ch->GetLanguage()])));
- return sFirstItemName;
- }
wäre um jede Hilfe dankbar