-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
[combatTypeToIndex] Combat type 255 is out of range #2874
Comments
Your error message comes from here: Line 1142 in d4b1b61
Your problem is that you are using a combatType greater than or equal to COMBAT_COUNT on the server. Here you can see the size of the combatTypes list: canary/src/creatures/creatures_definitions.hpp Lines 766 to 782 in d4b1b61
I tested it on canary main, and no errors! |
Well, I didn't have anything modified in my project, I just used git clone, and ran it. |
are you using canary main (last commit September 5, 2024) or are you using canary release (version 3.1.2)? |
It would be interesting to put it in the logger to show exactly which combat or xml or monster is having a specific problem |
In fact this happen. Even with combats inside the size of combatTypes - Not sure what is causing yet, trying to figure out with some samples that i have. |
Had the same issue few months ago, it's the map issue, can't remember exacly what was it. To solve my problem i had to remove some items from the map and it stopped. |
Still having the issue, i didn't know to track, sometime happens, sometimes not. If the player is hunting sometimes can happen. |
Try the following pull request: #3095 It will help us find the problem, since we will know which line is calling the function, so I can fix it. When the error returns again, send me the log here so I can fix it, if some function is crashing or calling the conversion to index incorrectly. @FelipePaluco @Risk-CPU @philippelo Note: the pull request will not address the problem, just provide more details, knowing where it is calling and causing the error, I will be able to fix it. |
@dudantas The problem it's related to isImunne of monster.cpp - Already tracked. By some reason, ocasionally, monsters can receive a combat type of 255 - which is outside the enum index. I've tested with some Demons and Infernal Demons, playing as a MS 1340 - Full SET - Throwing Avalanche (which the creatures are not immune) and dealing around 1k~1.3k damage per turn. Notice that this can happen even with other monsters, as this is more generic than specific for a unique monster. |
Priority
Low
Area
What happened?
Where is the problem? - Not sure, still exploring about
So...
Well, I'm using canary-main (exactly as is, with no changes to the source) - It's worth mentioning this.
In a scenario where I'm only creating (a custom map) - (32372, 33143, 7).
As we can see in the image, I only have one barrier between the player and monsters. and I get these errors in the distro. I've used canary-main in an older version with 150+ Players online, and I had the same problem. This was unreal because it significantly increases the number of logs in my .ext - I never found a solution for this other than committing part of this log in my source (I don't know if this caused a CPU problem).
Since I didn't find a solution, I'll be posting it here in case someone else is also going through this and we can reach some conclusion.
NOTE: I have no items, no imbuements, no wheels, no boosts or anything like that. Just a test map.
What OS are you seeing the problem on?
Linux, Windows
Code of Conduct
The text was updated successfully, but these errors were encountered: