Issue information

Issue ID
#8405
Status
Needs more Info
Severity
None
Started
Ink
Oct 17, 2014 14:13
Last Post
Garr
Oct 22, 2014 23:44
Confirmation
N/A

Ink - Oct 17, 2014 14:13

[code=auto:0] (gdb) bt full #0 0x081009b7 in clif_parse_WisMessage (fd=21, sd=0xbc942b8) at clif.c:10397 dstsd = <value optimized out> i = <value optimized out> target = 0x0 message = 0x0 namelen = 0 messagelen = <value optimized out> __FUNCTION__ = "clif_parse_WisMessage" #1 0x080f1fd5 in clif_parse (fd=21) at clif.c:18409 parse_cmd_func = <value optimized out> cmd = <value optimized out> packet_len = 38 sd = 0xbc942b8 pnum = <value optimized out> #2 0x0824ce8e in do_sockets (next=50) at socket.c:869 rfd = {fds_bits = {2097152, 0 <repeats 31 times>}} timeout = {tv_sec = 0, tv_usec = 46282} ret = <value optimized out> i = <value optimized out> #3 0x08249847 in main (argc=1, argv=0xbf939f04) at core.c:256 next = <value optimized out> retval = 0 [/code]
Can you tell me what's wrong? The crashes seems to happen random, at least i can't figure what causes it.

edit: checked all my crash dumps (10 now) all saying the same

This post has been edited by Ink on Oct 17, 2014 14:16

Ind - Oct 17, 2014 17:47

whats in your clif.c 10397? on mine its a //commented line so

Ink - Oct 17, 2014 17:53

[code=auto:10394] //-------------------------------------------------------// // Lordalfa - Paperboy - To whisper NPC commands // //-------------------------------------------------------// if (target[0] && (strncasecmp(target,"NPC:",4) == 0) && (strlen(target) > 4)) { [/code]

edit: i did a diff with latest clif.c

mine has[code=auto:10122] return; pc_stop_walking(sd, 1); pc_stop_attack(sd); [/code]
while latest has[code=auto:10122] return; if(action_type != 0x00 && action_type != 0x07) pc_stop_walking(sd, 1); pc_stop_attack(sd); [/code]

[img]http://i.imgur.com/eowF8Ao.jpg[/img]

Im using the version of last week

edit2: i didnt apply any diff, on the right side you see my clif.c (around 1 week old) and on the left, you see the one from the latest repository.

This post has been edited by Ink on Oct 17, 2014 18:44

Ink - Oct 17, 2014 18:47

and here the difference: i use the clif.c BEFORE this change

[url="https://github.com/HerculesWS/Hercules/commit/b5a92f944f126e920442307bebd3c2b53c9b0d54"]https://github.com/HerculesWS/Hercules/commit/b5a92f944f126e920442307bebd3c2b53c9b0d54[/url]

