On 02/08/2017 02:23 PM, Eero Tamminen wrote:
Hi,

On 07.02.2017 15:29, Gustaw Smolarczyk wrote:
2017-02-07 14:11 GMT+01:00 Eero Tamminen <eero.t.tammi...@intel.com>:
Thanks, setting breakpoint on SDL_ShowMessageBox() I can catch where it
shows the dialog, but it appears to link SDL statically and not have
debug
symbols so that I could directly get the message.

Unfortunately my gdb/assembly-foo is too weak to parse UTF-16 strings
through pointers in stack (or is register passing using on Intel for
subset
of args?)...

On x86-64 [1], the first argument should be in rdi register. If SDL2
is used, it will point to SDL_MessageBoxData structure [2] which
should have the message pointer at offset 24.

[1]
https://en.wikipedia.org/wiki/X86_calling_conventions#System_V_AMD64_ABI
[2] https://wiki.libsdl.org/SDL_MessageBoxData

Thanks!

In case somebody else needs to debug something similar, log is at bottom
[1].


While the updated patch doesn't get ARK running on Intel, just
overriding the Mesa GLSL version [1] from command line actually does
(e.g. with 320).

After that, the game main menu loads fine, but during actual single
player game loading, it still crashes, like with Mesa 11.2.

"diagnostics.txt" file under
ShooterGame/Binaries/Linux/crashinfo-*/diagnostics.txt tells following:
------------------------------
Exception was "SIGSEGV: invalid attempt to access memory at address
0x00000003"
...
Invalid BufferCount=0 while reading
../../../ShooterGame/Content/PrimalEarth/Effects/Materials/environment/M_FX_countdown.uasset.
Pos=1886238581, Size=186863, PrecacheSize=2147483647,
PrecacheOffset=1886238581
------------------------------

Above was with "ARK: Survival Evolved".  I took also a look at the
free-to-play "ARK: Survival of the Fittest", but as it didn't have
single player mode, I wasn't able to test it except to lobby.

Btw It's fairly educating to check what files the game is accessing:
    strace -f -e open -p $(pidof ShooterGame)

(Is it expecting CPU topology to change multiple times each frame?)


    - Eero

[1]

(gdb) disassemble
Dump of assembler code for function SDL_ShowMessageBox:
   0x0000000002998545 <+0>:    push   %rbp
   0x0000000002998546 <+1>:    mov    %rsp,%rbp
=> 0x0000000002998549 <+4>:    sub    $0x10,%rsp
   0x000000000299854d <+8>:    mov    %rdi,-0x8(%rbp)
   0x0000000002998551 <+12>:    mov    %rsi,-0x10(%rbp)
   0x0000000002998555 <+16>:    mov    0x1b53094(%rip),%rcx
   0x000000000299855c <+23>:    mov    -0x10(%rbp),%rdx
   0x0000000002998560 <+27>:    mov    -0x8(%rbp),%rax
   0x0000000002998564 <+31>:    mov    %rdx,%rsi
   0x0000000002998567 <+34>:    mov    %rax,%rdi
   0x000000000299856a <+37>:    callq  *%rcx
   0x000000000299856c <+39>:    leaveq
   0x000000000299856d <+40>:    retq

(gdb) x/4xg $rdi
0x7fffffffdbb8:    0x0000000000000040    0x0000000000000000
0x7fffffffdbc8:    0x00007fffffffdb20    0x0000000008318f00

<messagebox title>
(gdb) print (char *) 0x00007fffffffdb20
$8 = 0x7fffffffdb20 "Message"
-> Yes this is the dialog title

<messagebox text>
(gdb) print (char *) 0x0000000008318f00
$9 = 0x8318f00 "\200\220\061\b"
-> Looks garbage

<try UTF-16>
(gdb) dump memory message.utf16 0x0000000008318f00 (0x0000000008318f00+256)
^Z
[1]+  Stopped
$ iconv -f UTF-16 -t UTF-8 < message.utf16
<chinese looking characters>
$ less message.utf16
------------------------------
<80><90>^@^@^@^@^A^@^@^@hader cache file '/opt/steamapps/common/ARK
SOTF/Engine/GlobalShaderCache-GLSL_430.bin' is missing.

You're running a version of the application built to load COOKED content
only, however no COOKED content was found. Consider cooking content for
this build, or build and run the UNCOOKED version of the application
instead.^@
------------------------------
$ touch '/opt/steamapps/common/ARK
SOTF/Engine/GlobalShaderCache-GLSL_430.bin'


And then running the game again:
------------------------------
Assertion failed: Tag == ReferenceTag
[File:E:\ArkSotfSVN\Engine\Source\Runtime\Engine\Private\GlobalShader.cpp]
[Line: 251]
Global shader map binary file is missing GSMB tag.

Thread 1 "ShooterGame" received signal SIGSEGV, Segmentation fault.
0x0000000000f09abb in _start ()
------------------------------

-> GLSL version causes issue also on Intel.

Thanks for your investigation Eero. Note that this patch hasn't been tested on Intel (lack of hardware) but it works on RadeonSI at least.


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to