Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kick vendor in autotrade mode crashes map server #568

Closed
Angelmelody opened this issue Jun 23, 2015 · 4 comments
Closed

kick vendor in autotrade mode crashes map server #568

Angelmelody opened this issue Jun 23, 2015 · 4 comments
Labels
component:core Affecting the Hercules core (i.e. not the game mechanics directly) status:confirmed Issue is valid and can be reproduced type:bug Issue is a bug or describes an incorrect behavior that should be fixed

Comments

@Angelmelody
Copy link
Contributor

long story short ,when npc script attach a @at state vendor then kick him map server will go crashed,but if npc script doesn't attach @at state vendor ,kick command was working fine..
Here are my test scripts:


prt_fild08,174,367,5    script  kick@ATvendor   100,{
    input.@name$;
    query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+escape_sql(.@name$)+"'", .@aid);
    attachrid(.@aid); 
    atcommand "@kick "+strcharinfo(0);
    end;
}

prt_fild08,174,362,5    script  kick@ATvendor2  100,{
    input.@name$;
    query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+escape_sql(.@name$)+"'", .@aid);
    //attachrid(.@aid);
    atcommand "@kick "+rid2name(.@aid);
    end;
}
@MishimaHaruna
Copy link
Member

Even without seeing a crash backtrace, this seems the same issue as http://herc.ws/board/tracker/issue-8594-mapserver-crash/?gopid=24850#entry24850

The more I think about it, the more I feel that the issue here is conceptual. Attaching a script to a character that isn't connected (an autotrader), is a pretty awkward thing, and I'm debating whether we should put some band aid (some workaround that detects cases like this and defer the script state deallocation), we might want to prevent the issue from happening altogether by disallowing to attach a dummy RID (such as a character that's not associated to a client). After all, a large number of script commands expect that, if they have a RID attached, they also have a client attached (mes, next, select, etc).

@MishimaHaruna MishimaHaruna added type:bug Issue is a bug or describes an incorrect behavior that should be fixed component:core Affecting the Hercules core (i.e. not the game mechanics directly) labels Jun 24, 2015
@MishimaHaruna MishimaHaruna added the status:confirmed Issue is valid and can be reproduced label Mar 15, 2016
@vBrenth
Copy link

vBrenth commented Feb 4, 2017

Bump! ->

@Asheraf Asheraf mentioned this issue Aug 27, 2017
@MishimaHaruna MishimaHaruna self-assigned this Aug 27, 2017
@vstumpf
Copy link

vstumpf commented Nov 25, 2017

Any clue when this will get fixed? It's an easily reproducible server crash that can hurt any private server using Herc.

@MishimaHaruna MishimaHaruna removed their assignment Nov 25, 2017
@MishimaHaruna
Copy link
Member

While I agree with "easily reproducible", I disagree with "that can hurt any server". The very easy workaround for a server owner is to avoid running a poorly designed script that attaches to a character in autotrade mode and kicks it, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core Affecting the Hercules core (i.e. not the game mechanics directly) status:confirmed Issue is valid and can be reproduced type:bug Issue is a bug or describes an incorrect behavior that should be fixed
Projects
None yet
Development

No branches or pull requests

4 participants