View RSS Feed


Forge CE: Updated to latest OpenSauce

Rate this Entry
I was going to wait to blog again, but oh well. I have been having this random crash happen when I am holding an object in Forge when it respawns. The object is destroyed and recreated while I am still trying to modify the invalid data. Even though I have null pointer checks properly in place, my code is not syncing up to the engine to where my code knows exactly when this respawn happens. So, I messaged Kornman and had a very brief conversation before he logged offline. I asked him about the object update hook in Objects.cpp, because he had the code hook commented out. I ask him if it worked and if this would be the ideal place to update my object pointers, but he said he will only help if I update to the latest code base in the Google Code project. I can understand that since he is not working on previous versions any longer, but the hook is the same thing and in the latest code base, it's also commented out. I guess I didn't understand why I had to update for him to answer such a generic question. Anyway, I downloaded the latest copy of OpenSauce (that is not even officially released yet) and added all my Forge code properly. I really do like the way the tree is setup and how the components system has changed. Lots of little updates I noticed that make a major difference. It's great!

Bad news -- my code is crashing after porting it over to the new OpenSauce. Sigh. The ONLY change I made was adding the new Release() function to the Forge DX Component. Everything is setup properly and it is crashing in the IDirect3DDevice9::Reset() function call in the engine before the main menu even loads. I haven't yet tried a build without the Forge components. I guess I should try that and see if it's actually my code that is crashing, which most likely it is, but who knows right now.

Edit: A clean release build of the latest OpenSauce is still crashing. I will have to continue development of the last released version until I can get them to fix this.

Once I get this crash taken care of, I will be continuing work on the menu and getting it's basis done and then work on the object respawn crash.

Keep checking back for updates guys and leave me some fudgin' comments already!!

Submit "Forge CE: Updated to latest OpenSauce" to Digg Submit "Forge CE: Updated to latest OpenSauce" to Submit "Forge CE: Updated to latest OpenSauce" to StumbleUpon Submit "Forge CE: Updated to latest OpenSauce" to Google

updated October 13th, 2010 at 10:59 PM

Devblog , Coding


  1. Dwood's Avatar
    That's lame.
  2. FireScythe's Avatar
    If it's crashing when resetting the device then you probably have D3D resources in the default pool that haven't been released prior to calling reset. Run the game with DirectX in debug mode with full output, validation, etc. and see what it prints to the Visual Studio output.
  3. Skarma's Avatar
    I should be asking you to do the same thing Firescythe. This isn't my code that is crashing like I said, it's a clean release build without any added code.
  4. Kornman00's Avatar
    Since the last public release of OS I went in and finished the data iterator so coders can now properly iterate a data array's active elements. The old way was very sketchy and just overall wrong as it didn't protect you from trying to access an uninitialized datum. The new iterator protects you from this.

    So that was another reason why I needed you to upgrade to the new codebase before I could really assist you. If you're iterating over a data array (instead of just accessing a known datum) you can open Players.cpp and view the implementation of LocalPlayerIndex() to see how the iteration now works.

    There isn't much of a test/debug framework in OS since I wanted to keep compiler generated code to a minimum (especially when it comes to initializer thunks) and also keep the complexity of the code to a minimum. Since the code is working with an otherwise black-boxed program, it's really difficult/cumbersome to do proper testing/debugging setups (not to mention the ugly start-up times!).

    Before hand, I was using IDA to debug crashes in OS. Eventually I moved to VS (since it's able to provide a pretty much full debug environment) but during the pure IDA days, using minimal-complex code made navigating OS's assembly a lot easier. Shit heavy in templates (like STL) or code which provoked the compiler into generating thunks can be an eye sore or cause headaches when dealing with things at the assembly level.
  5. Skarma's Avatar
    Thanks for the iterators, it is coming in handy! It will aid in SetPosition not crashing, but there are still issues. When an object respawns, it most likely will not have the same datum_index and therefor I lose the object I am holding. Do you know of a way that I could get the updated datum_index of the same exact object? It would actually solve a lot of problems if I just disable respawning, which would stop them from being destroyed and recreated. I guess I could update the spawn position in the scenario, then have it grab the nearest object after it respawns where I was last holding it. It sounds sketchy but that could work until I figure out something more plausible.