Crash report - RenderTarget SwapChain The object was not found

Any issues with the XWAU or X-Wing Alliance? Please let us know here!
Post Reply

Crash report - RenderTarget SwapChain The object was not found

User avatar
Sevain
Cadet 4th Class
Posts: 11
Joined: Fri Feb 10, 2017 3:29 pm

Post by Sevain » Sat May 16, 2020 12:48 pm

Hi,

First of all thank you for all the work you have put into this game. The new virtual cockpits are amazing: they were the one thing I missed from the older games when X-Wing Alliance switched to full 3D cockpits. The new models, effects, everything looks fantastic. It is kind of crazy that a game from 1997 is still the best way for a fan to fly in the Star Wars universe thanks to the dedicated community it brought together.

I tried out the new Z-95 in a skirmish mission and got the following exception two times. In both cases the mission had been going on for some time and it is not obvious to me what triggered the problem. I'll transcribe the error message text here in case there is a problem with the image. I hope it helps the issue get fixed (if it is with the code) or someone knowledgeable points out what settings I should change (if I broke something while dialing the effects down from incredible to amazing to get them to run on my potato).
DeviceResources::OnSizeChanged

RenderTarget SwapChain
The object was not found. If calling
IDXGIFactory;;EnumAdaptes, there is no adapter with the
specified ordinal.
You do not have the required permissions to view the files attached to this post.

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7901
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Sat May 16, 2020 1:17 pm

I personally don't know that issue but try some experiments out while you wait to see if it happens all the time.

Does it only happen in that particular Skirmish or others?
Is it only the Z95 that causes the crash in the same missions. If so restore the backup z95 and try again.
Does it crash in a normal tour or only Skirmish?
If you have altered some settings reset them to normal and try again.
Crashes suck so I hope you find it!
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun May 17, 2020 3:54 am

It also helps if you post the crash report from the Windows Event Viewer. Or if there is a dump file in %localappdata%\crashdumps (look for something like xwingalliance*.dmp) you can post it as well.

You mentioned that you were dialing down the effects. Can you post your configuration? How potato-ish is your video card? It may have run out of memory...

User avatar
Sevain
Cadet 4th Class
Posts: 11
Joined: Fri Feb 10, 2017 3:29 pm

Post by Sevain » Sun May 17, 2020 1:59 pm

blue_max wrote:
Sun May 17, 2020 3:54 am
It also helps if you post the crash report from the Windows Event Viewer. Or if there is a dump file in %localappdata%\crashdumps (look for something like xwingalliance*.dmp) you can post it as well.
The program pops open a dialog box and hangs, probably waiting for the dialog box to return. I can not interact with the dialog box (the game intercepts the inputs?). I couldn't find a dump file in appdata and there was no event in Windows Event Viewer, so I guess this technically isn't a crash.
blue_max wrote:
Sun May 17, 2020 3:54 am
You mentioned that you were dialing down the effects. Can you post your configuration? How potato-ish is your video card? It may have run out of memory...
I fiddled with the settings a bit before I got the exception for the first time. Which config files are relevant? The value ProcessAffinityCore has major impact on performance (~10 fps with 2, ~30 fps with 0). I then set EnableMultisamplingAntialiasing = 0, which gave another improvement in performance. These changes seemed to help with the problem, as I played several simple skirmishes without any issues. I then decided to test a more complex skirmish and the exception triggered when my X-Wing got destroyed. I'll do some more testing to see if I can figure out what causes this.

The potato I am running this on is a couple of years old laptop, since it has Windows and my desktop has Linux. The processor is Intel I3-7100U @2.40Ghx, 6 GB ram and Intel HD Graphics 620.

SSAO.cfg

Code: Select all

; SSAO/SSDO/Deferred Shading config file.
; SSDO is intended to be a full replacement of XWA's shading system. I suggest that
; you actually disable XWA's diffuse shading by going to:
; Menu (press Esc) -> Single Player Video Options, and then set:
; Local Light Source = Off,
; Diffuse Lighting = Off
; Try different brightness settings to see what it looks like.
; Disabling XWA's shading system is not required, though, and you can combine it
; with SSDO

