ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Single player bugs
The Pripyat CTD...how to fix?

1 2 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  20:20:05  6 October 2007
profilee-mailreply Message URLTo the Top
kmooneyham
(Novice)
 
On forum: 10/06/2007
Messages: 3
The Pripyat CTD...how to fix?

Hello all,

I finally figured out what causes the CTD in Pripyat that so many players have...the death of a gray mutant dog...it normally is killed by an electrical anomaly in the center of the map...but anything which kills the dog (including you, the player) will cause the CTD...so, how does this get stopped? I cannot finish this game due to this bug...either the dog must be kept alive, or removed from the level so it cannot die...please, if anyone knows how to accomplish this, reply...I WANT TO FINISH! Thank you and good day to you all.

Kirk
  21:32:51  6 October 2007
profilee-mailreply Message URLTo the Top
Nightwatch
Senior Resident
 

 
On forum: 08/13/2007
Messages: 952
I should suggest you that you read the "Crash To Desktop (CTD): Causes and Treatment - A NatVac FAQ" thread on this issue. You can find an answer there.
Good Luck.
[link]https://www.gsc-game.com/index.php?t=community&s=forums&s_game_type=xr&thm_page=1&thm_id=11715&sec_id=12[/link]
  23:25:59  6 October 2007
profilee-mailreply Message URLTo the Top
kmooneyham
(Novice)
 
On forum: 10/06/2007
Messages: 3
Requested info...

OK, I have checked a couple of the things requested: My error is as follows (per the log file):

FATAL ERROR

[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:stalkerpatch_1_0004xr_3daxrGamescript_engine.cpp
[error]Line : 73
[error]Description : <no expression>
[error]Arguments : LUA error: ...w of chernobylgamedatascriptssmart_terrain.script:1137: attempt to call method 'smart_terrain_id' (a nil value)



My hardware is as follows: MSI Motherboard (K9N4 Ultra), Athlon 64 X2 3800 processor, 2 GB of DDR2 RAM, NVidia Geforce 7950 with 512 MB RAM, old-school Creative Audigy soundcard, Benq DVD drive, 450 Watt Power Supply (Antec)...all in all nowhere near the fastest machine, but not a piece of junk either...Running WinXP SP2 with all the latest patches, and the NVidia Drivers are the latest 163s...

Anyway, maybe this all makes a difference...maybe not...if you can help, thank you. Have a great day,

Kirk
  03:20:15  7 October 2007
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4255
We can get around this one issue by testing for the existence of the function for that beast in the script. I don't know if other problems would surface, but I wouldn't think so; this is in the on_death() function and not much willl happen when that psydog dies.


What you can do, assuming you are not already running mods:

1) Go to the Mod Discussion section and read the "How to mod STALKER" sticky topic, the early post which tells you where to get the database file extractor. Download it, then extract gamedata.dbb only. When you are done, you should have a gamedata folder in your STALKER installation directory.

2) Edit the gamedata\scripts\smart_terrain.script file with a text editor like Notepad. In the on_death() function, line 1137 looks like this:

	local strn_id = obj:smart_terrain_id()


Before that line, put this line*:

	if obj == nil or obj:smart_terrain_id == nil then return end


3) After saving your change, make sure the game uses the change by modifying the second line in fsgame.ltx, changing any false to true. The line should look like this:

$game_data$   	= true|	true|	$fs_root$|	gamedata\


4) Play. That pseudodog won't cause a crash there.

_____________
*You might also need to put the same line in the next function, called unregister_npc(), above the other "local strn_id = obj:smart_terrain_id()" line there...
  01:24:39  1 June 2008
profilee-mailreply Message URLTo the Top
jbarton@cascribe.com
(Novice)
 
On forum: 06/01/2008
Messages: 1
Surprising

Why haven't the Developers added this line to an update of the program. This post is a year old. I am having this same problem today. I've been programming for 32 years - I don't procrastinate like that. Is this the kind of attitude we can expect in Clear Sky as well?


---QUOTATION---
We can get around this one issue by testing for the existence of the function for that beast in the script. I don't know if other problems would surface, but I wouldn't think so; this is in the on_death() function and not much willl happen when that psydog dies.


What you can do, assuming you are not already running mods:

1) Go to the Mod Discussion section and read the "How to mod STALKER" sticky topic, the early post which tells you where to get the database file extractor. Download it, then extract gamedata.dbb only. When you are done, you should have a gamedata folder in your STALKER installation directory.

