Ошибка out of global vars range

Hi,
I’m having an error while trying to directly compare the results of a function when the result type is as record;
ex : «if(not GetRect(1,2,3,4).left = 1) then a := 1;» will fail with «Out of Global Vars range»

Any clue about this problem ?

native code :

function TScript.SCRIPT_RectTest(x, y, x1, y1: integer): TRect;
begin
result.Left := x;
result.Top := y;
result.Right := x1;
result.Bottom := y1;
end;

definition :

Sender.AddMethod(self, @tscript. SCRIPT_RectTest, ‘function GetRect(x, y, x1, y1 : integer): TRect;’);

script :

program Script_Test;
var a : integer;
begin
if(not GetRect(1,2,3,4).left = 1) then a := 1;
end.

error :
«Out of Global Vars range»

ps : if you assign to a variable and then compare the result the script runs successfully.

Environment :
Delphi 2010

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

xelaric7

Installing GoG Games inside Wine

I’ve had the same issue installing several different GoG games. It will get to just about the end then give the following error messages:

Runtime Error (at 69:1358)
Runtime Error (at 198:800)
Runtime Error (at 198:807) Out of Global Vars range
Out of Global Vars range

After you start hitting «ok» on these errors, it will say «installation complete» and create a shortcut on the desktop. Most of the time the game will launch, but immediately crash in some way. While other games seem to work ok.

Is there a fix/workaround for these games or is it just not meant to be?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

User avatar

ugly

Level 5
Level 5
Posts: 568
Joined: Thu Nov 24, 2016 9:17 pm

Re: Installing GoG Games inside Wine

Post

by ugly » Wed Jan 29, 2020 10:11 am

Which games are you trying to install?

For Wine installs you might be better off seeing if there are prepared install scripts with Lutris. Getting a Windows game to work on Wine isn’t always a straightforward process.

https://lutris.net/

  • Home
  • Forum
  • Help and Tutorials
  • Old School RuneScape Help and Tutorials
  • OSR Help
  • Checking Boolean causes Error: Out of Global Vars range

  1. Default Checking Boolean causes Error: Out of Global Vars range

    There is no difference between the 2 except that that if i check for the result of FindDeformedBitmapToleranceIn it will return an error.
    Any idea what’s causing the error?

    Here’s the code that you can try out:

    Simba Code:

    program new;
    {$DEFINE SMART}
    {$I SRL/SRL.simba}

    procedure OutOfRange;
    var
      i,bmpOrt,x,y: Integer;
      ortAcc: Extended;
    begin
      bmpOrt := BitmapFromString(10, 16, 'meJxt0csKglAQxvGHKQihkkS7GhVmUJnUoQtiUla2KNrVohZBl0WLIKIH6FX7YGAQDf648DeHM2iyO0y0BSrrOidGY7TebEuHW3F/SbsBk78K0GyxxADUfH2RnFOYqI7V03ZHIsqy+1zt+m4YTS1foOyBcKbeXwWR8gArESsNQA2zxRQZwJKV0yOTlVFEsbA396F4QwM0A8JdYUWKqnKs9fsH4XZ8GSZW7Iwngk4cF4U1HCktEFc6DkpJEv2a+HEQqp6f6AeAVpTc');

      for i:=1 to 28 do
      begin
        FindDeformedBitmapToleranceIn(bmpOrt,x,y,InvBox(i).X1,InvBox(i).Y1,InvBox(i).X2,InvBox(i).Y2,10,0,true,ortAcc);
        if ortAcc>0.5 then
        begin
          writeln(i);
          Break;
        end;
      end;

      FreeBitmap(bmpOrt);
    end;

    begin
      SetupSRL;
      OutOfRange;
    end.


  2. Default

    The problem is that you have run out of global variables which is indeed the case.

    Simba Code:

    InvBox(i).X1,InvBox(i).Y1,InvBox(i).X2,InvBox(i).Y2

    4*28 = 112 variables you are using in the loop

    Define a Box as TBox and do

    Simba Code:

    Box := IntToBox(InvBox(i).X1,InvBox(i).Y1,InvBox(i).X2,InvBox(i).Y2)

    Then change the code to Box.X1, Box.Y1, Box.X2, Box.Y2

    Otherwise you are having too many global variables that are getting generated.

    Script source code available here: Github


  3. Default

    Quote Originally Posted by J J
    View Post

    The problem is that you have run out of global variables which is indeed the case.

    Simba Code:

    InvBox(i).X1,InvBox(i).Y1,InvBox(i).X2,InvBox(i).Y2

    4*28 = 112 variables you are using in the loop

    Define a Box as TBox and do

    Simba Code:

    Box := IntToBox(InvBox(i).X1,InvBox(i).Y1,InvBox(i).X2,InvBox(i).Y2)

    Then change the code to Box.X1, Box.Y1, Box.X2, Box.Y2

    Otherwise you are having too many global variables that are getting generated.

    Does the ‘global variable’ refer to total amount of variables? (i declared it locally) And how does adding an ‘if then’ affects it?

    Btw you can just do Box:=InvBox(i), i didn’t like to declare an extra box variable unnecessarily, why Simba put a cap on it? Does these small data variables take out so much memory for it to worry about?


  4. Default

    The way you do it is a tiny bit slower then InvBox(i) to a variable. It seems to me like a pascalscript bug though. In this case it would be good practice to replace it with a variable anyway.

    Working on: Tithe Farmer


  5. Default

    Alright then thanks both of you for the clarification ^^


  6. Default

    Lol wtf? We need to ditch Pascal..

    Lape has something similar to this and it’s for booleans too.

    Simba Code:

    var
       A, B: Boolean;
    begin
       A := True;
       B := True;
       writeln(A xor B);  //Writes False.
    end.

    vs.

    Simba Code:

    var
       A, B: Boolean;
    begin
       A := True;
       B := (Length(SomeTPA) > 0);  //SomeTPA has 7 points.
       writeln(A xor B);  //Writes True..  Wtf? True XOR True Resulting in True :S..
    end.

    I am Ggzz..
    Hackintosher


  7. Default

    Quote Originally Posted by Brandon
    View Post

    Lol wtf? We need to ditch Pascal..

    Lape has something similar to this and it’s for booleans too.

    Simba Code:

    var
       A, B: Boolean;
    begin
       A := True;
       B := True;
       writeln(A xor B);  //Writes False.
    end.

    vs.

    Simba Code:

    var
       A, B: Boolean;
    begin
       A := True;
       B := (Length(SomeTPA) > 0);  //SomeTPA has 7 points.
       writeln(A xor B);  //Writes True..  Wtf? True XOR True Resulting in True :S..
    end.

    Wow that’s crazily weird. You could even just make B:= (0 = 0), and writeln(B) returns true but it passed to xor as false? Are these bugs fixable in Simba since they could cause unintended results in scripts? (esp. since no compiling error occurs)

    If not we may have to start a section compiling all the bugs in pascal/lape so that others are aware of them?


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules

