Page 1 of 1

What kind of nonsense causes this crash?

Posted: Sat Dec 11, 2010 6:05 pm
by jangoisbaddest
I'm sure some of you are familiar with my crashing Kashyyyk map. I really want to release a new version of it, so I started trying to figure out why it was so unstable. And since it basically crashes faster when you either look up at the leaves or are closer to them, I thought the first logical step would be to eliminate all of the leaves and try playing that for a while. The effect? It lasted a bit longer before crash (and certainly didn't do it immediately despite my flying straight up in a Catamaran numerous times). But after a while, it still crashes. This leads me to believe that it's some kind of resource issue. After all, if it wasn't, the thing would be crashing far earlier.

Also of note: I've checked all of the weapons of each class and vehicles in-game. They still work fine. Now, it's no secret that the object count in this map is quite large, and there's no real way for me to implement portals and sectors, since it's so open and spread out. Does anyone know what the issue might be, or perhaps if there is any way to at least make the map less prone to object overload (a.k.a. objects disappearing because the engine can only render so much at once - and this is only a guess)? Obviously these are things I should have thought of before I started, but I was a n00b back then and this was my first map.

Re: What kind of nonsense causes this crash?

Posted: Sat Dec 11, 2010 6:11 pm
by Xavious
Sounds like it could be a water-related crash. See if reducing the amount of water in your map or removing it completely changes anything.

Re: What kind of nonsense causes this crash?

Posted: Sat Dec 11, 2010 6:22 pm
by DarthD.U.C.K.
jangoisbaddest wrote:or perhaps if there is any way to at least make the map less prone to object overload (a.k.a. objects disappearing because the engine can only render so much at once - and this is only a guess)? Obviously these are things I should have thought of before I started, but I was a n00b back then and this was my first map.
im pretty sure you could turn down the far- and near-scenerang a bit, that should make the objects in the background disappear more.

Re: What kind of nonsense causes this crash?

Posted: Sun Dec 12, 2010 3:46 am
by MercuryNoodles
I ran it three times to see what was going on. I managed to get it to crash to desktop with the debug exe after flying toward the canopy in a gunship, but this is the only severity 3 or higher produced by the log:

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\HUDManager.cpp(619)
HUD unable to find HUD element type 0x16ce484a

I'm not familiar with this error. It looks like the game's unable to find something internally, but it's just a guess. I'm not so sure it has any relation to the crashing, though.

I ran it a second time with the regular exe, and could not get it to crash, even when I flew the catamaran as high as it would go. The third time, I got the CTD in the middle of fighting on the beach. Whatever it is, it seems to be something that's either building up over time or waiting until later in the map to activate, and has no relation to the trees in themselves. Sorry I can't narrow it more than that, but I just went in and mostly let the battle play itself out each time.

