Jump to content

Interpreting errors on a custom map


AtlasMapper
 Share

Recommended Posts

It is not really a bug, rather an error I try to understand (to avoid doing it again). So I don't know if it is really the right place to post it.. Tell me if I am wrong.

I am working on a map. I created the model, textured it. everything was fine. Then I started to add some entities (like resources, trees, and finally default skirmish CC and units to play a skirmish). Then after this modification and saving the file, as I open the file I have two error messages :

Spoiler

Assertion failed: "m_ComponentCaches.find(ent) == m_ComponentCaches.end()"
Location: ComponentManager.cpp:820 (AllocateEntityHandle)

Call stack:

(0x91936b) /usr/games/pyrogenesis() [0x91936b]
(0x8c4931) /usr/games/pyrogenesis() [0x8c4931]
(0x8c5fe6) /usr/games/pyrogenesis() [0x8c5fe6]
(0x49fcf4) /usr/games/pyrogenesis() [0x49fcf4]
(0x4a438a) /usr/games/pyrogenesis() [0x4a438a]
(0x71bdc7) /usr/games/pyrogenesis() [0x71bdc7]
(0x71c86a) /usr/games/pyrogenesis() [0x71c86a]
(0x71fc36) /usr/games/pyrogenesis() [0x71fc36]
(0x717795) /usr/games/pyrogenesis() [0x717795]
(0x5e9e4e) /usr/games/pyrogenesis() [0x5e9e4e]
(0x5ea2db) /usr/games/pyrogenesis() [0x5ea2db]
(0x80ed9a) /usr/games/pyrogenesis() [0x80ed9a]
(0x810265) /usr/games/pyrogenesis() [0x810265]
(0x7ed4fc) /usr/games/pyrogenesis() [0x7ed4fc]
(0x7ff528c88182) /lib/gnu/libpthread.so.0(+0x8182) [0x7ff528c88182]
(0x7ff5289b547d) /lib/gnu/libc.so.6(clone+0x6d) [0x7ff5289b547d]

errno = 0 (No error reported here)
OS error = ?

That's the first time such a thing happens to me. If I click on continue, the message is displayed another time, then if I click continue again, the map is loaded (apparently) in a normal way. Because the error occurs after I put some entities, and because of the "(AllocateEntityHandle)", it seems that the error is due to an entity. Then because the message is displayed twice, I guess two entities generated the problem. So I suspected that two entities to be the problem.

Here are my questions:

  • Is it really related to an entity, or is it an another kind of bug ?
  • Is it due to a "placement error", like a tree on the water or something ? I try to do my best and take some time to avoid putting entities on impossible places (they become red, so it is quite easy to check), but on a few hundred entities, a mistake is always possible. So,
  • Is there any easy way to see what entities are generating the problem on the map (again, if my interpretation of the error is good), or should I remove all the entities I added to remove the error (that would trash a lot of work..) ?

As it is on a custom map, I understand without the file you won't be able to simulate the error, would it be as a replay, on in the atlas editor (I have the message errors in both ways). But if it is what I suspect, it should be a very common error log?

Thanks for advices.

Link to comment
Share on other sites

Is it possible you manually edited the XML? From a first look at the error message, it expects the entity to not be in a list anymore, but the entity is still there. I think this could happen when you have different entities with the same id. So one gets processed, and there's still one left in the list.

Though the message should certainly be more descriptive (f.e. mention the entity as you say).

It's not related to placement of entities (when loading the map, valid placement isn't even checked; you can even put something on coordinates that are outside the map).

The easiest way to debug this would indeed be to share your map, or make a minimal example map where this happens. Then we can try to make the error a bit more descriptive.

 

Link to comment
Share on other sites

