Please or Register to create posts and topics.

Custom Elevator Crashes after a Load from save

Page 1 of 2Next

Hi TWP!

I have a problem with the custom elevator I built for my map and it is an odd problem that I can't find any information about on the forums! (Which is a rarity, most stuff has been asked and answered before)...

I have a func_tracktrain, set up to run along some path_tracks. There is a prop_dynamic, some trigger_multiples and a func_brush parented to the train. The prop is the standard elevator. The triggers are for the door/train movement. The brush is a "floor" for the player to stand on.

It all works rather well. From start, to the stop. Player gets out. Elevator continues. Player goes around map solving the puzzle. Exit elevator is called. Player steps in, elevator moves off to the end_level trigger. Sweet. It works "flawlessly".

... Until the map is loaded from a save state ... at any point... stepping back into the elevator after loading a saved game crashes the game. Yes, the game. Not just the map, Portal 2 crashes to desktop, nothing in the console, nothing in the dump file/crash report. No clue as to why this is happening.

I've tried playing with every flag setting/interaction and the cause seems to be the StartForward command for the train (but only after a load remember!).. Resume has the same effect. It is repeatable. I even removed the StartForward Trigger and all is well > Enter the command via ent_fire in the console and bam! instant crash when resuming game..

And this only happens IF the player is standing on/in the brush/train/prop. (I can move the elevator from the sidelines with no problem)..I've turned off collisions, messed with brush/train sizes, meticulously toggled every flag, scrutinised my I/O logic.... I'm at my wits end.. so throwing this open to the gurus.. does anyone know why this is happening ?

Well, it can be a number of things. It will definitely help if you post a test map where that issue keeps hapenning.

From your latest paragraph I'd say that maybe the player gets in conflict with the func_tracktrain route, but this problem is usually followed up by the train simply stopping and an error message appearing on the console.

Is the player triggering something when stepping back into the elevator shaft? (and why is the elevator shaft still open after the player already left it? close it to save rendering areas!)

Try also the console command 'developer 2' to read EVERY I/O events taking place in your map.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]
josepezdj wrote:
Well, it can be a number of things. It will definitely help if you post a test map where that issue keeps happening.

