Bug 3 - Starlancer colours and textures are a great big mess
Summary: Starlancer colours and textures are a great big mess
Status: CONFIRMED
Alias: None
Product: DXGL
Classification: Unclassified
Component: ddraw (show other bugs)
Version: 0.5.0
Hardware: PC Windows 7 (64-bit)
: Normal normal
Target Milestone: ---
Assignee: William Feely
URL: DXGL
Depends on:
Blocks:
 
Reported: 2012-09-17 20:56 EDT by William Feely
Modified: 2014-08-30 06:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Feely 2012-09-17 20:56:52 EDT
Danial wrote 2012-08-20 17:48:37 EDT:
This is a Direct3D 6/7 title that also happens to support a DirectDraw software mode if no direct3d device is available.

The game runs in software mode in the current DXGL, but does so in neon green and purple on the Menu's and while interacting with the interior of the ship you are stationed on.

Change Colour Depth resolves this on the main menu, however once you exit the loadout screen to start a mission, the following loading screen and gameplay are displayed in very a dark toned green and many textures appear to fail to appear at all.
Comment 1 William Feely 2012-09-17 20:57:20 EDT
Danial wrote 2012-09-05 10:15:00 EDT:
should note, the latest svn debug builds don't seem to enable Direct3D in this game either
Comment 2 William Feely 2012-09-17 20:57:49 EDT
William Feely wrote 2012-09-05 21:13:33 EDT:
I just confirmed this bug.  Please leave the "CONFIRMED" tag for my use.
Comment 3 William Feely 2012-09-17 20:58:17 EDT
Danial wrote 2012-09-05 21:38:38 EDT:
when i started reporting bugs all of them were turning to confirmed,

i think somethings buggy with this bugzilla, because if i post a message or change a setting, it changes to an entirely different bug.
Comment 4 William Feely 2012-09-17 20:58:44 EDT
Danial wrote 2012-09-05 21:41:04 EDT:
or maybe i just had it set to the default behavior of changing to the next bug in the list :<
Comment 5 Danial Horton 2013-03-08 00:32:27 EST
i tried to start the game under 0.5.0

with 0.5.0, the game did its usual hardware test at the start, and this time actually found a D3D device :D - however, after the opening video's, it crashed with an access violation

changing the Ini to Device 0 (Ddraw) still gets me into missions with those nasty colours.


*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** WARNING: Unable to verify checksum for Lancer.exe
*** ERROR: Module load completed but symbols could not be loaded for Lancer.exe
*** WARNING: Unable to verify timestamp for nvoglv32.dll
*** ERROR: Module load completed but symbols could not be loaded for nvoglv32.dll
*** WARNING: Unable to verify checksum for MSS32.DLL
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for MSS32.DLL - 
GetPageUrlData failed, server returned HTTP status 404
URL requested: http://watson.microsoft.com/StageOne/Lancer_exe/10_10_16_301/63732172/ddraw_dll/0_5_0_341/512eabce/c0000005/00011fd0.htm?Retriage=1

FAULTING_IP: 
ddraw!IsDXGLDDraw+10480
6ee11fd0 8b08            mov     ecx,dword ptr [eax]

EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 6ee11fd0 (ddraw!IsDXGLDDraw+0x00010480)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 00000000
Attempt to read from address 00000000

DEFAULT_BUCKET_ID:  NULL_POINTER_READ

PROCESS_NAME:  Lancer.exe

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_PARAMETER1:  00000000

EXCEPTION_PARAMETER2:  00000000

READ_ADDRESS:  00000000 

FOLLOWUP_IP: 
ddraw!IsDXGLDDraw+10480
6ee11fd0 8b08            mov     ecx,dword ptr [eax]

MOD_LIST: <ANALYSIS/>

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

FAULTING_THREAD:  00000f4c

PRIMARY_PROBLEM_CLASS:  NULL_POINTER_READ

BUGCHECK_STR:  APPLICATION_FAULT_NULL_POINTER_READ

LAST_CONTROL_TRANSFER:  from 05af1431 to 6ee11fd0

STACK_TEXT:  
WARNING: Stack unwind information not available. Following frames may be wrong.
0018fab0 05af1431 03086570 0018fb84 0018fb00 ddraw!IsDXGLDDraw+0x10480
0018fb90 05af6ac0 004c9de5 005ee5a8 00000000 SRD3D+0x1431
00000000 00000000 00000000 00000000 00000000 SRD3D!SR_driver_init+0x1410


STACK_COMMAND:  ~0s; .ecxr ; kb

SYMBOL_STACK_INDEX:  0

SYMBOL_NAME:  ddraw!IsDXGLDDraw+10480

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: ddraw

IMAGE_NAME:  ddraw.dll

DEBUG_FLR_IMAGE_TIMESTAMP:  512eabce

FAILURE_BUCKET_ID:  NULL_POINTER_READ_c0000005_ddraw.dll!IsDXGLDDraw

BUCKET_ID:  APPLICATION_FAULT_NULL_POINTER_READ_ddraw!IsDXGLDDraw+10480

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/Lancer_exe/10_10_16_301/63732172/ddraw_dll/0_5_0_341/512eabce/c0000005/00011fd0.htm?Retriage=1

Followup: MachineOwner
Comment 6 William Feely 2013-03-10 13:13:44 EDT
I'm working on adding tracing support to DXGL so I can better debug those issues.  Unfortunately, this is a very time consuming process to mark the functions for tracing and it will be a while before the feature will be usable.
Comment 7 William Feely 2013-04-07 20:00:48 EDT
(In reply to comment #5)
> i tried to start the game under 0.5.0
> 
> with 0.5.0, the game did its usual hardware test at the start, and this time
> actually found a D3D device :D - however, after the opening video's, it
> crashed with an access violation


I just created a trace log for DXGL leading up to the crash.  The 3D bug appears to be due to a reference count issue with glDirectDrawSurface7 (the DXGL implementation of the IDirectDrawSurface7 interface).

I am currently in the process of resolving issues such as this in my upcoming 0.5.1 release.
Comment 8 Danial Horton 2013-11-22 03:12:42 EST
i just tested with the latest svn and the game will no longer switch to D3D, selecting DXGL DDRAW as the direct3d device will result in it switching back to Software/DirectDraw.
Comment 9 Danial Horton 2013-11-22 03:16:10 EST
can tell its still loading missions in Ddraw too, because the hud is not rendered.
Comment 10 William Feely 2014-08-30 06:29:43 EDT
Try compiling revision r502 (if you need help, view https://www.youtube.com/watch?v=h2dEz4dCPKE), and enabling Change display color depth in DXGL Config and setting Video Mode to Change desktop resolution.  If you are using Windows 8.x and the game does not start, open Properties on lancer.exe and turn on Reduced color mode in the Compatibility tab.
If it works for you too, I will set the tag to Resolved/Fixed.
Comment 11 William Feely 2014-08-30 06:37:28 EDT
Actually I just realized my fix will only work on Windows 8.x because it doesn't actually change the color depth, only hooks the GDI functions.
In Windows 7 and below it will still break because OpenGL will not work in 8-bit color.