View previous topic :: View next topic  
Author Message
Atha
Apprentice
Apprentice

Joined: 22 Sep 2004
Posts: 223

PostPosted: Wed May 02, 2018 6:41 pm    Post subject: [SOLVED] Wine: Unhandled exception; from Konsole(KDE/Plasma) Reply with quote

Hi!

I wonder if anyone else has experienced this strange behaviour of Wine?

What I do is the following: I have a ~/.wine directory where I use WINEPREFIX to make the subdirectories unique for every game (or program) I install. So, for example, I installed System Shock 2 (GOG version) in the Konsole (from KDE/Plasma Desktop, i.e. /usr/bin/konsole, =kde-apps/konsole-17.12.3). This is the command:

Code:
WINEARCH=win32 WINEPREFIX=»~/.wine/System Shock 2″ winecfg



With this command all the necessary files are created. I then put the GOG installer into drive_c (~/.wine/System Shock 2/drive_c/INST/setup.exe, setup.exe being a symlink to setup_system_shock2_2.3.0.11.exe). Then I run the installer, also prefixed:

Code:
WINEARCH=win32 WINEPREFIX=~/.wine/System Shock 2 «C:\INST\setup.exe»

So far so good, as the installer has some issues at the end:

Code:
$ WINEARCH=win32 WINEPREFIX=~/.wine/System Shock 2 wine «C:\INST\setup.exe»

000b:fixme:winediag:start_process Wine Staging 3.7 is a testing version containing experimental patches.

000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.

0009:fixme:process:SetProcessDEPPolicy (1): stub

002e:fixme:process:SetProcessDEPPolicy (1): stub

002e:fixme:win:DisableProcessWindowsGhosting : stub

002e:fixme:graphics:ShutdownBlockReasonDestroy (0x1008c): stub

002e:fixme:graphics:ShutdownBlockReasonCreate (0x1008c, L»Installing»): stub

002e:fixme:graphics:ShutdownBlockReasonDestroy (0x1008c): stub

002e:fixme:graphics:ShutdownBlockReasonCreate (0x1008c, L»Installing System Shock 2.»): stub

002e:fixme:msg:ChangeWindowMessageFilterEx 0x1009e c05a 1 (nil)

002e:fixme:msg:ChangeWindowMessageFilterEx 0x2009e c05a 1 (nil)

002e:fixme:msg:ChangeWindowMessageFilterEx 0x100a6 c05a 1 (nil)

002e:fixme:msg:ChangeWindowMessageFilterEx 0x200a6 c05a 1 (nil)

002e:fixme:shell:SHAutoComplete stub

002e:fixme:msg:ChangeWindowMessageFilterEx 0x300ac c05a 1 (nil)

002e:fixme:wincodecs:JpegDecoder_Frame_CopyPalette (0x202714,0x1b3408): stub

002e:fixme:gdiplus:resample_bitmap_pixel_premult Unimplemented interpolation 6

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100f2 enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100f2 enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100f0 enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100f0 enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100fe enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100fe enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ee enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ee enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ea enable 0: stub!

002e:fixme:sfc:SfcIsFileProtected ((nil), L»C:\GOG Games\System Shock 2\unins000.exe») stub

002e:fixme:win:WINNLSEnableIME hwnd 0x100ea enable -1: stub!

002e:fixme:exec:SHELL_execute flags ignored: 0x00000100

0038:fixme:clusapi:GetNodeClusterState ((null),0x33ebc4) stub!

0038:fixme:advapi:DecryptFileA («c:\d4b2c0feca385543faccb14214\», 00000000): stub

003b:fixme:kerberos:kerberos_SpInstanceInit 65536,0x7dc5a300,(nil): stub

003b:fixme:ntdll:EtwRegisterTraceGuidsW (0x6cd15f38, 0x6cd20180, {e2821408-c59d-418f-ad3f-aa4e792aeb79}, 1, 0x33ea00, (null), (null), 0x6cd20188): stub

003b:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {e2821408-c59d-418f-ad3f-aa4e792aeb79}

003b:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub

003b:fixme:process:SetProcessDEPPolicy (1): stub

003b:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub

003b:fixme:thread:SetThreadStackGuarantee (0x33fba8): stub

003b:fixme:advapi:GetWindowsAccountDomainSid (0x33f404 0x1c29e4 0x33f400): semi-stub

003b:fixme:secur32:GetComputerObjectNameW NameFormat 7 not implemented

003b:fixme:msxml:domdoc_putref_schemas (0x1c32e8)->(0x33f3e0 {VT_DISPATCH: 0x1abf64}): semi-stub

003b:fixme:msxml:domdoc_get_readyState stub! (0x1c32e8)->(0x33f3c8)

003c:fixme:wintrust:SOFTPUB_VerifyImageHash Cannot verify hash for pszObjId=»1.3.6.1.4.1.311.2.1.25″

003c:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet

003c:fixme:wintrust:SOFTPUB_VerifyImageHash Cannot verify hash for pszObjId=»1.3.6.1.4.1.311.2.1.30″

003c:fixme:wintrust:SOFTPUB_VerifyImageHash Cannot verify hash for pszObjId=»1.3.6.1.4.1.311.2.1.30″

003d:fixme:msi:is_uninstallable check other criteria

003b:fixme:advapi:GetWindowsAccountDomainSid (0x33f254 0x81120c 0x33f250): semi-stub

003b:fixme:secur32:GetComputerObjectNameW NameFormat 7 not implemented

003b:fixme:ntdll:EtwUnregisterTraceGuids deadbeef: stub

002e:fixme:exec:SHELL_execute flags ignored: 0x00000100

0042:fixme:shutdown:wmain stub: L»shutdown» L»/a»

002e:fixme:exec:SHELL_execute flags ignored: 0x00000100

002e:fixme:gameux:GameExplorerImpl_VerifyAccess (0x2078bc8, L»C:\GOG Games\System Shock 2\goggame-1207659172.dll», 0x33d268)

0047:fixme:gameux:GAMEUX_ProcessGameDefinitionElement entry L»ReleaseDate» in Game Definition File not yet supported

