Game Development Community

1.5.1 crashes on some dif objects

by Ronald J Nelson · in Torque Game Engine · 04/08/2007 (10:31 am) · 25 replies

I am testing this with nothing more than the freshly installed 1.5.1 starter.fps and Eric Forhan's City Starter Kit that you can get from the Digital Boneyard.

This kit worked perfectly with 1.5 but now it crashes with some of the interiors. I tested this by first removing all of them in my text editor which allowed it to load fine. Then slowly adding them back in. The first couple of sim groups in his map worked fine until I got to the stairs files and it crashes without as soon as you try to load the map.

I have read there have been a number of changes on the lighting system for this and with winmerge I saw that the interior code change enormously. However, I have yet to track down what is causing this problem.
Page «Previous 1 2
#1
04/08/2007 (10:48 am)
Where does it stop in the console log?
#2
04/08/2007 (11:56 am)
*** Stage 2 load
#3
04/08/2007 (12:04 pm)
Ron:

Are you running a debug build? If not, could you try that to see if you get any asserts?
#4
04/08/2007 (1:04 pm)
I tried that. No help and no assertions. Same exact results.
#5
04/08/2007 (2:15 pm)
I am having the same problem. Crashing at "Stage 2 Load ".
removed all the interiors from the mission and it loaded.
#6
04/08/2007 (4:40 pm)
Good to know its not just me. Is there some sort of new standard in 1.5.1 for Difs?
#7
04/08/2007 (4:42 pm)
Hmm...

Just based on loading each one directly in the 1.5.1 demo editor, these seem to be the offenders:
Office_building
apartment1
skyscraper1
park_sunken
pyramid_mirror


Those were made several years ago, and I've learned quite a bit since. In all likelihood, the sheer abuse of scale is what's causing problems--specifically in lighting. I'd recommend first trying to recompile the above, and if that doesn't work then scrap them (with my apologies).

At any rate, if someone does wish to track this down here's the simplest example I could come up with:

Create a 1024x1024x960 brush. Next to it, create a 4864x1024x960 detail brush. Next to that, create another 1024x1024x960 brush. I've found this will not light.

The above's length is 6912. Note the park_sunken is a huge 6912x6912 w/a geometry and light scale of 32. So, somewhere around 216 yards x 216 yards (or meters if you go by that).

I suppose an alternative might be to change those scales to something more reasonable... like 128 or 256?. Trial and error may win the day.

(Edited for teh grammar)
#8
04/08/2007 (4:45 pm)
Holy crap its the man himself. Well thanks Eric. BUt what I would like to know is why it worked fine in 1.5 but not anymore in 1.5.1?
#9
04/11/2007 (10:50 am)
Hi, I think we have the same problem. I got an assertFatal() failure on the Difs after upgrading to 1.5.1 so I just commented out the assert check and it doesnt crash now but: img402.imageshack.us/img402/21/shot00018gd7.th.jpg

It was the:
AssertFatal((vect.sgVect.lenSquared() > 0.0f), "!");
in
void sgPlanarLightMap::sgSetupLighting()
#10
04/11/2007 (11:04 am)
It could be because of the changes with the DTS baking features that were added in 1.5.1 as well as any other DIF cleanup.
#11
04/11/2007 (11:43 am)
@Jari:

We've seen that assert - that's the same problem we were having with the cottage released with 1.5.1. There was a problem in map2dif which may cause this, but there have been extra checks added to the code to deal with it nicely.

@Eric:

If you want to send me one of the 'bad' difs, I can check it against the fix.
#12
04/11/2007 (2:24 pm)
Hi Andy,

Thanks for checking into this. Please feel free to download the package, including a pre-made mission file, at Digital Boneyard. If you'd rather not, I can email you something.

-Eric
#13
04/11/2007 (11:48 pm)
@asmaloney
Alright, thank you for the info. But I tried using the newest map2dif_plus but it just crashes.
#14
04/12/2007 (12:09 am)
I also can not get map2dif_plus to export ANY of my many QUARK .map, as i have mentioned here. Constructor have some wonderful functions but they all mean NILL if one can not export correctly and so far no matter HOW i export all my maps have some ugly artifacting.
#15
04/12/2007 (4:41 am)
Caylo, your link's not working.
I believe I have the same problem, BTW. Many of my non-city pack interiors won't export with legacy (1.5's) map2dif_plus.
#16
04/12/2007 (5:23 am)
I am having the same issues with my Quark maps using Constructor. And when I get them to export via "Export as Dif", TGE 1.51 crashes when my vehicle collides with them, with no error message.
#17
04/12/2007 (10:32 am)
Above link corrected...
#18
04/12/2007 (2:20 pm)
Hey guys,
I accidently introduced a bug in TGE 1.5.1's Interior IO code that causes it to have problems on older DIF's.

If you go into engine/interior/interiorIO.cc and search for:

U8 * data = mLightDirMaps[i]->getAddress(j,k);

and replace it with

U8 * data = mLightDirMaps[i]->getAddress(k,j); [b]// reversed the j and k[/b]

This should fix you right up. You could also comment out the entire:

else
      {
         mLightDirMaps[i] = new GBitmap(*mLightmaps[i]);
...
       }

block of code that contains the line above and it would safely work. We will have a slightly better fix in for TGE 1.5.2 but this should get you guys up and running again.

Sorry about that!
#19
04/12/2007 (3:05 pm)
Working !!
Thank you so much Matt.
Keep up the good work !
#20
04/12/2007 (5:37 pm)
Thanks a ton Matt. LOL after I had already gone through and converted my maps to the updated version.
Page «Previous 1 2