2) Edit the gamedatascriptssmart_terrain.script file with a text editor like Notepad. In the on_death() function, line 1137 looks like this:

	local strn_id = obj:smart_terrain_id()


Before that line, put this line*:

	if obj == nil or obj:smart_terrain_id == nil then return end


3) After saving your change, make sure the game uses the change by modifying the second line in fsgame.ltx, changing any false to true. The line should look like this:

$game_data$   	= true|	true|	$fs_root$|	gamedata


4) Play. That pseudodog won't cause a crash there.

_____________
*You might also need to put the same line in the next function, called unregister_npc(), above the other "local strn_id = obj:smart_terrain_id()" line there...
---END QUOTATION---

  22:16:02  1 June 2008
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4255
Maybe the devs can't duplicate it. I heard they are not paying any real attention to SoC until after the Clear Sky release.

The problem might be fixed in the later releases, or by using the Zone Reclamation Project, although you might need to start a new game.*

The answer is old. It turns out that it fixes one of the two related crashes: The entity is not valid, or the entity is not really a properly-created mutant with an associated smart_terrain_id() member function. If obj is nil (non-existent), the snippet will work, but if it is real but not properly registered, then the game will crash anyway; you can't test for the existence of an engine (C++) function like you can a Lua function.

If you get the second crash, it may be possible to insert a bit of code to determine if the object is the kind that has the right function, and just return if not.

__________
*With the feature The Zone Is Open in the recent ZRP 1.05 test releases, starting over is not a big deal. You can start a new game, then press Esc to return to the main menu, then press T to access the ZRP Teleport dialog (courtesy TSL16b). There, you can select the Pripyat chapter and jump to Pripyat, picking up the game at that point.

Current ZRP download site:
[link]http://www.metacognix.com/stlkrsoc/[/link]
  19:32:20  18 June 2008
profilee-mailreply Message URLTo the Top
kmooneyham
(Novice)
 
On forum: 10/06/2007
Messages: 3
Pripyat Gray Mutant Dog STILL Causes CTD!

All right,

After many months of being gone, and upon my return, I finally got back to playing STALKER...reinstalled and patched up to the latest...now, after a bit, I am back to Pripyat...and the gray mutant dog...this time I found I can CTD if I KILL HIM...he did NOT run into electrical anomoly, I shot him on principal of shooting mutant dogs and CTD! So, I had also tried to insert those lines before, but no help...this is where it stands...if I can keep this dog alive, I might be able to finish...if not, ?! If anyone is still playing this game and can figure out how to simply REMOVE the dog from the game, so that he cannot be there to be killed and CTD, please let me know...I STILL WANT TO FINISH THE GAME! Thank you.
  00:29:09  19 June 2008
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4255
This assumes you mean pseudodogs and not blind dogs.

There are four grey pseudodogs in the all.spawn for Pripyat, and the game can respawn others as needed. Your problem is likely with one of the default pseudodogs, maybe the Pripyat psydog (there's only one).

Patching from 1.0004 to 1.0006 does not change much in the game. The all.spawn file, which contains the declarations for many of the game's creatures, is the same for patches 1.0004, 1.0005 and 1.0006. You likely have a corrupt all.spawn, if you started a new game this time around and still have the problem.

I mentioned in the my post above yours that you will still get a crash if the entity is incorrectly defined in the game. But it sound like you didn't even try.

There are at least three things you can do.

1) Just make a run for the stadium exit at the north end of the map. If you get there before the dog dies, you won't have to worry about it. Avoid switching the dog online by staying at least 150 meters (default switch_distance) away from where it is. Maybe by following the east boundary of the Pripyat level, you can avoid the crash.

2) Download the 1.05 ZRP per my previous post, start a new game, select the Pripyat Point of Progress from the ZRP Teleport dialog, and pick up your game there. Yes, you'll have to play through that portion again, but it is not that big of a deal compared to playing through the whole game. And the ZRP works with all the recent patches.

3) Patiently work with me to identify the dog so that it can be handled differently. Don't go away for eight months, and then come back and say nothing about whether it worked or not.

For this approach to work, you will need to download and install the ZRP 1.05 test version anyway. Then you will need to insert some debug code in the same place as mentioned above. When you load a saved game near that dog and then kill it, the game will crash -- but you will have the name of the dog in the log file. We can then check for it to avoid handling it the same way.

You can also try to re-install from the DVD, but there is no guarantee that the problem isn't in the data on the DVD, or due to a bad read by your DVD drive.
  10:12:07  23 March 2011
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4255
Updates:

