Помощь в решение вопросов с различными ошибками на Oshibaetsya.ru
Ошибка 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;
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.
ugly
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.
Checking Boolean causes Error: Out of Global Vars range
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:=1to28do begin FindDeformedBitmapToleranceIn(bmpOrt,x,y,InvBox(i).X1,InvBox(i).Y1,InvBox(i).X2,InvBox(i).Y2,10,0,true,ortAcc); if ortAcc>0.5then begin writeln(i); Break; end; end;
FreeBitmap(bmpOrt); end;
begin SetupSRL; OutOfRange; end.
The problem is that you have run out of global variables which is indeed the case.
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?
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
Alright then thanks both of you for the clarification ^^
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
Originally Posted by Brandon
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)
Posted: Wed May 02, 2018 6:41 pm Post subject: [SOLVED] Wine: Unhandled exception; from Konsole(KDE/Plasma)
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:
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:
<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
Hu Moderator
Joined: 06 Mar 2007 Posts: 20290
Posted: Thu May 03, 2018 2:21 am Post subject:
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
Atha Apprentice
Joined: 22 Sep 2004 Posts: 223
Posted: Thu May 03, 2018 5:27 pm Post subject:
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:
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:
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
Atha Apprentice
Joined: 22 Sep 2004 Posts: 223
Posted: Thu May 03, 2018 6:29 pm Post subject:
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…)
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
Hu Moderator
Joined: 06 Mar 2007 Posts: 20290
Posted: Fri May 04, 2018 1:48 am Post subject:
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
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2462 Location: Here and Away Again
Posted: Fri May 04, 2018 2:27 pm Post subject: ><)))°€
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
Atha Apprentice
Joined: 22 Sep 2004 Posts: 223
Posted: Fri May 04, 2018 5:29 pm Post subject:
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
Hu Moderator
Joined: 06 Mar 2007 Posts: 20290
Posted: Sat May 05, 2018 1:03 am Post subject: Re: ><)))°€
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
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2462 Location: Here and Away Again
Posted: Sat May 05, 2018 1:40 pm Post subject:
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
Atha Apprentice
Joined: 22 Sep 2004 Posts: 223
Posted: Sat May 05, 2018 5:51 pm Post subject:
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
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 – второй монитор
Да это один из почти 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 или кликнув правой кнопкой мыши и выбрав «Удалить».
4. Далее перезагрузите компьютер и позвольте Windows переустановить драйвера для этих устройств, или установите их вручную.
Out of range из-за неисправности оборудования
Бывает и такое, что оборудование ломается или работает неправильно. Один из способов проверить, что вызывает ошибку, монитор или видеокарта, это подключение вашего монитора к другому компьютеру и подключение вашего компьютера к другому монитору.
Пример из жизни
Напоследок вот вам пример из жизни, который и натолкнул нас на написание этой статьи. К нам обратился пользователь Александр с таким сообщением:
«Задал слишком высокую частоту обновления экрана, в результате чего при запуске Виндовс пишет out of range.
Прочитал что надо в безопасном режиме удалить драйвер видеокарты, так и сделал, все запустилось, но после того как я снова устанавливаю драйвер, снова пишет out of range. Как теперь быть?»
После некоторой переписки, в конце концов, Александру помог метод с подключением компьютера к другому монитору или телевизору и уменьшение частоты обновления и разрешения экрана.