Issue information

Issue ID
#7485
Status
Fixed
Severity
None
Started
Igniz
Jul 6, 2013 5:19
Last Post
Ind
Jul 8, 2013 23:15
Confirmation
N/A

Igniz - Jul 6, 2013 5:19

Core dump(GDB):[code=auto:0] Loaded symbols for /lib/i686/cmov/libnss_files.so.2 Core was generated by `./map-server'. Program terminated with signal 11, Segmentation fault. #0 0x08132ed5 in script_free_state (st=0xafbbebfc) at script.c:2805 2805 if( st->script && st->script->script_vars && !db_size(st ->script->script_vars) ) { (gdb) bt full #0 0x08132ed5 in script_free_state (st=0xafbbebfc) at script.c:2805 __FUNCTION__ = "script_free_state" #1 0x0813b608 in script_reload () at script.c:3868 i = <value optimized out> iter = 0xa9de948 st = 0xafbbebfc __FUNCTION__ = "script_reload" #2 0x081cb4bf in atcommand_reloadscript (fd=7, sd=0xb3718e8, command=0xbf8112a4 "@reloadscript", message=0xbf81136c "", info=0xb72fe334) at atcommand.c:3924 iter = <value optimized out> pl_sd = 0x0 __FUNCTION__ = "atcommand_reloadscript" #3 0x081b3dd1 in is_atcommand (fd=7, sd=<value optimized out>, message=0xae692342 "@reloadscript", type=1) at atcommand.c:10177 charname = "\003\000\000\000\314\003k\260\001\200\255\373|\221\"\257\a\0 00\000\000\314%7\v" params = '\000' <repeats 99 times> charname2 = "8#i\256\070#i\256\030\024\201\277\377\n\f\bB#i\256\016\000\ 000" params2 = "\020\023\201\277C\001\000\000\222\000\000\000\000\000\000\000 \230\023\201\277cQ\f\b\020h\v\b\324\002\000\000\222\000\000\000C\001\000\000\256 \000\000\000_\001\000\000\001\000\000\000\300\023\201\277!\000\000\000\364\367\2 [/code]
Hope this helps. Greetings ~

exneval - Jul 6, 2013 14:11

mine is fine, latest rev

Ind - Jul 6, 2013 19:22

I'd like to ask is your script.c/script_free_state looking like this?[code=auto:0] void script_free_state(struct script_state* st) { if( idb_exists(script->st_db,st->id) ) { if(st->bk_st) {// backup was not restored ShowDebug("script_free_state: Previous script state lost (rid=%d, oid=%d, state=%d, bk_npcid=%d).\n", st->bk_st->rid, st->bk_st->oid, st->bk_st->state, st->bk_npcid); } if( st->sleep.timer != INVALID_TIMER ) iTimer->delete_timer(st->sleep.timer, run_script_timer); if( st->stack ) { script_free_vars(st->stack->var_function); script->pop_stack(st, 0, st->stack->sp); aFree(st->stack->stack_data); ers_free(script->stack_ers, st->stack); st->stack = NULL; } if( st->script && st->script->script_vars && !db_size(st->script->script_vars) ) { script_free_vars(st->script->script_vars); st->script->script_vars = NULL; } st->pos = -1; idb_remove(script->st_db, st->id); ers_free(script->st_ers, st); if( --script->active_scripts == 0 ) { script->next_id = 0; } } } [/code]

Igniz - Jul 8, 2013 19:07

Affirmative. Also yesterday in my tests trew this:


[code=auto:0] [Error]: Memory manager: args of aFree 0x0xae018e24 is overflowed pointer db.c line 1058 [/code]

Ind - Jul 8, 2013 20:39

I was able to reproduce thanks to the script you provided, working on it.

Ind - Jul 8, 2013 20:56

I believe I now have full understand of the problem, could you please let me know if the following patch solves it for you?
Patch:[attachment=434:Igniz.patch]

Igniz - Jul 8, 2013 22:40

Fixed, huge THANKS!

Ind - Jul 8, 2013 23:15

Finally \o\ Thank you very much, fixed in
[url="https://github.com/HerculesWS/Hercules/commit/a2eacedd5df4a0bea47a15fa3a7f92e36f901b9f"]https://github.com/HerculesWS/Hercules/commit/a2eacedd5df4a0bea47a15fa3a7f92e36f901b9f[/url]