Test map bsp(custom texture NOT pakrat'ed, fast compile), test map vmf and all relevant instances, singular custom texture* all in the zip file attached.. I know my mapping skills are ..erm.. lacking a little, and I'm still not 100% with instances or instance I/O proxies, so it may be a little weird, but it should be followable to you...

Quote:
From your latest paragraph I'd say that maybe the player gets in conflict with the func_tracktrain route, but this problem is usually followed up by the train simply stopping and an error message appearing on the console.

Yes.. I thought this as well, so I set the train to not be blocked by the player (and passable). I had this error message during initial tests ("ignoring train blocked by player") and resolved it by checking those two flags...

Quote:
Is the player triggering something when stepping back into the elevator shaft? (and why is the elevator shaft still open after the player already left it? close it to save rendering areas!)

The whole room is closed off when you leave, but the map is designed to bring you back. One elevator room saves on "space".. maybe try the map and you will get an idea of what is suppose to be happening ? Arrive in the elevator room, leave and "solve puzzle"(push the button), wait 1/2 a second.. enter the room again to call the "exit" elevator, get in it, doors close, then bamn this is where the crash is happening... BUT ONLY AFTER a load from save game... if you are just on the same playthrough there will be no hiccups (elevator will ride up like it is suppose to)...

Quote:
Try also the console command 'developer 2' to read EVERY I/O events taking place in your map.

Very useful tip. Thankyou. Under close scrutiny it is 99% the StartForward command when the player is back inside the elevator that causes the crash (well it is the last I/O fired). If I remove the command from the trigger all is fine until the command is fired (from the console)... I'm sure I'm not setting something up correctly post loaded game... .. ..

*custom texture made by Fourth_Reaper, just thought I should note that and give them credit for it...

OK, the good thing is that for me it works smooth and it doesn't crash >.< I've tried loading several times the map, messing around crossing the door in one way and the other multiple times, I've pressed the button and change the elevator's look, and even entered the 2nd elevator to get upwards this time, without any crash.

Is this little test map also crashing for you?

I guess you already verified the cache files and such, right?

EDIT: damn, I'm stupid, I haven't tried saving/loading to see if it crashes for me. I'll do this evening...

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Yes I've verified the cache.. but I suppose it won't hurt to do it again...
As I stated the map (elevator) works fine for me too.. until I do a savegame.. and load the map from the savgame... that is when it crashes as the elevator goes up the second time, but only after a load from save....

If it is working for you after a load from save, then I'm completely bamboozled as to why it crashes for me (and many others - as per the map on the workshop ) ?

Dude, this could be the most complex elevator ever! :D

Due to its complexity, it's going to be more difficult to debug.

It crashed as well for me after saving/loading and entering the elevator. There is at least 1 instance missing: rdinst_elm_logic.VFM, for which I can't compile, or check the system carefully... can you please post it or send it by pm? (this way is obviously easier than to decompile your BSP). I could try this evening to go deeper into this.

I would like to check all that is triggered right when you are just about to enter the elevator, however, I'd simplify already a lot all these "instances into instances" and many of their variable values.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Doh!.. Sorry.. I've edited the original attachment to include the logics.vmf ... can't have you testing/debugging my logics without giving them to you!... Sorry.

josepezdj wrote:
Dude, this could be the most complex elevator ever!

I'm not sure this is a compliment or not, considering that I made the elevator from scratch!

The reason it's done in "sections" is so that I can quickly and easily replace bits (like swapping the top out for a broken turbine, or the middle for a dirty glass style. I know it would possibly be better to collapse it all into one, but this is the way that I made it...

Boy, I'm not complaining, just saying :D Take it more as a compliment!

I understood your intentions in the very first moment I saw such a carefully designed instances group with all those variable names ;)

K, I'll come back to this later today.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Sorry for the double post, but since the thread went all the way down, I wanted to bump it to make the OP read my progress on the issue :D

OK, after around 4 hours, MANY different changes in some I/O and 40+ crashes >.< this is what I've got:

1. I've discovered a console error message:

Code: Select all
@game_ui.Deactivate(!player)
@game_ui Deactivate(): I have no player when called by @rd_car_train_elevator!
(

However, after removing the I/O related to the game_ui entity or even the entity itself, no change on the crash. Also,

2. It always crashes right when you enter the elevator and it starts moving upwards (last message on the console is "TRAIN(@rd_car_train"), speed set to 100"), BUT only if the player is inside it and move with it: I've triggered all the system and quickly jumped off the elevator and it doesn't crash (ofc I mean after a quick load). This could be a good track. Somehow the player and the train must be colliding and making the game crash. Not any of the I/O triggered when you enter the elevator because it doesn't crash if you are not in...

Also, it crashes exactly when the train starts to go upwards: I've set longer delays and it doesn't crash while you are inside waiting for the train to start going upwards.... The train is well set up to never be solid or blockable by the player though... I even set the elevator prop solidity to see what happens but it keeps crashing.

I still couldn't fix it, or think of a good reason why this only happens AFTER you quickload >.<

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Thankyou for your time Josepezdj... well at least we can both see how utterly bizarre this problem is... and we are both having the exact same fault. I've dome similar bug testing with longer delays, and checking the collision of everything. I'm still confused as to how this can work perfectly until after a load from save! My thinking was that something is happening on MapSpawn that is not happening OnLoadGame .... ..

The problem is the map where I'm using this (and future maps) have several places for the player to die which are all "part of the puzzle", so many people are experiencing this bug, and it kind of ruins the map :(

The only thing I can think of doing is to set the StartForward I/O (or the entire trigger) to once-only, then instead move the "level-end trigger" down to the middle and simply not have the elevator move at the end of the map... it then just doesn't feel like a "real" elevator.... :(

Page 1 of 2Next