0047:fixme:gameux:GAMEUX_ProcessGameDefinitionElement entry L»Genres» in Game Definition File not yet supported

0047:fixme:gameux:GAMEUX_ProcessGameDefinitionElement entry L»Ratings» in Game Definition File not yet supported

0047:fixme:gameux:GAMEUX_ProcessGameDefinitionElement entry L»Version» in Game Definition File not yet supported

0047:fixme:gameux:GAMEUX_ProcessGameDefinitionElement entry L»Developers» in Game Definition File not yet supported

0047:fixme:gameux:GAMEUX_ProcessGameDefinitionElement entry L»Publishers» in Game Definition File not yet supported

0047:fixme:gameux:GAMEUX_ProcessGameDefinitionElement entry L»GameExecutables» in Game Definition File not yet supported

0047:fixme:gameux:GAMEUX_ProcessGameDefinitionElement entry L»ExtendedProperties» in Game Definition File not yet supported

002e:fixme:shell:FolderItemsImpl_Item Index type 16396 not handled.

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x100ec enable -1: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x30134 enable 0: stub!

002e:fixme:win:WINNLSEnableIME hwnd 0x30134 enable -1: stub!

002e:fixme:graphics:ShutdownBlockReasonDestroy (0x1008c): stub

These are the 4 windows I get towards the end of the installation (the window title is always «Setup <2>»):

Code:
Setup <2>

Runtime Error (at 69:786):

:



Code:
Setup <2>

Runtime Error (at 204:800):

Invalid Opcode.



Code:
Setup <2>

Runtime Error (at 204:807):

Out of Global Vars range.



Code:
Setup <2>

Out of Global Vars range.



Despite those error messages the installation seems to be successful.

So now this is the strange thing:

  • When I start System Shock 2 from the menu (KDE/Plasma), it starts, runs, works…
  • When I start System Shock 2 from the Terminal (Konsole), it fails with a an «Unhandled exception»…

This is the console log when it fails, copied from Konsole:

Code:
$ WINEARCH=win32 WINEPREFIX=~/.wine/System Shock 2 wine «C:\GOG Games\System Shock 2\start.exe»

000b:fixme:winediag:start_process Wine Staging 3.7 is a testing version containing experimental patches.

000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.

0009:fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub

wine: Unhandled page fault on read access to 0x00000000 at address 0x4ad30b (thread 002f), starting debugger…

The backtrace.txt saved is this:

Code:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004ad30b).

Register dump:

 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b

 EIP:004ad30b ESP:0033f95c EBP:00000000 EFLAGS:00010202(  R- —  I   — — — )

 EAX:00000000 EBX:00d25580 ECX:8bee2342 EDX:006a4a20

 ESI:00d27eb0 EDI:00000000

Stack dump:

0x0033f95c:  0074f868 00744a5c 00000007 00d25660

0x0033f96c:  00d25580 00d27eb0 00454c2c 00000000

0x0033f97c:  00d7d750 00000000 00d25660 00d241c8

0x0033f98c:  00000000 00d7d750 00000015 004a4a35

0x0033f99c:  00d241c8 0074a14c 004a4dbf 8bee23de

0x0033f9ac:  0000000a 00000017 00000034 00000015

Backtrace:

=>0 0x004ad30b in shock2 (+0xad30b) (0x00000000)

0x004ad30b: movl   0x0(%edi),%ecx

Modules:

Module   Address         Debug info   Name (189 modules)

PE     400000-  d13000   Export          shock2

PE   10000000-10009000   Deferred        lgvid

ELF   7307b000-73082000   Deferred        libattr.so.1

ELF   73082000-7309c000   Deferred        libgpg-error.so.0

ELF   7309c000-730b5000   Deferred        libresolv.so.2

ELF   730b5000-73141000   Deferred        libvorbisenc.so.2

ELF   73141000-73172000   Deferred        libvorbis.so.0

ELF   73172000-7317a000   Deferred        libogg.so.0

ELF   7317a000-731c7000   Deferred        libflac.so.8

ELF   731c7000-731e0000   Deferred        liblz4.so.1

ELF   731e0000-732db000   Deferred        libgcrypt.so.20

ELF   732db000-7337f000   Deferred        libsndfile.so.1

ELF   7337f000-73441000   Deferred        libsystemd.so.0

ELF   73441000-73461000   Deferred        libice.so.6

ELF   73461000-734c1000   Deferred        libdbus-1.so.3

ELF   734c1000-7356a000   Deferred        libpulsecommon-11.1.so

ELF   7356a000-735d6000   Deferred        libpulse.so.0

ELF   7362a000-73658000   Deferred        winepulse<elf>

  -PE   73630000-73658000                  winepulse

ELF   73658000-737ae000   Deferred        oleaut32<elf>

  -PE   73670000-737ae000                  oleaut32

ELF   737ae000-73800000   Deferred        dinput<elf>

  -PE   737c0000-73800000                  dinput

ELF   73b03000-73b0a000   Deferred        libcap.so.2

ELF   73b0a000-73b11000   Deferred        libuuid.so.1

ELF   73b11000-73b1b000   Deferred        librt.so.1

ELF   73b1b000-73b40000   Deferred        mmdevapi<elf>

  -PE   73b20000-73b40000                  mmdevapi

ELF   73f05000-73f0b000   Deferred        libasyncns.so.0

ELF   73f0b000-73f17000   Deferred        libwrap.so.0

ELF   78b7e000-78be2000   Deferred        libncurses.so.6

ELF   78ce2000-78d12000   Deferred        liblzma.so.5

ELF   78d12000-78d2f000   Deferred        libgcc_s.so.1

ELF   78f49000-78f6b000   Deferred        libllvmdemangle.so.5

ELF   78f6b000-790e6000   Deferred        libllvmsupport.so.5

ELF   790e6000-790ff000   Deferred        libllvmbinaryformat.so.5

ELF   790ff000-793e7000   Deferred        libllvmcore.so.5

ELF   793e7000-794b8000   Deferred        libllvmmc.so.5

ELF   794b8000-794df000   Deferred        libllvmamdgpuutils.so.5

ELF   794df000-7951d000   Deferred        libllvmamdgpuasmprinter.so.5

ELF   7951d000-7964e000   Deferred        libllvmamdgpudesc.so.5

ELF   7964e000-7969e000   Deferred        libllvmmcparser.so.5

ELF   7969e000-79736000   Deferred        libllvmamdgpuasmparser.so.5

ELF   79736000-797a2000   Deferred        libllvmbitreader.so.5

ELF   797a2000-7986e000   Deferred        libllvmobject.so.5

