• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Programmer Need experienced C++ developer for assistance in resolving a persistent crash issue

Stanos

Veteran OT User
Joined
Jun 12, 2018
Messages
587
Solutions
4
Reaction score
315
Location
Europe
Greetings,

I'm currently grappling with a persistent and bothersome crash in my code, likely tied to the monster game:checkCreatures functionality. In an effort to tackle this issue head-on, I've introduced a implemented measure using the following condition:
C++:
        if (attackedCreature == nullptr) {
            break;
        }
This change was pulled a few minutes ago, and while I'm in the process of monitoring its impact, I'm uncertain if it will definitively resolve the crash. If this adjustment doesn't provide the desired outcome, I'm actively seeking the expertise of a highly skilled C++ developer. The goal is to collaboratively trace the root cause of this issue. I have a few logs related to the crash, although they may not pinpoint the exact code causing the problem. Additionally, I possess a core file that might offer valuable insights.

If you have the proficiency and experience in C++ development and crash analysis, I would greatly appreciate your assistance in dissecting and rectifying this issue. Your expertise could be instrumental in resolving this challenge.
 
Basically long story short problem was with creature conditions so, the new code now includes it = conditions.erase(it) which removes the current element from the conditions container. After erasing the condition, the new code deletes the condition object with delete condition; after that the function creates a temporary copy (tempConditions) of the original conditions container. After that some double check with std::find:
For each condition in tempConditions, it uses std::find to locate the condition in the original conditions container.
If the condition is not found, the loop continues to the next iteration.
If the condition is found, it then checks if the condition should continue executing. If not, it uses std::find again to locate the condition in the original conditions container for removal.
 
Back
Top