cBaraN 109 Posted October 14, 2018 Share Posted October 14, 2018 I and the other servers' author are having a strange problem which crashes the game file. I solved the problem in a few days. I won't tell you how to do it because most people will try to do it. The problem is starting with accessing invalid address in the memory. It might cause lag or something else. The game file can't access m_stCurQuest (because it's invalid). The problem only happens when the quest contains select at least I have that problem. I just added a string variable in QuestState called quest_name. If quest_name is not empty, the game file will use quest_name of QuestState instead of GetCurrentQuestName(). Open "quest.h" file, search "int st;" and under; std::string quest_name; Open "questlua.cpp" file, search "qs.suspend_state = SUSPEND_STATE_SELECT; and under; qs.quest_name = GetCurrentPC() ? GetCurrentPC()->GetCurrentQuestName() : "no_quest"; Open "questlua_quest.cpp" file, search "QuestState* pQS = pPC->GetRunningQuestState();" and under; std::string stQuestName = pPC->GetCurrentQuestName(); if (pQS->quest_name.length() != 0) stQuestName = pQS->quest_name; 2 5 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4864 Posted October 15, 2018 Bot Share Posted October 15, 2018 Without knowing how you caused the core downer / bug, we can't really test it and we don't know if we need it. But thank you either. Link to comment Share on other sites More sharing options...
attila1995 3 Posted October 15, 2018 Share Posted October 15, 2018 30 minutes ago, Cyber36 said: Without knowing how you caused the core downer / bug, we can't really test it and we don't know if we need it. But thank you either. Yeah, but it will not make a problem, bcs otherwise it is necessary in the code, if we would like to work like a programmer and if we want a looks good code. This modification is correct. 1 Link to comment Share on other sites More sharing options...
cBaraN 109 Posted October 15, 2018 Author Share Posted October 15, 2018 3 hours ago, Cyber36 said: Without knowing how you caused the core downer / bug, we can't really test it and we don't know if we need it. But thank you either. You have a point about that. However, this core-down is not always happening. You have to try hard to crash the game file if you have time. The problem is only starting when the quest contains a select command at least I have that problem. This problem does exist in the default source codes too. By the way, thank you for your comment. Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted October 15, 2018 Share Posted October 15, 2018 I just wonder why would a quest not have a name at any point? Link to comment Share on other sites More sharing options...
Matteo 46 Posted October 18, 2018 Share Posted October 18, 2018 On 10/15/2018 at 3:43 PM, PeaceMaker said: I just wonder why would a quest not have a name at any point? Maybe with a little python script, you could send quest packets to the server, without "name".... i guess. System Administrator @ Hungarian Government System Administrator @ Vibestro Freelancer Developer @ Various projects Link to comment Share on other sites More sharing options...
sylwek219awp 2 Posted October 29, 2018 Share Posted October 29, 2018 Dnia 14.10.2018 o 23:02, cBaraN napisał: I and the other servers' author are having a strange problem which crashes the game file. I solved the problem in a few days. I won't tell you how to do it because most people will try to do it. The problem is starting with accessing invalid address in the memory. It might cause lag or something else. The game file can't access m_stCurQuest (because it's invalid). The problem only happens when the quest contains select at least I have that problem. I just added a string variable in QuestState called quest_name. If quest_name is not empty, the game file will use quest_name of QuestState instead of GetCurrentQuestName(). Open "quest.h" file, search "int st;" and under; std::string quest_name; Open "questlua.cpp" file, search "qs.suspend_state = SUSPEND_STATE_SELECT; and under; qs.quest_name = GetCurrentPC() ? GetCurrentPC()->GetCurrentQuestName() : "no_quest"; Open "questlua_quest.cpp" file, search "QuestState* pQS = pPC->GetRunningQuestState();" and under; std::string stQuestName = pPC->GetCurrentQuestName(); if (pQS->quest_name.length() != 0) stQuestName = pQS->quest_name; Ok thats nice! But we need this if we dont know how to check it? Tell us how to use this. Link to comment Share on other sites More sharing options...
kingshero 8 Posted November 9, 2018 Share Posted November 9, 2018 On 10/29/2018 at 2:43 PM, sylwek219awp said: Ok thats nice! But we need this if we dont know how to check it? Tell us how to use this. yes we need how to make this bug to resolve 1 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41710 Posted August 21, 2019 Honorable Member Share Posted August 21, 2019 Completely bullshit. You are declaring stQuestName: std::string stQuestName = pPC->GetCurrentQuestName(); if (pQS->quest_name.length() != 0) stQuestName = pQS->quest_name; But where is the control or check? You don't use it... why?? 2 Link to comment Share on other sites More sharing options...
Recommended Posts