ELF   7986e000-798c4000   Deferred        libllvmprofiledata.so.5

ELF   798c4000-79c91000   Deferred        libllvmanalysis.so.5

ELF   79c91000-79cdc000   Deferred        libllvmbitwriter.so.5

ELF   79cdc000-79ed4000   Deferred        libllvmtransformutils.so.5

ELF   79ed4000-79ff3000   Deferred        libllvminstcombine.so.5

ELF   79ff3000-7a30f000   Deferred        libllvmscalaropts.so.5

ELF   7a30f000-7a800000   Deferred        libllvmcodegen.so.5

ELF   7a800000-7a955000   Deferred        opengl32<elf>

  -PE   7a820000-7a955000                  opengl32

ELF   7a95a000-7aa0b000   Deferred        libllvmdebuginfocodeview.so.5

ELF   7aa0b000-7aadc000   Deferred        libllvmasmprinter.so.5

ELF   7aadc000-7ab49000   Deferred        libllvmasmparser.so.5

ELF   7ab49000-7abed000   Deferred        libllvmvectorize.so.5

ELF   7abed000-7acd6000   Deferred        libllvminstrumentation.so.5

ELF   7acd6000-7ae1a000   Deferred        libllvmipo.so.5

ELF   7ae1a000-7b10f000   Deferred        libllvmselectiondag.so.5

ELF   7b10f000-7b16c000   Deferred        libllvmglobalisel.so.5

ELF   7b16c000-7b38a000   Deferred        libllvmamdgpucodegen.so.5

ELF   7b38a000-7b400000   Deferred        libllvmruntimedyld.so.5

ELF   7b400000-7b803000   Deferred        kernel32<elf>

  -PE   7b420000-7b803000                  kernel32

ELF   7b808000-7b81a000   Deferred        libllvmtarget.so.5

ELF   7b81a000-7b82d000   Deferred        libllvmdebuginfomsf.so.5

ELF   7b82d000-7b854000   Deferred        libllvmlinker.so.5

ELF   7b854000-7bc00000   Deferred        libllvmx86codegen.so.5

ELF   7bc00000-7bd46000   Deferred        ntdll<elf>

  -PE   7bc40000-7bd46000                  ntdll

ELF   7bd49000-7bd52000   Deferred        libxtst.so.6

ELF   7bd52000-7bd5b000   Deferred        libllvmirreader.so.5

ELF   7bd5b000-7bd65000   Deferred        libllvmmcdisassembler.so.5

ELF   7bd65000-7bd96000   Deferred        libllvmamdgpudisassembler.so.5

ELF   7bd96000-7bdc1000   Deferred        libllvmexecutionengine.so.5

ELF   7bdc1000-7bdd4000   Deferred        libllvmmcjit.so.5

ELF   7bdd4000-7bf4c000   Deferred        libllvmx86desc.so.5

ELF   7bf4c000-7c000000   Deferred        libllvmx86asmparser.so.5

ELF   7c000000-7c004000   Deferred        <wine-loader>

ELF   7c005000-7c008000   Deferred        libllvmamdgpuinfo.so.5

ELF   7c008000-7c018000   Deferred        libllvmx86utils.so.5

ELF   7c018000-7c071000   Deferred        libllvmx86asmprinter.so.5

ELF   7c071000-7c1d9000   Deferred        libllvmx86disassembler.so.5

ELF   7c1d9000-7c1de000   Deferred        libllvmbpfasmprinter.so.5

ELF   7c1de000-7c1e9000   Deferred        libllvmbpfdesc.so.5

ELF   7c1e9000-7c210000   Deferred        libllvmbpfcodegen.so.5

ELF   7c210000-7c257000   Deferred        libllvmnvptxdesc.so.5

ELF   7c257000-7c309000   Deferred        libllvmnvptxcodegen.so.5

ELF   7c309000-7c400000   Deferred        libllvmpasses.so.5

ELF   7c406000-7c40b000   Deferred        libllvmbpfdisassembler.so.5

ELF   7c40b000-7c434000   Deferred        libllvmcoverage.so.5

ELF   7c434000-7c49c000   Deferred        libllvmlto.so.5

ELF   7c49c000-7d1b3000   Deferred        radeonsi_dri.so

ELF   7d29b000-7d29e000   Deferred        libllvmx86info.so.5

ELF   7d29e000-7d2bc000   Deferred        libllvmnvptxasmprinter.so.5

ELF   7d2bc000-7d2e9000   Deferred        libllvmobjcarcopts.so.5

ELF   7d2e9000-7d2fe000   Deferred        libllvmoption.so.5

ELF   7d2fe000-7d327000   Deferred        libllvmcoroutines.so.5

ELF   7d327000-7d347000   Deferred        libelf.so.1

ELF   7d347000-7d355000   Deferred        libdrm_amdgpu.so.1

ELF   7d359000-7d364000   Deferred        libsm.so.6

ELF   7d3a9000-7d3c1000   Deferred        libdrm.so.2

ELF   7d3c1000-7d3c7000   Deferred        libxcb-dri2.so.0

ELF   7d3c7000-7d3e5000   Deferred        libxcb-glx.so.0

ELF   7d3e5000-7d3e8000   Deferred        libx11-xcb.so.1

ELF   7d3e8000-7d3ec000   Deferred        libxdamage.so.1

ELF   7d3ec000-7d41e000   Deferred        libglapi.so.0

ELF   7d41e000-7d421000   Deferred        libxshmfence.so.1

ELF   7d421000-7d429000   Deferred        libxcb-sync.so.1

ELF   7d429000-7d4bc000   Deferred        libgl.so.1

ELF   7d4bc000-7d4bf000   Deferred        libllvmbpfinfo.so.5

ELF   7d4bf000-7d4c2000   Deferred        libllvmnvptxinfo.so.5

ELF   7d4c2000-7d4d1000   Deferred        libdrm_radeon.so.1

ELF   7d4d1000-7d4ea000   Deferred        libunwind.so.8

ELF   7d510000-7d67e000   Deferred        wined3d<elf>

  -PE   7d520000-7d67e000                  wined3d

ELF   7d67e000-7d701000   Deferred        ddraw<elf>

  -PE   7d690000-7d701000                  ddraw

ELF   7d701000-7d755000   Deferred        dsound<elf>

  -PE   7d710000-7d755000                  dsound

ELF   7d755000-7d75d000   Deferred        libxfixes.so.3

ELF   7d75d000-7d76a000   Deferred        libxcursor.so.1

ELF   7d76a000-7d76e000   Deferred        libxcb-present.so.0

