log of failed level transition CoC

Nuor
Scavenger
Posts: 10
Joined: 11 Nov 2012, 20:22

log of failed level transition CoC

Postby Nuor » 14 Feb 2016, 14:15

This is the pertinent bit of my log on attempting a failed level change from Cordon to Marsh near railroad bridge. The game was crashing so I put a check for nil in "function motivator_binder:save_state(m_data)" that allowed bypass of the crash (The teleport failed but no crash). This is in a game with usable existing saves including movement between garbage and cordon with no crashes. http://pastebin.com/jmC4pbPq

You may already have this but I thought it couldn't hurt.

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1368
Joined: 26 May 2012, 22:26

Re: log of failed level transition CoC

Postby Alundaio » 16 Feb 2016, 09:45

Yes, it was a useful starting point.

From my years of debugging these errors usually occur when the lua thread breaks. For some reason 1.6 they put lua on it's own thread and it makes debugging almost impossible. It almost means you can't use coroutines like you could in Shoc. :( But I guess they thought it's more important for the game to keep running if there is a lua error.

For example if you do something like alife():object(nil) there will be no error, the script will simply stop executing. If this happens in an object binder script then stuff will go completely wrong. You will get C Stack Overflow errors because State Mgr can't update properly and endless create new actions. You will get save corruption because object binder save method never fires. You will see stuff like self.object equal nil. It's a total nightmare.

I think about a year ago I finally discovered the C Stack Overflow error that happens in vanilla CoP sometimes. It was caused in state_mgr_weapon.script because some how it's possible for npc:best_weapon to be nil, using mods like Rulix AI made this more likely to occur, and nil was being passed as a param to an engine method. There is also another cause of C Stack Overflow in CoP in Jupiter. There is a bad waypoint on top of the Scientist Bunker that breaks xr_walker and eventually if you spend enough time around that area the game will crash with C Stack Overflow.

Seems the only way to find these is to just line all the code with print functions. It's why CoC is littered with alun_utils.debug_write. I just use Notepad++ to uncomment them all and debug. I wish there was a better way.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

Nuor
Scavenger
Posts: 10
Joined: 11 Nov 2012, 20:22

Re: log of failed level transition CoC

Postby Nuor » 16 Feb 2016, 13:03

I noticed the debugging change when I was adapting some mods from SHOC. It was frustrating and resulted in me reduced to pulling changes and adding one new file or even function at a time to isolate what was causing some problems. I'm mightly impressed with the speed you are able to track down and fix existing problems. You seem to turn out masses of new code at the drop of a hat :) .


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest

cron