i did my last update on october 11th so my repository is from pre- [color=rgb(119,119,119)][font=Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji'][size=3]Commits on Oct 13, 2014,[/size][/font][/color]

the last update i made was "[url="https://github.com/HerculesWS/Hercules/commit/1b86f4b8f1605eb58fa9a68329d1fd5d0da8e776"]Fix Kyougaku make client crash[/url]" on [color=rgb(119,119,119)][font=Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol'][size=3]Oct 10, 2014[/size][/font][/color]

This post has been edited by Ink on Oct 17, 2014 18:48

Ind - Oct 17, 2014 20:39

hmm, what does gdb claim the error was? (for example it can say "SIGSEGV/SIGPIPE/WHATEVER" segment fault)

Ink - Oct 17, 2014 20:54

[quote name="Ind" timestamp="1413578376"]
hmm, what does gdb claim the error was? (for example it can say "SIGSEGV/SIGPIPE/WHATEVER" segment fault)[/quote]
where can i find that? :x


edit: do you mean this?
[code=:0] Program terminated with signal 11, Segmentation fault. #0 0x081009b7 in clif_parse_WisMessage (fd=58, sd=0xc3871b0) at clif.c:10397 10397 if (target[0] && (strncasecmp(target,"NPC:",4) == 0) && (strlen(target) > 4)) { [/code]

This post has been edited by Ink on Oct 17, 2014 21:49

Ink - Oct 20, 2014 16:16

[quote name="Ind" timestamp="1413568033"]
whats in your clif.c 10397? on mine its a //commented line so[/quote]


ok using fully updated revision now:[code=auto:0] Core was generated by `./map-server'. Program terminated with signal 11, Segmentation fault. #0 0x08105166 in clif_parse_WisMessage (fd=9, sd=0xc884578) at clif.c:10398 10398 if (target[0] && (strncasecmp(target,"NPC:",4) == 0) && (strlen(target) > 4)) { (gdb) bt full #0 0x08105166 in clif_parse_WisMessage (fd=9, sd=0xc884578) at clif.c:10398 dstsd = <value optimized out> i = <value optimized out> target = 0x0 message = 0x0 namelen = 0 messagelen = <value optimized out> __FUNCTION__ = "clif_parse_WisMessage" #1 0x080e6b05 in clif_parse (fd=9) at clif.c:18410 parse_cmd_func = <value optimized out> cmd = <value optimized out> packet_len = 40 sd = 0xc884578 pnum = <value optimized out> #2 0x082597ee in do_sockets (next=50) at socket.c:869 rfd = {fds_bits = {512, 0 <repeats 31 times>}} timeout = {tv_sec = 0, tv_usec = 43304} ret = <value optimized out> i = <value optimized out> #3 0x082560c7 in main (argc=1, argv=0xbf800114) at core.c:256 next = <value optimized out> retval = 0 [/code]

clif.c[code=auto:10395] //-------------------------------------------------------// // Lordalfa - Paperboy - To whisper NPC commands // //-------------------------------------------------------// if (target[0] && (strncasecmp(target,"NPC:",4) == 0) && (strlen(target) > 4)) { char* str = target+4; //Skip the NPC: string part. struct npc_data *nd; [/code]

All "OnWhisperGlobal" were removed from scripts. Still happening ~.~

This post has been edited by Ink on Oct 20, 2014 16:16

Ink - Oct 22, 2014 21:44

another update

the map-server crashes as soon as you whisper to a name with max letter, it doesnt even have to be a name or an actual play. you can just whisper to "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" any message

--> map server crashes

This post has been edited by Ink on Oct 22, 2014 21:55

Ink - Oct 22, 2014 22:42

ok finally found the issue. The map server stopped crashing after removing this plugin:

[url="http://herc.ws/board/topic/7028-chat-space-limitationscammer-avoid-will-pay-for-help/"]http://herc.ws/board/topic/7028-chat-space-limitationscammer-avoid-will-pay-for-help/[/url]

Garr - Oct 22, 2014 23:44

If you still want to use the plugin you should replace "return true;" with "return retVal;"[code=auto:0] #include <stdio.h> #include <stdlib.h> #include <string.h> #include "../map/pc.h" #include "../map/clif.h" #include "../common/HPMi.h" #include "../common/socket.h" #include "../common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time) HPExport struct hplugin_info pinfo = { "GM_impersonate", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; bool clif_process_message_spaces( int retVal, struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) { if ( retVal == true ) { normalize_name( *message_, "\255\xA0\032\t\x0A\x0D " ); if ( stristr( *message_, "\x20\x3A\x20" ) || stristr( *message_, "\x20\x3B\x20" ) ) { // type " : " OR " ; " will be blocked clif->colormes( sd->fd, COLOR_RED, "You can't impersonate other players !" ); return false; } } return retVal; } HPExport void plugin_init (void) { clif = GET_SYMBOL("clif"); session = GET_SYMBOL("session"); strlib = GET_SYMBOL("strlib"); addHookPost("clif->process_message", clif_process_message_spaces); } [/code]