ELF   7d76e000-7d778000   Deferred        libxcb-xfixes.so.0

ELF   7d778000-7d77c000   Deferred        libxcb-dri3.so.0

ELF   7d77c000-7d782000   Deferred        libtxc_dxtn.so

ELF   7d782000-7d7bc000   Deferred        uxtheme<elf>

  -PE   7d790000-7d7bc000                  uxtheme

ELF   7d9ca000-7da00000   Deferred        libexpat.so.1

ELF   7da00000-7da51000   Deferred        libfontconfig.so.1

ELF   7da51000-7da6c000   Deferred        libz.so.1

ELF   7da6c000-7dab3000   Deferred        libpng16.so.16

ELF   7dab3000-7dac5000   Deferred        libbz2.so.1

ELF   7dac5000-7dba4000   Deferred        libfreetype.so.6

ELF   7dba4000-7dbba000   Deferred        libxi.so.6

ELF   7dbba000-7dbc9000   Deferred        libxrandr.so.2

ELF   7dbc9000-7dbd7000   Deferred        libxrender.so.1

ELF   7dbd7000-7dbdf000   Deferred        libxxf86vm.so.1

ELF   7dbdf000-7dc0f000   Deferred        libxcb.so.1

ELF   7dc0f000-7dd7c000   Deferred        libx11.so.6

ELF   7ddd0000-7de6c000   Deferred        winex11<elf>

  -PE   7dde0000-7de6c000                  winex11

ELF   7de6c000-7df42000   Deferred        msvcr90<elf>

  -PE   7de90000-7df42000                  msvcr90

ELF   7df42000-7e0ba000   Deferred        msvcp90<elf>

  -PE   7df90000-7e0ba000                  msvcp90

ELF   7e0ba000-7e148000   Deferred        rpcrt4<elf>

  -PE   7e0d0000-7e148000                  rpcrt4

ELF   7e148000-7e2cb000   Deferred        ole32<elf>

  -PE   7e160000-7e2cb000                  ole32

ELF   7e2cb000-7e2f1000   Deferred        imm32<elf>

  -PE   7e2d0000-7e2f1000                  imm32

ELF   7e2f1000-7e33a000   Deferred        usp10<elf>

  -PE   7e300000-7e33a000                  usp10

ELF   7e33a000-7e486000   Deferred        comctl32<elf>

  -PE   7e340000-7e486000                  comctl32

ELF   7e486000-7e508000   Deferred        shlwapi<elf>

  -PE   7e490000-7e508000                  shlwapi

ELF   7e508000-7e84d000   Deferred        shell32<elf>

  -PE   7e520000-7e84d000                  shell32

ELF   7e84d000-7e8d3000   Deferred        advapi32<elf>

  -PE   7e860000-7e8d3000                  advapi32

ELF   7e8d3000-7ea14000   Deferred        gdi32<elf>

  -PE   7e8e0000-7ea14000                  gdi32

ELF   7ea14000-7ec51000   Deferred        user32<elf>

  -PE   7ea30000-7ec51000                  user32

ELF   7ec51000-7ed10000   Deferred        winmm<elf>

  -PE   7ec60000-7ed10000                  winmm

ELF   7ed10000-7ed1e000   Deferred        libnss_files.so.2

ELF   7ed1e000-7ed2d000   Deferred        libnss_nis.so.2

ELF   7ed2d000-7ed4a000   Deferred        libnsl.so.1

ELF   7ef4a000-7efac000   Deferred        libm.so.6

ELF   7efac000-7efb1000   Deferred        libxcomposite.so.1

ELF   7efb1000-7efca000   Deferred        libxext.so.6

ELF   7efca000-7efe5000   Deferred        aclui<elf>

  -PE   7efd0000-7efe5000                  aclui

ELF   7efe5000-7f000000   Deferred        version<elf>

  -PE   7eff0000-7f000000                  version

ELF   f7af4000-f7afc000   Deferred        libxdmcp.so.6

ELF   f7afe000-f7b03000   Deferred        libdl.so.2

ELF   f7b03000-f7ce2000   Deferred        libc.so.6

ELF   f7ce2000-f7d04000   Deferred        libpthread.so.0

ELF   f7d05000-f7d10000   Deferred        libnss_compat.so.2

ELF   f7d53000-f7d58000   Deferred        libxau.so.6

ELF   f7d58000-f7f26000   Dwarf           libwine.so.1

ELF   f7f28000-f7f4f000   Deferred        ld-linux.so.2

ELF   f7f52000-f7f53000   Deferred        [vdso].so

Threads:

process  tid      prio (all id:s are in hex)

0000000e services.exe

   [C:windowssystem32services.exe]

   00000024    0

   0000001f    0

   00000017    0

   00000016    0

   00000015    0

   00000012    0

   0000000f    0

00000010 explorer.exe

   [C:windowssystem32explorer.exe /desktop]

   0000002c    0

   0000002b    0

   0000002a    0

   00000011    0

00000013 winedevice.exe

   [C:windowssystem32winedevice.exe]

   0000001c    0

   00000019    0

   00000018    0

   00000014    0

0000001d plugplay.exe

   [C:windowssystem32plugplay.exe]

   00000021    0

   00000020    0

   0000001e    0

00000022 winedevice.exe

   [C:windowssystem32winedevice.exe]

   00000029    0

   00000026    0

   00000025    0

   00000023    0

0000002e (D) C:GOG GamesSystem Shock 2Shock2.exe

   [Shock2.exe]

   00000034   15

   00000033   15

   00000032    0

   0000002f    0 <==

00000037 explorer.exe

   [C:windowssystem32explorer.exe /desktop]

   0000003b    0

   0000003a    0

   00000039    0

   00000038    0

System information:

    Platform: i386

    Version: Windows XP



I get the exact same result when using this command (1:1 from the .desktop entry), only that the traceback is appended to the console output.

Code:
env WINEARCH=win32 WINEPREFIX=»/home/<USERNAME>/.wine/System Shock 2″ /usr/bin/wine «/home/<USERNAME>/.wine/System Shock 2/drive_c/GOG Games/System Shock 2/Shock2.exe»

But the same installation works when started with this freedesktop application entry (~/.local/share/applications/System Shock 2.desktop):

Code:
[Desktop Entry]

Encoding=UTF-8

Exec=env WINEARCH=win32 WINEPREFIX=»/home/<USERNAME>/.wine/System Shock 2″ /usr/bin/wine «/home/<USERNAME>/.wine/System Shock 2/drive_c/GOG Games/System Shock 2/Shock2.exe»