; To reload this config file in-flight, just press Ctrl+Alt+L (be aware that
; all key shortcuts are disabled in the hangar, though).

; Main setting to enable/disable SSAO/SSDO. You can also press Ctrl+Alt+O in-game
; to toggle the effect.
ssao_enabled = 1

; Experimental setting: SSAO/SSDO/Deferred shading all need albedo (pure color 
; information) to work well. This setting will ignore XWA's diffuse component to 
; produce albedo instead. However, you may disable this setting to combine XWA's
; shading with these shaders. This setting has no effect in the Tech Room.
disable_xwa_diffuse = 1

; Select the shading style:
; "Deferred" for regular deferred shading with specular highlights -- fastest mode; but no ambient occlusion.
; "Ambient" for regular Ambient Occlusion.
; "Directional" for SSDO (Screen-Space Directional Occlusion).
; All modes use the new shading model with specular highlights and material definition files.
;ssao_type = Ambient
;ssao_type = Directional
ssao_type = Deferred

; Number of samples. The higher the count, the higher the quality (but lower
; performance) and the bigger the spread. Changing the number of samples also 
; affects how dark SSAO/SSDO looks, so always start by fixing the number of 
; samples before tinkering with the rest of the parameters.
samples = 4

; Distance in meters where the effect will be cut off. Only objects that are within
; this distance will occlude each other. Larger values will impact performance.
; This setting is also used by the depth-aware blur to prevent halos across edges.
max_dist = 100

; Controls the width of the occlusion cone considered by the occludee. A value
; of 0 makes a 90 deg "cone", i.e. it becomes a disk, allowing flat surfaces
; to self-occlude. A value of 1 makes a 0 degree cone, which essentially disables
; the effect. If you want to disable the effect use "ssao_enabled" instead.
; Here the recommendation is to use non-zero low values.
bias = 0.05

; The overall intensity of the SSAO/SSDO effect. Think of this as the "contrast"
; of the effect. A larger value will make whites whiter and black darker; a lower
; value will make everythink gray and dark.
intensity = 4.0

; The effect can be raised to a power to enhance the contrast. Setting it to
; values higher than 1 tends to make smaller and blacker patches. Values lower
; than 1 make larger black spots. Set it to 1.0 to disable it.
power = 2.0

; This defines the blackest level for the SSAO effect. 1 is white, 0 is fully
; black. This setting is ignored for SSDO
black_level = 0.2

; Sampling Radius for SSAO/SSDO: Controls the spread of the effect. Bigger spreads have 
; higher performance impact but tend to look nicer, while a very small spread looks
; like an edge detector. 
; You can set two values for the radius. The far_sample_radius is applied
; at 4km+ away. These settings depend on the number of samples. The following
; looks good for 8 samples:
near_sample_radius = 0.005
far_sample_radius = 0.005

; 16 samples:
;near_sample_radius = 0.0025
;far_sample_radius = 0.0025

; 32 samples:
;near_sample_radius = 0.00125
;far_sample_radius = 0.00125

; Enable perspective-correct SSAO. This makes the settings work only on a narrow
; range of distances. In other words, if you enable this you'll either get SSAO
; on distant objects, or get it on close objects; but not on both at the same time.
perspective_correct = 0

; To speed up SSAO/SSDO (at the cost of quality) you may optionally ask the
; system to perform SSAO/SSDO on a buffer that is smaller than the screen
; size. Set the following parameter to "2" to perform SSAO/SSDO on a buffer
; that is half the size of the screen. Set it to "1" to keep the original
; screen size. You can also use fractional numbers like 1.5. 
; Never set it to 0.
ssao_buffer_scale_divisor = 2