The map might benefit by employing portals and sectors to cut down on the system strain, since not everyone has an outrageously powerful machine. If they work the way I think they do (I haven't tried them yet), it's just a matter of being clever in how you use them. There are plenty of places on the map where you can't see everything, so I think it could work if you do things like isolate interior areas, or cut out objects on higher/lower elevations when your view is blocked.

Re: What kind of nonsense causes this crash?

Posted: Sun Dec 12, 2010 4:38 pm
by jangoisbaddest
MercuryNoodles wrote:I ran it three times to see what was going on. I managed to get it to crash to desktop with the debug exe after flying toward the canopy in a gunship, but this is the only severity 3 or higher produced by the log:

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\HUDManager.cpp(619)
HUD unable to find HUD element type 0x16ce484a
I believe this is from FragMe's icon fix, though I"m not 100% positive. What I am sure of is that I was told that I could safely ignore that error.
MercuryNoodles wrote:I ran it a second time with the regular exe, and could not get it to crash, even when I flew the catamaran as high as it would go. The third time, I got the CTD in the middle of fighting on the beach. Whatever it is, it seems to be something that's either building up over time or waiting until later in the map to activate, and has no relation to the trees in themselves. Sorry I can't narrow it more than that, but I just went in and mostly let the battle play itself out each time.
That's the behavior I've noticed so far, which is why I agree and suspect it's some sort of memory issue. I think the above post is right: I have way too much water on the map, so I'm going to try removing all of that next and testing a while. I do appreciate your taking the time to examine the map and offer me your perspective. :D
MercuryNoodles wrote:The map might benefit by employing portals and sectors to cut down on the system strain, since not everyone has an outrageously powerful machine. If they work the way I think they do (I haven't tried them yet), it's just a matter of being clever in how you use them. There are plenty of places on the map where you can't see everything, so I think it could work if you do things like isolate interior areas, or cut out objects on higher/lower elevations when your view is blocked.
I may end up doing something like this, but I've only just now started working with portals and sectors in my new project, so I'm kind of a newb in that area. I ran into the same problem in my new map, and adding these things certainly made the issue go away. But it's an indoor map...so I don't really know where to start on this one, as there are many times in which you want to see everything on the map (when you're rushing the beachhead, for example, or flying around in an aircraft).

For the record, I've seen Portals and Sectors in action, so I can explain how they work (more or less): each portal has two associated, adjacent sectors. When you are close enough and facing a portal (at least, that's what the condition seems to be to me), the sector on the other side is then rendered. But if you're too far away or not facing it, none of those objects that you associated with the out of range sector is rendered. In the case of my new map, it got rid of the flickering objects bug, which I can now safely assume had something to do with trying to render too many objects at once. As you can imagine, indoor, object-heavy environments benefit the most from this system, and it even says so in the docs. That is, again, why I am hesitant to implement them in such a massive outdoor map as Kashyyyk.

Re: What kind of nonsense causes this crash?

Posted: Mon Dec 13, 2010 9:49 am
by Bob
I know this problem, simply do what D.U.C.K. says, it helps.

Re: What kind of nonsense causes this crash?

Posted: Mon Dec 13, 2010 2:40 pm
by jangoisbaddest
Xavious wrote:Sounds like it could be a water-related crash. See if reducing the amount of water in your map or removing it completely changes anything.
I just tried clearing the map of water. No crashes at all. I was never able to make it to the victory/defeat screen before. Now I've got to figure out how I can either decrease the amount of water on the map or make it less resource-intensive. Shame...a lot of the charm of this map was that it was a stunning view that was nearly identical to the movie. Now I'm probably going to have to change that so that it won't crash.
Bob wrote:I know this problem, simply do what D.U.C.K. says, it helps.
The crashing problem or the flickering objects problem?

Re: What kind of nonsense causes this crash?

Posted: Mon Dec 13, 2010 3:06 pm
by DarthD.U.C.K.
the crashing, maybe even the flickering but i dont know that for sure.

Re: What kind of nonsense causes this crash?

Posted: Mon Dec 13, 2010 6:19 pm
by jangoisbaddest
Well, I put the fog back in, and that helped. I really want to try and avoid taking the scene range values down, because I love being able to see the windows from the beach or the air. I'm just going to see what other small optimizations and cutbacks I can make from here - cutting back object count (especially the leaves), decreasing the reinforcement count, maybe cutting back the ai, etc...hopefully I'll get to the point at which no single-player crashes will occur.

A thought: is there any value that can make WATER foggy or lowres (or something) when it's farther away? That may be ideal. Because it also doesn't look very good when the terrain and objects are affected by fog, yet the water isn't.

EDIT: Fog (and farscenerange decreased for nighttime mode), combined with some other optimizations I found, seems to have eliminated the crashing. However, if anyone has any idea on how to have water fade out in the fog similar to how the terrain and objects fade out, that would still be appreciated.

Re: What kind of nonsense causes this crash?

Posted: Tue Dec 14, 2010 3:50 am
by DarthD.U.C.K.
you can change the visibility of the water in the .fx file. loddecimation could have something to do with it too:
Hidden/Spoiler:
Effect("Water")
{

// general parameters
PatchDivisions(4,4);

// ocean parameters
OceanEnable(0); // PC parameters
PC()
{
Tile(2.0,2.0);
MainTexture("fel1_water");
LODDecimation(1);
RefractionColor(5, 217, 255, 255);
ReflectionColor(57,90,138,255);
UnderwaterColor(61, 124, 144, 128);
FresnelMinMax(0.3,0.4);
FarSceneRange(1500)

NormalMapTextures("water_normalmap_",16,8.0);
BumpMapTextures("water_bumpmap_",16,8.0);
SpecularMaskTextures("water_specularmask_",25, 4);
SpecularMaskTile(3.0, 3.0);
SpecularMaskScrollSpeed(0.0,0.0);
Velocity(0.01,0.01);
OscillationEnable(0);

}

}
by turning down the number of normal/bump/specularmaps you could probably make it less resourceintensve too