Issue information

Issue ID
#5104
Status
Fixed
Severity
High
Started
Hercules Elf Bot
Dec 8, 2011 3:58
Last Post
Hercules Elf Bot
Apr 4, 2012 8:34
Confirmation
N/A

Hercules Elf Bot - Dec 8, 2011 3:58

Originally posted by [b]vBrenth[/b]
I'm currently using 15021, everytime i use the command "reloaditemdb" im getting map-error and then disconnect from the server.

Hercules Elf Bot - Dec 8, 2011 14:42

Originally posted by [b]Ind[/b]
I can't reproduce (started server -> logged in -> did several @reloaditemdb -> nothing crashed). what is the map-error you get? would you be able to get a gdb dump?

Hercules Elf Bot - Dec 8, 2011 16:20

Originally posted by [b]vBrenth[/b]
I am currently using windows...

Hercules Elf Bot - Dec 8, 2011 16:33

Originally posted by [b]vBrenth[/b]
[quote]
C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe caused a Stack Overflow at location 0071f677 in module C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe.

Registers:
eax=00092000 ebx=7efde000 ecx=0004b408 edx=007ca100 esi=0018b5e8 edi=0018b5d0
eip=0071f677 esp=0018b4f4 ebp=0018b4fc iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206

Call stack:
0071F677 C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:0071F677 _chkstk f:\dd\vctools\crt_bld\SELF_X86\crt\src\INTEL\chkstk.asm:99
00562D3C C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:00562D3C atcommand_reloaditemdb c:\users\brenth\desktop\milestonesf\src\map\atcommand.c:4202
0057A364 C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:0057A364 is_atcommand c:\users\brenth\desktop\milestonesf\src\map\atcommand.c:9369
005C0198 C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:005C0198 clif_parse_GlobalMessage c:\users\brenth\desktop\milestonesf\src\map\clif.c:9084
005DB5B4 C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:005DB5B4 clif_parse c:\users\brenth\desktop\milestonesf\src\map\clif.c:15272
0054519D C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:0054519D do_sockets c:\users\brenth\desktop\milestonesf\src\common\socket.c:811
005336FD C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:005336FD main c:\users\brenth\desktop\milestonesf\src\common\core.c:258
00724D39 C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:00724D39 __tmainCRTStartup f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c:278
00724BFF C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:00724BFF mainCRTStartup f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c:189
756A339A C:\Windows\syswow64\kernel32.dll:756A339A BaseThreadInitThunk
77539ED2 C:\Windows\SysWOW64\ntdll.dll:77539ED2 RtlInitializeExceptionChain
77539EA5 C:\Windows\SysWOW64\ntdll.dll:77539EA5 RtlInitializeExceptionChain
[/quote]

I'm getting this error... how can i fix that?

Hercules Elf Bot - Dec 8, 2011 16:34

Originally posted by [b]vBrenth[/b]
[CODE]00562D3C C:\Users\Brenth\Desktop\milestoneSF\map-server_sql.exe:00562D3C atcommand_reloaditemdb c:\users\brenth\desktop\milestonesf\src\map\atcommand.c:4202[/CODE]
this
[CODE]ACMD_FUNC(reloaditemdb)
{
nullpo_retr(-1, sd);
itemdb_reload();
clif_displaymessage(fd, msg_txt(97)); // Item database has been reloaded.

return 0;
}[/CODE]

Hercules Elf Bot - Dec 8, 2011 16:36

Originally posted by [b]Ind[/b]
humm do you have modifications in the item databases?

Hercules Elf Bot - Dec 8, 2011 17:04

Originally posted by [b]vBrenth[/b]
You mean in item_db? actually yes? the valkyrie set's and diabolus sets..

Hercules Elf Bot - Dec 8, 2011 18:07

Originally posted by [b]Ind[/b]
could you paste them here? thanks

Hercules Elf Bot - Dec 8, 2011 19:10

Originally posted by [b]Epoque[/b]
This occurs when a stack overflows. Evidently something has been assigned as far too large, there's a stack array somewhere consuming too much memory. An example of this would be:

[code]unsigned int stupidstack[1000000000000];[/code]

I believe the cause of this is this:

[code]struct {
struct {
unsigned short chance;
int id;
} mob[MAX_SEARCH];
} temporaryMonsterDrop[MAX_ITEMDB];[/code]

That's (2 + 4) * 5 * MAX_ITEMDB, which is 30 * MAX_ITEMDB stack size, causing memory corruption. It depends entirely on the actual machine and what capacity it can store. That system needs replacing :)

Hercules Elf Bot - Dec 8, 2011 20:17

Originally posted by [b]Ind[/b]
Should be fixed in [rev=15030], let me know if you still have any problems with it.

Hercules Elf Bot - Dec 9, 2011 3:19

Originally posted by [b]vBrenth[/b]
Fixed, i told you its a bug :D

Thanks Epoque ^^, really thanks!

Hercules Elf Bot - Dec 9, 2011 3:19

Originally posted by [b]vBrenth[/b]
Fixed, i told you its a bug :D

Thanks Epoque ^^, really thanks!