Game crashing to desktop

<< < (2/2)

jsalemi:
Quote from: croiduire on 2006 November 24, 21:13:02

Edit: OK, I found the offending files (I pulled stuff out in batches by creator) and I'm now wondering if there's a way to determine which of them is (are) the problem. Is there a utility that flags out of range values and other discrepancies on objects?


Only way I know is to continue isolating them until you narrow down which one is the problem child.  Put half of the files back into your game, and see if it crashes.  If not, the problem is in the other half, so add 1/2 of them in and repeat. If it does, start removing files one by one until the game doesn't crash anymore, and you've isolated the problem.

croiduire:
Given the load time that would be required if I were to test each and every object, I suspect I'll just live without that batch of pretty-shinys. However, I was more hoping for a tool or method to isolate a problem file so it could be fixed. File Cop for Sims 2, basically.

J. M. Pescado:
Actually, binary search works VERY fast. If you have about 60000 objects, you will isolate it in no more than 16 attempts, and assuming load time is roughly directly proportional to the amount of crap in your game, it will take about as long as loading your game once.

Just do the following:
1. Divide your content, arbitrarily, into two roughly equal halves.
2. Arbitrarily pick one of those halves and stick it in your game.
3. Does anything go wrong?
    A. If so, your problem is in this half. Repeat step 1 on current downloads.
    B. If not, your problem is in the other half. Repeat step 1 on the half you didn't load.

Assuming you have, oh, say, 60000 files, you'll pin this down in 16 loads, with a total loading time on the same order as loading the whole assload once. 60000 objects is, of course, a ludicrously unrealistic number, so you're probably looking at more like 8-10 loads. But even if you had 4 billion objects, you could sort them in 32 loads.

Navigation

[0] Message Index

[*] Previous page