Path=/home/<USERNAME>/.wine/System Shock 2/drive_c/GOG Games/System Shock 2

Icon=/home/<USERNAME>/.wine/System Shock 2/drive_c/GOG Games/System Shock 2/shock2.png

Name=System Shock 2

GenericName=System Shock 2

Comment=

StartupNotify=false

Terminal=false

Type=Application

X-KDE-SubstituteUID=false

Categories=Game;RolePlaying;



<USERNAME> is the real username, e.g. «gaming» in my case, since $HOME and ~ doesn’t work in a .desktop file.

Sidenote: the only modifcation is that I put shock2.png into the installation directory for the icon.

BTW, the automaticly created wine desktop entry ~/.local/share/applications/wine/Programs/GOG.com/System Shock 2/System Shock 2.desktop has the same contents and works likewise.

So the BIG question is:

Why is starting WINE from the Konsole any different than starting it via the freedesktop application entry from the KDE menu?

And, have any of you also experienced this strange behaviour?

Could it be a WINE issue or rather a Konsole issue? What can I try to find out?

One more information: I have similar issues with other GOG.com and Humble Bundle games for Windows, but not all of them crash. Sim City 3000 for example works when started from the Konsole (WINEPREFIX=~/.wine/Sim City 3000).

Thanks in advance, Atha

Last edited by Atha on Fri May 04, 2018 5:30 pm; edited 1 time in total

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 20290

PostPosted: Thu May 03, 2018 2:21 am    Post subject: Reply with quote

The faulting instruction appears to be in the game, so this is a game bug. Most likely, Wine raises some error that Windows does not, and the game developers wrongly assumed nothing could possibly go wrong here, so they do not handle the error gracefully. Bug the developers not to dereference null pointers.

As for why, the two paths likely differ in some key environmental factor. Do both paths launch with all the same groups? Are the environment variables the same?

Back to top

View user's profile Send private message

Atha
Apprentice
Apprentice

Joined: 22 Sep 2004
Posts: 223

PostPosted: Thu May 03, 2018 5:27 pm    Post subject: Reply with quote

Hu wrote:
The faulting instruction appears to be in the game, so this is a game bug. Most likely, Wine raises some error that Windows does not, and the game developers wrongly assumed nothing could possibly go wrong here, so they do not handle the error gracefully. Bug the developers not to dereference null pointers.



You refer to the errors when installing the game? This is the GOG installer for Windows, not the actual game that causes the error messages.

Or do you refer to the page fault when the game is run? It must be something else because the game works perfectly when I run it from the desktop (not from the Konsole on the same desktop).

Hu wrote:
As for why, the two paths likely differ in some key environmental factor. Do both paths launch with all the same groups? Are the environment variables the same?



I guess that’s what makes the difference. I never noticed any other programs with such strange behaviour. For example, in the Konsole I regularly use the Midnight Commander (I actually prefer it over all graphical file managers, even Dolphin). Midnight Commander is configured to launch my preferred X application for each file type, e.g. on an image (like .jpg) it will launch Gwenview. Hitting enter on a video file (like .mkv) launches VLC.

It may well be that those instances are executed in a different environment, but they work like they would if I ran them directly from the desktop. Except for Wine that is…

Is there a way to dump the environment into a file to see what the difference really is?

I ran «env > /tmp/env.txt» on the deskop (in KDE you can run a command directly from a command line reached by the default keybindings Alt+F2) and from the Konsole, then used diff on them. This is what I get:

Code:

# diff /tmp/env-Konsole.txt /tmp/env-desktop.txt

<

LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd

=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=

34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01

;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.

tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.

lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31

:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01

;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.

zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31

:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.

gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;

35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.

mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;

35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.

qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35

:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;

35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.

conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=

00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.

m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;

36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:

4a4

> _=/usr/bin/env

8d7

< PROFILEHOME=

11d9

< SHELL_SESSION_ID=0aef93a1a1d44094811b26a7d1709650

16d13

< COLORTERM=truecolor

42d38

< KONSOLE_DBUS_SESSION=/Sessions/1

45d40

< KONSOLE_DBUS_WINDOW=/Windows/1

53d47

< TERM=xterm-256color

55d48

< KONSOLE_DBUS_SERVICE=:1.45

63d55

< KONSOLE_PROFILE_NAME=Standard

65d56

< XDG_SEAT=seat0

67c58

< COLORFGBG=15;0



> XDG_SEAT=seat0

73d63

< WINDOWID=60817414

85d74

< KDE_SESSION_UID=1001

86a76

> KDE_SESSION_UID=1001

97d86

< _=/usr/bin/env

Since this was not very conclusive, I also ran the System Shock 2 command from the desktop command line (Alt+F2) and I got the same crash: Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004ad30b).

So I changed the «System Shock 2.desktop» file in ~/.local/share/applications, line Exec= to «Exec=env > /tmp/env-wine.txt» and compared it again:

Code:
$ diff env-Konsole.txt env-wine.txt

3d2

<

LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd

=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=

34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01

;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.

tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.

lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31

:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01

;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.

zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31

:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.

gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;

35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.

mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;

35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.

qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35

:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;

35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.

conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=

00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.

m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;

36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:

4a4

> _=/usr/bin/env

8d7

< PROFILEHOME=

11d9

< SHELL_SESSION_ID=0aef93a1a1d44094811b26a7d1709650

16d13

< COLORTERM=truecolor

34c31

< PWD=/home/gaming



> PWD=/home/gaming/.wine/System Shock 2/drive_c/GOG Games/System Shock 2

42d38

< KONSOLE_DBUS_SESSION=/Sessions/1

45d40

< KONSOLE_DBUS_WINDOW=/Windows/1

47a43

> DESKTOP_STARTUP_ID=localhost;1525368120;990971;3644_TIME1589699

53d48

< TERM=xterm-256color

55d49

< KONSOLE_DBUS_SERVICE=:1.45

63d56

< KONSOLE_PROFILE_NAME=Standard

65d57

< XDG_SEAT=seat0

67c59

< COLORFGBG=15;0



> XDG_SEAT=seat0

73d64

< WINDOWID=60817414

85d75

< KDE_SESSION_UID=1001

86a77

> KDE_SESSION_UID=1001

97d87

< _=/usr/bin/env

As you can see there isn’t much difference to it compared to run from the desktop commandline:

Code:
$ diff env-wine.txt env-direct.txt

31c31

< PWD=/home/gaming/.wine/System Shock 2/drive_c/GOG Games/System Shock 2



> PWD=/home/gaming

43d42

< DESKTOP_STARTUP_ID=localhost;1525368120;990971;3644_TIME1589699