; Set the following to 1 to blur the SSAO buffer (removes noise)
; I'm using Pascal Gilcher's pattern for sampling; and it's so good that it sometimes
; does not even need a blur to look good if enough samples are taken. Try disabling
; this setting to see if it looks good for you.
enable_blur = 1

; For SSDO you can have multiple blur passes at the cost of performance. However, I
; don't see much difference above 2 passes
blur_passes = 1

; This shader splits the player's craft/cockpit into its own SSAO buffer so
; that it doesn't occlude distant objects. If you want the regular SSAO you
; can disable it here.
; This feature is not supported in SSDO, set it to 0 or you'll see artifacts.
enable_dual_ssao = 0

; For objects with an alpha mask, the alpha is mapped to solid geometry when 
; rendering SSAO. However, this may cause a white halo around these objects.
; To prevent this, the following setting can optionally substract a small value
; to the alpha to soften the edges. If you set it to 0, these objects will no
; longer get SSAO.
alpha_to_solid_offset = 0.5

; Enable indirect lighting for SSDO. Right now there's about a 15% penalty in performance 
; when this is enabled and the indirect lighting effect is subtle. If you want to use this
; anyway, I recommend that you either use a 2K resolution (say 1920x1080) or set the
; ssao_buffer_scale_divisor to 2 to compensate for the perfomance impact.
; This setting can also be toggled by pressing Ctrl+Alt+P while flying.
enable_indirect_ssdo = 0

; The intensity of the indirect lighting effect:
indirect_intensity = 1.5

; Due to the discretization of the depth buffer, sometimes you may see moire patterns
; on distant objects when running SSDO. This setting helps prevent these patterns. Set
; it to 0 to disable it (SSAO does not need this setting).
moire_offset = 0.02

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Normal Mapping Parameters for both SSAO and SSDO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Enable fake normal mapping for both SSAO and SSDO. 
; Pascal Gilcher was gracious enough to share code from his SSR shader that
; helps enable normal mapping by using the current image as a bump map. This
; setting can also be toggled by pressing Ctrl+Alt+N while flying.
; Normal Mapping has been improved a little bit in release 1.1.1; but as a result
; some settings have changed
normal_mapping_enable = 1

; Leave these settings at 1. The intensity is controlled by nm_scale now
nm_intensity_near = 1.0
nm_intensity_far  = 1.0

; Controls the strength of the fake normal mapping effect.
nm_scale = 0.03

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Specular shading settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; The following are generic settings. Individual materials can be defined per-texture
; per-OPT. See the Materials directory for more samples. If you modify this section, you'll
; modify the look of all the materials in the game.
specular_intensity = 0.5

; If the specular component is too bright, it will "spill out" as bloom. This setting
; controls the intensity of this "spillover bloom".
specular_bloom_intensity = 1.2

; Generic maximum glossiness of all surfaces.
glossiness = 128.0

; Generic glossiness of the specular bloom. This value multiplies the "glossiness" setting
bloom_glossiness_multiplier = 3.0 

; The generic specular model creates a specular component automatically using
; the original color from the texture by boosting/decreasing its lightness and 
; saturation.
; Lightness should be numbers above 1 to increase the specular component. A value of
; 1 uses the original color for the specular component, and a value of 0 creates a
; matte look.
lightness_boost  = 8.0

; A saturation of 0 provides a white specular component, like plastic and wood.
; A saturation above 1 produces a metallic look.
saturation_boost = 1.0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SSDO Lighting System Parameters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SSDO is intended to be a full replacement of XWA's shading mechanism. The
; following settings configure the lighting system through SSDO.

; Starting with release 1.1.3, XWA's lights are now integrated with the new
; shaders.

; In some cases, the original saturation of XWA's lights may be too much.
; The following setting can help tone down the saturation.
; 1: Original saturation
; 0: All lights become grayscale
xwa_lights_saturation = 1.0