I edited the XML file, but only to set up a square map. I did not touch the entities in any way. But after a close check of the entity UIDs in the xml file, I found that the UID are not continuous, I found a missing entity (like entity 820 then entity 822, skipping number 821). Is it normal ? Are the entities listed in the xml file supposed to be in a continuous list ? Might it be generating the problem ? I tried to add an entity #821, but it didn't fixed the issue. Anyway, I wonder if the file has been corrupted during a save ? Maybe because of an error, or because a save - ctrl-Z - resave sequence or something ?

19 hours ago, sanderd17 said:

it expects the entity to not be in a list anymore, but the entity is still there.

That's interesting, and very different from what I suspected. A pity, the map was almost finished..

19 hours ago, sanderd17 said:

The easiest way to debug this would indeed be to share your map,

Yes but I don't want to publish it for now. And it would be very difficult for me to reproduce this error. I fully trust you, I might send you the file in PM if you have some time to check it. But I don't want to steal your time.

Link to comment
Share on other sites

Missing numbers are normal, every time you delete something, it leaves a hole. The game can handle this, as it happens constantly: units die, trees get chopped down, ... So that shouldn't be a problem.

Though I do think that the map reading code expects entity numbers to be sorted from low to high.

  • Like 1
Link to comment
Share on other sites

@sanderd17: Ok, so it shouldn't be the problem.

I've recently spotted something else, that might be linked to that problem:

On some of my maps, it seems to have some stability issues between sessions. When I work on a map (3D, landing, textures, add entities), then I left the map for a while, then I come back and work again on the map, some entities (especially trees) have a wrong display

(here is an example: missing trunks of the trees)

Spoiler

screenshot0105.thumb.png.e198d64421098fd

screenshot0104.thumb.png.9cec24732a27050

Moreover, I can't select some trees I placed before anymore, even if their displays are ok (on the example file, I selected the whole screen, but some trees are impossible to select, I also tried by double clicking another entity of the same kind on the screen). It seems that most of the problematic entities are on the top on some hills or mountains, so I wondered if any change in the land (making the hills higher, then modifying the coordinates of the entity on them, but with a bad handle of coordinates from Atlas) might induce the problem. Actually, when I lower the hills again it doesn't solve the problem, and I also have some problematic entities on a ground that has never been modified (flat area with no changes). So it should be something else.

(To tell you with my simple words, it seems that when I save a map, not all the data are stored with entities, it makes as if my save files are unstable among time.)

To be more precise, I should add that between the two working session on the maps (normal session, then the session with problematic entities), I did not change anything manually on the .xml nor .pmp file, and versions of 0AD/Atlas are exactly the same (A19). It was just a reload of the map.

You suggested my previous problem might be related to some missing entities, or entities impossible to handle by pyrogenesis. So maybe you could find this other problem informative, and related to the same problem.

Also, I did sent you the file of the map with the bugs/errors occurring at start, if it might help you to spot the problem.

Thanks for any advice, suggestions or ideas!

Link to comment
Share on other sites

I think you're having issues with actors. Actors are just models, and have no effect on gameplay (so only used for eyecandy; tree actors are handy to decorate impassable places). While entities are actors with different statistics, so they have gameplay consequences.

They're also shown in different lists: actors and entities. But most importantly, to select actors, you need to hold the ALT key.

Treetops are separate actors (the tree model is normally split in 2 parts), so I guess you're just having treetop actors there too.

 

Link to comment
Share on other sites

@sanderd17: Oh that's not trivial for me to have some separated treetops, thanks for the information. I know & understand the difference between actors and entities, especially because actor trees can't be chopped. So during a game, a player can see trees but he can't chop them. I think it is disturbing because it is frustrating and more complicated to evaluate the available resources around players on a map (but I now understand its use for places impossible to reach). For these reasons, I didn't (want to) use any actors in my map. That is why I did talk about entities. But maybe I did something wrong by selecting some actors instead of entities ? But aren't these two component separated in 2 different menus in Atlas, is it so easy to make such an error? Anyway, it should be easily checked with your ALT key procedure if it is the problem, thanks for the detailed explanation ^_^. I'll tell you very soon if it it related to it (seems to be good chances it will be, apparently).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...