So this cannot be it. Right?

Wrapped ‘LS_COLORS’ to make the forum layout behave.Chiitoo

Fix: typo
_________________
Think for yourself and let others enjoy the privilege of doing so too. Voltaire

Last edited by Atha on Fri May 04, 2018 4:27 pm; edited 1 time in total

Back to top

View user's profile Send private message

Atha
Apprentice
Apprentice

Joined: 22 Sep 2004
Posts: 223

PostPosted: Thu May 03, 2018 6:29 pm    Post subject: Reply with quote

Eureka!

You won’t believe this!

It now runs from the Konsole and the KDE Plasma command line (Alt+F2) as well! The only difference I made was to cd into the game directory beforehand and—voilà—it runs! (I noticed that the $PWD was different when using the .desktop entry…)

So, this command works:

Code:
cd «$HOME/.wine/System Shock 2/drive_c/GOG Games/System Shock 2″ && env WINEARCH=win32 WINEPREFIX=»$HOME/.wine/System Shock 2» /usr/bin/wine «$HOME/.wine/System Shock 2/drive_c/GOG Games/System Shock 2/Shock2.exe»



Such a simple solution, when the error message «Unexpected exception: page fault on read…» was so dramatic :?

Any idea why Wine needs you to be in the right directory? I’ve never heard of this before…

Fix: typo

Last edited by Atha on Fri May 04, 2018 4:27 pm; edited 1 time in total

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 20290

PostPosted: Fri May 04, 2018 1:48 am    Post subject: Reply with quote

Atha wrote:
Or do you refer to the page fault when the game is run? It must be something else because the game works perfectly when I run it from the desktop (not from the Konsole on the same desktop).

I refer to the game crashing with a null pointer dereference.

Atha wrote:
You won’t believe this!

Actually, this solution is surprisingly common in failed Windows programs.

Atha wrote:
Such a simple solution, when the error message «Unexpected exception: page fault on read…» was so dramatic :?

Any idea why Wine needs you to be in the right directory? I’ve never heard of this before…

Wine does not need you to be in the right directory. This is not a Wine problem. This is a bug in the game. Most likely, they use a relative path to open some critical supporting file. If the game is started with the current working directory set to the game’s install directory, the relative path successfully opens the required file. If the current working directory is anywhere else, the relative open fails. If the open fails, the game crashes. The game should handle the failed open and, at minimum, show a dialog complaining that you invoked it wrong. Ideally, it should locate and open the data file regardless of the current working directory at launch.

Back to top

View user's profile Send private message

Chiitoo
Administrator
Administrator

Joined: 28 Feb 2010
Posts: 2462
Location: Here and Away Again

PostPosted: Fri May 04, 2018 2:27 pm    Post subject: ><)))°€ Reply with quote

I’m a little late to the party here but, yeah, it is indeed a somewhat common issue, that an application doesn’t quite work via Wine if the working directory is something else than where the executable lives.

I’ve oft wondered if it’s somehow possible to re-produce in a native Windows environment, since it’s going unnoticed there, or at least I’ve never bumped into discussion about it.

I forget a little, but did Windows just always set the working directory to where the executable lies, when executed?

Having written some C sharp recently I should probably remember something about this…
_________________
Kind regards,

Chiitoo.

Sore wa sore, kore wa kore.

Back to top

View user's profile Send private message

Atha
Apprentice
Apprentice

Joined: 22 Sep 2004
Posts: 223

PostPosted: Fri May 04, 2018 5:29 pm    Post subject: Reply with quote

Yes, I noticed that this is a very common error message when Windows applications crash. Using the Internet search engine of your choice reveals lots of hits for «Wine Unexpected exception page fault»… (that was my favorite search engine…)

I tried WINEDEBUG=+relay as mentioned in the Wine Developer’s Guide, but the output is not very easy to understand and to me there is no indiciation to what the problem could be.

Some other games still have issues, like Gothic 2 (crashes when I try to save a game) and Syberia (crashes after the intro)… First I thought it might be the same problem for all the applications, but now I see that there are other issues as well…

Anyway, thanks for the responses.

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 20290

PostPosted: Sat May 05, 2018 1:03 am    Post subject: Re: ><)))°€ Reply with quote

Chiitoo wrote:
I’ve oft wondered if it’s somehow possible to re-produce in a native Windows environment, since it’s going unnoticed there, or at least I’ve never bumped into discussion about it.

I forget a little, but did Windows just always set the working directory to where the executable lies, when executed?

Windows (the kernel) does not automatically set the working directory. However, rather than using filesystem symbolic links, the Windows standard for making a file appear in multiple places is a Windows Explorer «shortcut» (.lnk) file. Among other capabilities, shortcuts can specify the working directory for the target program. It is traditional that the Start Menu shortcut (back when the Start Menu existed, anyway) specify the working directory to be something useful. As a result, anyone who uses the shortcut to launch the program gets a good environment. Similarly, if you were to navigate to the install directory and launch it by double clicking, Windows Explorer would launch it with the working directory set to the directory you viewed — the install directory. So the only easy way to launch it on Windows with an unusual working directory is from the command line. Windows users are not known for their use of the command line.

Atha wrote:
Yes, I noticed that this is a very common error message when Windows applications crash.

Again, not what I meant. I referred specifically to how Windows programs tend to assume that the working directory is set to a particular value, and misbehave when that assumption is violated. Crashing is a particularly extreme form of misbehavior, but it’s not the only one seen.

Back to top

View user's profile Send private message

Chiitoo
Administrator
Administrator

Joined: 28 Feb 2010
Posts: 2462
Location: Here and Away Again

PostPosted: Sat May 05, 2018 1:40 pm    Post subject: Reply with quote

Atha wrote:
Yes, I noticed that this is a very common error message when Windows applications crash. Using the Internet search engine of your choice reveals lots of hits for «Wine Unexpected exception page fault»… (that was my favorite search engine…)



There definitely will be lots of hits for that, as it’s not unique to this ‘path issue’, but it would definitely be neat to have a way for Wine to detect it is being an issue.

Quote:
I tried WINEDEBUG=+relay as mentioned in the Wine Developer’s Guide, but the output is not very easy to understand and to me there is no indiciation to what the problem could be.



Right, ‘relay’ is one of, if not /the/ most verbose debug output one can get from Wine, and it’s probably usually useless unless one has an idea of what to look for in it.

I might start with the ‘file’ channel, though I never tried to debug this issue yet personally, and I can’t tell if it would be of any real use either.