; Intensity multiplier: if the lights seem to dark, you can increase their power
; by setting the following above 1. Setting it to 0 will shut down all the
; lights. Do not set it too far above 1 or you'll overexpose the render.
xwa_lights_global_intensity = 1.0

; XWA's default background suns have now been updated. They are now animated and
; they are generated procedurally. The following setting will enable the new
; updated suns. Set it to 0 to get the original suns.
procedural_suns = 1

; Background suns will now produce flares. The intensity of these flares can be
; modulated with the following setting (I also suggest that you turn off XWA's
; flare; but feel free to combine them).
; Only one flare is supported at the moment.
flare_intensity = 3

; Laser/Ion lights settings:
enable_laser_lights = 1
laser_light_intensity = 2.0

; General Ambient Lighting value. Set this to a low value.
ssdo_ambient = 0.05

ddraw.cfg

Code: Select all

; DDraw.cfg
; config file for DDraw.dll

; PreserveAspectRatio = 0 (no) or 1 (yes)
; When set to 0, the display will be stretched.
; When set to 1, the aspect ratio will be preserved.
PreserveAspectRatio = 0

; EnableMultisamplingAntialiasing = 0 (no) or 1 (yes)
; When set to 0, single-sampling will be used.
; When set to 1, multi-sampling (MSAA) will be used if it is supported.
EnableMultisamplingAntialiasing = 0

