Bug 97901 - [BDW] Far Cry 2 (wine) crashes on level load
Summary: [BDW] Far Cry 2 (wine) crashes on level load
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-23 05:16 UTC by bartos.petr
Modified: 2019-09-25 18:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bartos.petr 2016-09-23 05:16:57 UTC
Hi,
on Intel HD Graphics 5500 (Broadwell GT2) with with git version of mesa (installed from https://copr.fedorainfracloud.org/coprs/griever/mesa-git/) I found problem with Far Cry 2. Game starts, I can navigate menus, however game crashes on loading screen. In console there is either:

err:d3d:wined3d_debug_callback 0xa6d7670: "GL_OUT_OF_MEMORY in glCompressedTexSubImage2D"

many times or:

err:d3d:wined3d_debug_callback 0xa9189a8: "GL_OUT_OF_MEMORY in glMapBufferRange(map failed)

many times. with INTEL_DEBUG=perf I see many:

SIMD16 shader failed to compile: FS compile failed: Failure to register allocate.  Reduce number of live scalar values to avoid this.
Multi-LOD fast clear - giving up (1024x2048x11).

There are no errors in dmesg.

I did not play this game for some time, but I know for sure it was working on my machine before with same graphics setting. When I set everything to low details, game starts, but I did not yet found which setting is causing troubles. When I set back all settings to previous values in game, I can play for some time before game crashes.

Maybe it is somehow related to this https://bugs.freedesktop.org/show_bug.cgi?id=74868 (leaking bytecode on shader compile failure) or this (https://bugs.freedesktop.org/show_bug.cgi?id=29170)
Comment 1 Eero Tamminen 2016-09-26 10:54:26 UTC
(In reply to bartos.petr from comment #0)
> on Intel HD Graphics 5500 (Broadwell GT2) with with git version of mesa
> (installed from https://copr.fedorainfracloud.org/coprs/griever/mesa-git/) I
> found problem with Far Cry 2. Game starts, I can navigate menus, however
> game crashes on loading screen. In console there is either:
> 
> err:d3d:wined3d_debug_callback 0xa6d7670: "GL_OUT_OF_MEMORY in
> glCompressedTexSubImage2D"
> 
> many times or:
> 
> err:d3d:wined3d_debug_callback 0xa9189a8: "GL_OUT_OF_MEMORY in
> glMapBufferRange(map failed)

Game crash is likely due to the out of memory errors with the GL calls.


> many times. with INTEL_DEBUG=perf I see many:
> 
> SIMD16 shader failed to compile: FS compile failed: Failure to register
> allocate.  Reduce number of live scalar values to avoid this.
> Multi-LOD fast clear - giving up (1024x2048x11).

This doesn't cause reliability issues.


> There are no errors in dmesg.
> 
> I did not play this game for some time, but I know for sure it was working
> on my machine before with same graphics setting. When I set everything to
> low details, game starts, but I did not yet found which setting is causing
> troubles. When I set back all settings to previous values in game, I can
> play for some time before game crashes.

Did things start crashing after Mesa update, or Wine update?   This issue could be excessive GL resource usage from newer Wine version too.


> Maybe it is somehow related to this
> https://bugs.freedesktop.org/show_bug.cgi?id=74868 (leaking bytecode on
> shader compile failure) or this
> (https://bugs.freedesktop.org/show_bug.cgi?id=29170)

First one is in unrelated part of code, and second is so old that it's not anymore relevant either.  The instructions for Valgrind usage should be fine though.

Valgrind --tool=memcheck and --tool=massif outputs of the use-case would be useful.
Comment 2 bartos.petr 2016-12-15 20:25:09 UTC
Sorry for late reply, I didn't have much time for gaming lately. However I tried to install older packages of mesa from previous Fedora versions and switch them via LD_LIBRARY_PATH/LIBGL_DRIVERS_PATH.
Far Cry is working with mesa 10.5.4, 10.6.9, 11.0.3 and 11.1.0. However it does not load with 11.2.1 and is not working even with 13.1.0-devel (git-da3389a) which I am using as primary now.
Comment 3 Matt Turner 2016-12-15 20:32:02 UTC
Thank you. That is very helpful information.

Could you possibly capture an apitrace (https://github.com/apitrace/apitrace/) that we can use to easily reproduce the issue? See https://github.com/apitrace/apitrace/blob/master/docs/USAGE.markdown

Typically, all you need to do is

LD_PRELOAD=/path/to/apitrace/wrappers/glxtrace.so /path/to/application

The file is nearly always too large to upload here, so you'll have to use some hosting service.
Comment 4 bartos.petr 2016-12-15 21:14:49 UTC
Captured with mesa 11.2.1 https://file.io/6IrhWa
Comment 5 GitLab Migration User 2019-09-25 18:58:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1540.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.