Battlezone Universe

Battlezone Universe => Battlezone 1 Patch Board => Topic started by: Ultraken on December 06, 2009, 11:44:11 PM

Title: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 06, 2009, 11:44:11 PM
Once again, it's time for a new executable.  I fixed some performance problems with the renderer, and included some bonus gameplay fixes: seismic wave screwing up the terrain, and a divide-by-zero error in the AI that could make things go haywire.

As an experiment, I simplified virtual memory allocations used by the terrain and high-level rendering system, which may or may not help with the DEPs.  (It now commits the full amount instead of reacting to access violations and committing memory incrementally.)

By popular demand, I removed the CD check (for now) so everyone can test more easily.  I don't know if that's a good idea long-term, but I'll burn that bridge when I get to it.  :D

Battlezone D3D9 (http://ultraken.dyndns.org/www/bzone_d3d9_2009-12-07.7z)

(As usual, it's hosted on my NAS)

Quick reminders:
1. this build requires the Visual C++ 2008 SP1 Redstributable Package (http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en)
2. if using a retail install, rename the "splash" folder to "splash_" to disable Windows 7's compatibility layer
3. if running on Windows Vista or 7, make the install folder writable
4. if you have trouble starting it, try the DirectX End-User Runtime Web Installer (http://www.microsoft.com/downloads/details.aspx?FamilyID=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en)
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Commando on December 06, 2009, 11:51:24 PM
Still getting the same issue.  I am running windows 7 64bit edition if that helps.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Commando on December 06, 2009, 11:54:32 PM
I reinstalled the redistributables to be safe, I renamed the folder, and I set my folder to be writeable.  Still won't launch.  I wonder if it is a x64 compatibility issue.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 06, 2009, 11:55:24 PM
Possibly, but it runs fine on my Windows 7 64-bit desktop computer...
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 06, 2009, 11:57:14 PM
Try the DirectX End-User Runtime Web Installer (http://www.microsoft.com/downloads/details.aspx?FamilyID=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en).  It might have something to do with the version of DirectX.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Commando on December 06, 2009, 11:57:29 PM
Then that most likely isn't the issue.  I'm not sure what to make of the issue.  I gave myself all privileges for the folder to see if that will help, but got no farther.  Same AV when doubleclicking the exe.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Commando on December 06, 2009, 11:59:21 PM
Still no go.  Does bz1 write to a log file when it runs into any errors?  If so, I'll post the content of the log.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 07, 2009, 12:07:14 AM
That I don't know.  It doesn't seem to as far as I can tell.

I put the debug symbol file here (http://ultraken.dyndns.org/www/bzone_d3d9_2009-12-07.pdb.7z) if you want to try starting it in Visual C++ 2008 Express.  Maybe it'll give us a meaningful result.

Since I have an up-to-date map file, could you post the addresses it lists in the AV?  I might be able to figure out where it's crashing.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: sabrebattletank on December 07, 2009, 12:09:50 AM
I still get the "Sorry, there is not enough memory to continue.
Please make sure that you have at least 50MB free on your hard drive and that virtual memory is not disabled" version, and when run in compatibility for XP, it hangs. Was there a fix for this aside from running in compatibility mode?

I'm on 7 64 bit with 4 gigs RAM.

Trying the Web-basted DX installer now.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Commando on December 07, 2009, 12:17:38 AM
Basically the content of the error.

The application was unable to start correctly (0xc0000005).  Click OK to close the application.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: sabrebattletank on December 07, 2009, 12:21:31 AM
Still get the same memory error with the web-based DX when not run in compatibility mode, but this time the compatibility mode hang is different.

Hangs, compatibility XP SP2:
a) before the web-based DX -- resized screen, mouse turned into the Win7 "waiting" circle, except the Battlezone green
b) after the web-based DX -- resized screen, no mouse
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 07, 2009, 12:34:03 AM
Quote from: sabrebattletank on December 07, 2009, 12:09:50 AM
I still get the "Sorry, there is not enough memory to continue.
Please make sure that you have at least 50MB free on your hard drive and that virtual memory is not disabled" version
About a dozen places in the application can generate that message, but it does narrow things down a little.

Quote
and when run in compatibility for XP, it hangs. Was there a fix for this aside from running in compatibility mode?
That I don't know.

Quote
I'm on 7 64 bit with 4 gigs RAM.
Same here, actually.

Quote from: Commando on December 07, 2009, 12:17:38 AM
The application was unable to start correctly (0xc0000005).  Click OK to close the application.
Hm.  That doesn't help much, unfortunately.

While it's a lot to ask, could you install Visual C++ 2008 Express?  Once you've done that, unpack the debug symbol file I posted earlier to the same location as the executable and run the game as usual.  When it crashes, run VC++ and connect to bzone.exe with Tools > Attach to Process... and maybe it'll show something useful.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: sabrebattletank on December 07, 2009, 01:36:59 AM
Update: With compatibility mode to Vista I was able to launch to shell, I clicked around a bit, and played for about 2 minutes. In full screen! There goes the last shred of hope I had for homework for tonight :-(

Commando, try compatibility mode for Vista and see if that helps.

Sans compatibility mode is still a no-go.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Commando on December 07, 2009, 09:13:18 AM
I've tried compatibility mode for xp with sp 3 and 2.  I even tried win 95/98 compatibility mode.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: sabrebattletank on December 07, 2009, 09:57:30 AM
None of those compatibility modes ever worked for me. This build with Vista compat was the only one that did.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 07, 2009, 10:51:07 AM
Since it works for some people and not others, I need to figure out what's different for those having problems.

It would be helpful if people having problems described their BZ install (retail CD, BZ98 installer, and so forth) and how they are running the new executable (including renaming it).  Several people over at battlezone1.freeforums.org are having problems too.  Also, system specs such as operating system version might help identify commonalities.  (It'd be so much easier if it was failing on one of my Windows 7 machines so I could diagnose it...)

Now that the D3D9 renderer is semi-stable, this failure to start is the biggest issue.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Red Devil on December 07, 2009, 02:49:40 PM
i had to cancel the previous download since it had stalled for hours.  Trying again.

Edit: I'll mirror it on bzu as soon as i get it downloaded.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Red Devil on December 07, 2009, 04:25:06 PM
Could these be hosted on FileFront or some other site?  Been stuck on the last 2% for an hour, same as previous one.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Dx on December 07, 2009, 04:35:23 PM
Just use a proxy and it gets over 200Kbs.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Red Devil on December 07, 2009, 05:33:32 PM
It finally finished and I put a copy here:  Today's build (http://www.bzuniverse.com/~betadudes/unprotected/bzone_d3d9_2009-12-05.7z)

I still get this error about 2..3 minutes into 2nd SP mission:

(http://www.bzuniverse.com/~betadudes/unprotected/BZ1_error.png)
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: eddywright on December 07, 2009, 08:20:53 PM
I dropped in the new exe and I'm seeing a definite increase in frame rates, about 50% more if I had to guess.  I'm running it in Vista64 & 8800GTX video with no compatibility mode, launching it with /nointro

I made it half way through the second SP mission before it crashed. I'm seeing some disappearing textures on buildings and the same problem I mentioned before where the buildings and the terrain doesn't seem to mesh.

www.bz911.com/bzonetest2.wmv

I installed from the BZ1.4L installer.

From dxdiag:
------------------
System Information
------------------
Time of this report: 12/7/2009, 20:57:08
       Machine name: EDDY-VISTA64
   Operating System: Windows Vistaâ„¢ Home Premium (6.0, Build 6002) Service Pack 2 (6002.vistasp2_gdr.090803-2339)
           Language: English (Regional Setting: English)
System Manufacturer: Gigabyte Technology Co., Ltd.
       System Model: P35-DS3R
               BIOS: Award Modular BIOS v6.00PG
          Processor: Intel(R) Core(TM)2 Quad CPU           @ 2.40GHz (4 CPUs), ~2.4GHz
             Memory: 4094MB RAM
          Page File: 3189MB used, 5216MB available
        Windows Dir: C:\Windows
    DirectX Version: DirectX 11
DX Setup Parameters: Not found
     DxDiag Version: 7.00.6002.18107 32bit Unicode
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Commando on December 08, 2009, 12:57:38 AM
------------------
System Information
------------------
Time of this report: 12/8/2009, 01:56:59
      Machine name: COMMANDO-PC
  Operating System: Windows 7 Professional 64-bit (6.1, Build 7600) (7600.win7_rtm.090713-1255)
          Language: English (Regional Setting: English)
System Manufacturer: NVIDIA
      System Model: 132-CK-NF78
              BIOS: Phoenix - AwardBIOS v6.00PG
         Processor: Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz (2 CPUs), ~3.0GHz
            Memory: 4096MB RAM
Available OS Memory: 4094MB RAM
         Page File: 1306MB used, 6880MB available
       Windows Dir: C:\Windows
   DirectX Version: DirectX 11
DX Setup Parameters: Not found
  User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
   DWM DPI Scaling: Disabled
    DxDiag Version: 6.01.7600.16385 64bit Unicode

------------
DxDiag Notes
------------
     Display Tab 1: No problems found.
       Sound Tab 1: No problems found.
       Sound Tab 2: No problems found.
       Sound Tab 3: No problems found.
         Input Tab: No problems found.

Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 08, 2009, 02:57:45 AM
That second SP mission crash was two Soviet wingmen spawning at the exact same location so the obstacle-avoidance code performed an invalid floating-point operation.  Those are especially nasty since they render subsequent calculations invalid as well, cascading through the game until it goes down in flames.

I caught that by enabling floating-point exceptions, which turned up some bad geometry as well.  I put an emergency fix in the geometry loader since invalid surface normals and face planes will screw up the renderer.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Dx on December 08, 2009, 05:17:29 PM
Quote from: Ultraken on December 08, 2009, 02:57:45 AM
That second SP mission crash was two Soviet wingmen spawning at the exact same location so the obstacle-avoidance code performed an invalid floating-point operation.  Those are especially nasty since they render subsequent calculations invalid as well, cascading through the game until it goes down in flames.

Ah, that's the one the debugger kept leading me to build object.
But it didn't crash if i was there and watched the two spawn.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 08, 2009, 08:28:51 PM
Oh, that's right.

I bet that fixed quite a few problems.  I plan to leave floating-point exceptions enabled on non-release builds since it's perfect for catching these.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: bb1 on December 09, 2009, 09:47:03 PM
Visual Studio gives me :

Unhandled exception at 0x00c1e2d0 in bzone.exe: 0xC0000005: Access violation.

Does not start.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Ultraken on December 09, 2009, 10:33:02 PM
Of course I didn't keep the map file from that build...  :oops:

I did wise up and make one for the 2009-12-08 build, though.  Could you try again with that one?
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: Dx on December 10, 2009, 04:12:31 PM
Ken,
Do you have to run the exec. from vs2008? I kept getting the exec. greyed out when i tried to attach to process after a crash.
Title: Re: Experimental D3D9 Build (2009-12-07)
Post by: bb1 on December 10, 2009, 04:15:57 PM
Run the program really quick, hit refresh, then attach. Gotta be quick before the crash though.