; If EnableMultisamplingAntialiasing is set (1), then the following 
; will optionally set the number of samples to use for MSAA.
; MSAACount = 0 -- Use the maximum MSAA count (this the same behavior in Jeremy's ddraw)
; MSAACount = 1 -- Use one MSAA sample, this effectively de-activates MSAA
; MSAACount = 2..N -- Use this specific sample count.
; You can also remove this line and the maximum number of samples will
; be used (default)
;MSAACount = 4

; Enable FXAA (Fast Approximate Anti-Aliasing). This is a faster alternative
; to MSAA; but the algorithm is a bit simple right now. Both MSAA and FXAA
; can be combined and the performance impact of FXAA is negligible. So, if
; you like 8x MSAA, you can try 4x MSAA + FXAA instead.
; This setting can also be toggled while flying by pressing Ctrl+Alt+F
EnableFXAA = 0

; EnableAnisotropicFiltering = 0 (no) or 1 (yes)
; When set to 0, linear filtering will be used.
; When set to 1, anisotropic filtering will be used.
EnableAnisotropicFiltering = 1

; FillWireframe = 0 (solid) or 1 (wireframe)
; When set to 0, fill mode wil be solid.
; When set to 1, fill mode will be wireframe.
FillWireframe = 0

; Concourse3DScale = float value
; This set the scale of the ships in briefing and tech library.
; Original Concourse3DScale = 0.6
; Craft Pack settings 0.48
Concourse3DScale = 0.48

; ProcessAffinityCore = int value
; When set to 0, the process affinity is not changed
; The value indicates the core you want the process to run on
ProcessAffinityCore = 0

EnableVSync = 0

; Joystick Emulation from Reimar's ddraw (used with his permission)
; JoystickEmul = -1 (auto-detect), 1 (force on), 0 (force off)
; EXPERIMENTAL - behaviour is far from optimal.
; Emulates a joystick using keyboard and mouse.
; For auto-detect only enabled if no joystick is detected.
; It is not possible to use a joystick that is plugged in after start.
; Force off to get back the dialog boxes asking you to plug in the joystick.
JoystickEmul = 0

; Set the following to 1 to swap the X and Z axes when JoystickEmul is set to 0.
; This will allow you to fly in XWA as if it were a real plane: the X axis will
; roll and the Z axis will yaw.
SwapJoystickXZAxes = 0

; MouseSensitivity = 0.5 (default)
; How sensitive the mouse is if joystick emulation is enabled.
; Maximum turn speed might only be possible for values >= 1.1
MouseSensitivity = 0.0

; KbdSensitivity = 1.0 (default)
; How sensitive the keyboard is if joystick emulation is enabled.
; Maximum turn speed for 1.0, values above are not useful.
KbdSensitivity = 1.0

; 32-BIT MODE HOOK ENHANCEMENTS.
; In this mode, some textures may become dull, these settings will make 
; them brighter. Set them to 0 when not using the 32-bit mode hook.
EnhanceLasers = 1
EnhanceIlluminationTextures = 1
EnhanceEngineGlow = 1
EnhanceExplosions = 0

; TextFontFamily = font family
; Set the font family used to render in-flight text
TextFontFamily = Verdana

; TextWidthDelta = delta
; Set the delta added to the character width
TextWidthDelta = 0

; This setting will remove all the text associated with the triangle pointer
; that appears around the edges of the screen when a craft is targeted. This
; helps get clean Dynamic Cockpit instruments. Set it to 0 to get the regular
; triangle pointer back.
SimplifiedTrianglePointer = 0

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7901
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Sun May 17, 2020 2:25 pm

FYI If you get crashes in Skirmishes I have found you can often keep crashing when restarting.
Load a DIFFERENT Skirmish, fly and then exit. Then try the original one again.
The Skirmishes are loaded into a Temp file and sometimes it needs this to help clear bugs.

Laptops aren't great for games. I have a much higher spec PC and even I have had fps issues with the new XWA.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon May 18, 2020 5:42 am

The title of the error message is saying that the game "crashed" around the area where it changes the size of its internal "screen" (remember that the game still uses a set of internal resolutions that are independent of the actual monitor resolution you're using). In other words, it was probably trying to switch from rendering 3D content to rendering the Concourse (for instance). This happens at the beginning or end of a mission, which matches your description that it happened when you were killed while playing.

The error itself is saying that it was trying to request the GPU renderer and it wasn't there. This happens if, for instance, you don't actually have a GPU. In that case, DirectX will return a software-based renderer and tell you that you don't have a GPU with that error message. Or it can happen if your GPU ran out of resources (like memory) and it can't allocate resources for one more renderer. For instance, if you have multiple programs that all use the GPU, this may happen to the last program that tries to request a renderer. This may also suggest there's a memory leak in my code somewhere.

Unfortunately, without a crash dump, or a crash report, it's a bit hard to figure out what, specifically, caused this. I don't see anything weird in your settings (I assume you also have Bloom enabled?) So, this is what I can suggest:

* Close all other programs when running XWA -- even your browser may consume some GPU resources.
* Lower down the resolution of your monitor. Try 1920x1080, for instance -- it's not that bad.
* When selecting a bloom level, try the medium or low settings -- they might consume less resources.
* Keep your current settings: Deferred shader, no MSAA.
* You may try disabling the dynamic cockpit too. I don't think it'll make much difference; but you can try.
* Try what Ace suggested: does this crash also happen with the normal skirmish or regular missions?

Intel videocards aren't high-end, so, unfortunately, you'll have to do some compromises here. If you do get a crash dump/report, feel free to post it and I'll take a look again.

User avatar
JeremyaFr
XWAU Member
Posts: 3987
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon May 18, 2020 11:42 am

Hello,
Which version of DDraw dll are you using?

@blue_max
The error message is thrown in DeviceResources::OnSizeChanged:
https://github.com/Prof-Butts/xwa_ddraw ... .cpp#L1193
You can add more step messages to see which method call failed.

User avatar
Sevain
Cadet 4th Class
Posts: 11
Joined: Fri Feb 10, 2017 3:29 pm

Post by Sevain » Mon May 18, 2020 1:03 pm

JeremyaFr wrote:
Mon May 18, 2020 11:42 am
Hello,
Which version of DDraw dll are you using?
I just installed the main download from the site, all the additional files and some extra ships on 16th May. The details of the dll say the following:

Code: Select all

File version: 1.1.3.0.
Product name: xwa_ddraw_d3d11
Product version: 1.1.3.0 VR

Post Reply