Quote:
Some other games still have issues, like Gothic 2 (crashes when I try to save a game) and Syberia (crashes after the intro)… First I thought it might be the same problem for all the applications, but now I see that there are other issues as well…



With regards to Syberia, have you seen and tried what’s being suggested in Wine bug 44009?

Gothic II seems like it requires some workarounds too: WineHQ AppDB — Gothic II

Hu wrote:
Windows (the kernel) does not automatically set the working directory. However, rather than using filesystem symbolic links, the Windows standard for making a file appear in multiple places is a Windows Explorer «shortcut» (.lnk) file. Among other capabilities, shortcuts can specify the working directory for the target program. It is traditional that the Start Menu shortcut (back when the Start Menu existed, anyway) specify the working directory to be something useful.



Thanks!

That’s more or less what I was thinking, but felt there might have been something else involved, too.
_________________
Kind regards,

Chiitoo.

Sore wa sore, kore wa kore.

Back to top

View user's profile Send private message

Atha
Apprentice
Apprentice

Joined: 22 Sep 2004
Posts: 223

PostPosted: Sat May 05, 2018 5:51 pm    Post subject: Reply with quote

Chiitoo wrote:
Quote:
Some other games still have issues, like Gothic 2 (crashes when I try to save a game) and Syberia (crashes after the intro)… First I thought it might be the same problem for all the applications, but now I see that there are other issues as well…



With regards to Syberia, have you seen and tried what’s being suggested in Wine bug 44009?

Thanks! That was the problem, works now!

Chiitoo wrote:
Gothic II seems like it requires some workarounds too: WineHQ AppDB — Gothic II

None of the listed problems seem to be related. Might be a rights problem, since it only crashes when I want to save a game… I will try if reinstalling Gothic II fixes it.

Anyway, thanks for your valuable information! I know I would have found something on the Internet eventually, but you definitely saved me a lot of time and trouble. Thanks!

Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Главная » Уроки и статьи » Железо

Давно не было статей об исправлении ошибок, и вот настало время. Разбираться мы будем с ошибкой out of range на мониторе. Поговорим том, что это такое, о причинах возникновения и методах исправления этой ошибки.

Ошибка out of range

Out of range (рус. вне диапазона) – это ошибка указывающая на то, что сигнал получаемый от видеокарты не входит в рабочий диапазон сигналов монитора.

Out of range на мониторе, исправление ошибки.

Причины ошибки out of range на мониторе

Существует несколько причин возникновения такой ошибки:

  • Изменение частоты обновления экрана на не поддерживаемую монитором.
  • Изменения разрешения экрана на не поддерживаемое монитором.
  • Проблемы с драйверами видеокарты или монитора.
  • Ошибки в работе видеокарты или монитора.

Самые распространенные причины ошибки out of range – первые две, когда монитор не поддерживает разрешение экрана или частоту установленную видеокартой. Такое часто бывает со старым мониторами, или при ручном изменении частоты экрана. Реже выявляются ошибки с драйверами.

Как исправить ошибку out of range

Вот мы и подошли к самой главной части этой статьи, к решению проблемы с out of range на мониторе. Существует несколько возможных способов исправить эту ошибку. Начнем, пожалуй, сразу с самого действенного.

Как убрать out of range – второй монитор

Да это один из почти 100% методов исправления ошибки out of range, если драйвера не при чем, но не у всех есть возможность им воспользоваться, так как нужен второй монитор или телевизор.

1. Подключаете компьютер к другому монитору или домашнему телевизору.

2. Меняете частоту обновления и разрешение экрана на низкие значения, точно поддерживаемые вашим основным монитором.

Дополнительная информация:

  • Как изменить частоту и разрешение экрана на Windows 10
  • Как изменить частоту обновления экрана в Windows 7
  • Как изменить разрешение экрана монитора

3. Подключаете компьютер к первому монитору и проверяете. Если всё в порядке, меняете значения частоты и разрешения экрана на поддерживаемые вашим монитором.

Решение ошибки out of range через безопасный режим

Второй способ это использование безопасного режима Windows.

1. Перезагрузите компьютер в безопасном режиме.

2. Измените частоту и разрешение экрана на поддерживаемые вашим монитором.

3. Перезагрузите компьютер, чтобы проверить решило ли это вашу проблему.

Совет: если изменение параметров не сохраняется при загрузке в обычном режиме, заходите в безопасный режим через  «режим VGA» («Базовое видео» в Windows 10).

Дополнительные ссылки:

  • Как зайти в безопасный режим Windows (до десятки)
  • Как войти в безопасный режим Windows 10

Out of range из-за проблем с драйверами

Другая причина появления ошибки out of range/вне диапазона, это проблемы с драйверами. И если предыдущие способы не помогают, мы рекомендуем переустановить драйвера видеокарты и монитора.

1. Загрузите компьютер в безопасном режиме.

2. Откройте Диспетчер устройств (нажмите Win+Pause, и в левой верхней части окна выберите нужную нам утилиту).

3. В Диспетчере устройств разверните разделы «Видеоадаптеры» и «Мониторы», затем удалите каждое из устройств находящееся в этих разделах. Это можно сделать, выделив устройство и нажав клавишу Delete или кликнув правой кнопкой мыши и выбрав «Удалить».

Переустановка драйверов для исправления ошибки out of range на мониторе.

4. Далее перезагрузите компьютер и позвольте Windows переустановить драйвера для этих устройств, или установите их вручную.

Out of range из-за неисправности оборудования

Бывает и такое, что оборудование ломается или работает неправильно. Один из способов проверить, что вызывает ошибку, монитор или видеокарта, это подключение вашего монитора к другому компьютеру и подключение вашего компьютера к другому монитору.

Пример из жизни

Напоследок вот вам пример из жизни, который и натолкнул нас на написание этой статьи. К нам обратился пользователь Александр с таким сообщением:

«Задал слишком высокую частоту обновления экрана, в результате чего при запуске Виндовс пишет out of range.

Прочитал что надо в безопасном режиме удалить драйвер видеокарты, так и сделал, все запустилось, но после того как я снова устанавливаю драйвер, снова пишет out of range. Как теперь быть?»

После некоторой переписки, в конце концов, Александру помог метод с подключением компьютера к другому монитору или телевизору и уменьшение частоты обновления и разрешения экрана.

Понравилось? Поделись с друзьями!


Дата: 21.06.2017
Автор/Переводчик: Linchak

Понравилась статья? Поделить с друзьями:
  • Ошибка oracle 904
  • Ошибка oracle 40505
  • Ошибка oracle 2291
  • Ошибка oracle 12705
  • Ошибка oracle 12638