This crash was fixed on the fly in ZRP 1.07 by checking for the type of the member function. Using the colon operator doesn't work in my example above (it still attempts to access smart_terrain_id as a function, but it is nil), but it will probably work if you replace the colon in that earlier example with a period:

	if obj == nil or obj.smart_terrain_id == nil then return end


You can also check the type of the function, probably overkill for this particular 'nil' error. See the on_death() and unregister_npc() functions in scripts\smart_terrain.script in ZRP 1.07 (or later).

Also, the instruction to only extract gamedata.dbb is only valid if you are using patch 1.0004, as patch 1.0005 included gamedata.dbc. If you are running with patch 1.0005 or 1.0006, you should also extract gamedata.dbc after extracting gamedata.dbb. If you only extract smart_terrain.script with Don Reba's extractor, you're okay. (Or use ZRP 1.07 if otherwise running unmodded.)

Details:

The error seems to be the result of processing the death of an improperly formed entity, either from using a save made with 1.0001/1.0003's all.spawn or in certain mods that seem to create these broken entities.

In the case of games based on the older all.spawn, there's a psydog that belongs to a smart terrain in Pripyat as mentioned earlier. It turns out that this psydog is not normally in the game as of patch 1.0004, as there is nothing to change the flags which keep the pri_depot smart terrain offline, something that Lijenstina reported recently.

But he can be in the game if the save game was based on an older all.spawn. Games based on patch 1.0003 or earlier processed these flags differently.

"Big deal," I hear you saying. "There's a psydog in Red Forest."

Yes, there is. But that psydog doesn't belong to a smart terrain. This one does.

Psydogs are derived from strong pseudodogs (gray coloring), but then their class is changed (pseudodog class identifier is SM_P_DOG, psydog's is SM_DOG_P). Psydogs have the ability to generate phantoms of themselves, but they have issues. One is that upon death, they don't reset the visibility indicator (cf. the Red Forest psydog; fixed by save/reload). Another, apparently, is that they don't support the method smart_terrain_id(). Both of these issues may be because they not derived from cse_alife_monster_abstract, as are all the rest of the "real" (non-phantom) mutants. That class has that method.

Since the Pripyat psydog is assigned to a smart terrain, when it dies the corresponding on_death() function is called in smart_terrain.script.* But the psydog class doesn't support the smart_terrain_id() function, so it crashes with the aforementioned error:

[error]Arguments : LUA error: ...w of chernobyl\gamedata\scripts\smart_terrain.script:1137: attempt to call method 'smart_terrain_id' (a nil value)

__________
*Think of it as the game's attempt to keep the dead from voting in the next smart terrain elections. This helps the game adjust the population counts etc. for the assigned smart terrain.
  17:35:12  9 May 2019
profilee-mailreply Message URLTo the Top
khazalid
(Novice)
 
On forum: 05/09/2019
 

Message edited by:
khazalid
05/09/2019 23:01:49
Messages: 1
Hello, sorry for necroing this thread but I was not able to find any other mention of this specific issue anywhere.

The issue occurs in Steam version 1.0006 on Windows 7.
No mods are installed.

Initially I encountered this issue as described by OP. A blind dog spawns on Pripyat level inside the Monolith HQ and killing it results in CTD (not always, see below).

I was able to further test this issue. The dog spawns inside or around the staircase on the right of the main entrance to the HQ when looking from the plaza with the statue. Killing it at the ground level does not seem to lead to CTD, however if the base is entered via the roof of the ramp that leads from the hotel and the player gets to the second floor, the dog will spawn on that floor and killing it there will result in immediate CTD with no ERROR logs present in XRAY file.
The dog can be ignored and as long as it lives the issue as described above will not manifest.

However any save file created AFTER the dog spawns at all will be corrupted and will lead to immediate CTD upon any attempt to load it, resulting in pretty much a progression block.
This behaviour in turn provides some logs, as below:

FATAL ERROR

[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line : 73
[error]Description : <no expression>
[error]Arguments : LUA error: ...alker shadow of chernobyl\gamedata\scripts\_g.script:20: bad argument #2 to 'format' (string expected, got no value)

Now I am pretty sure the issue being 12 years old is not going to be addressed but maybe someone sometime will come up with a patch for it, so I decided to provide as much information as I could. I am also able to provide a save file just prior to the issue occurrence if requested.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Single player bugs
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2019 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.