Page 1 of 1

"Rails can not be mined"

Posted: Wed Jul 17, 2013 7:25 pm
by Freetambo
Hi all,

I'm trying to construct a rail system but it consistently fails to work well. I don't mind tinkering with it a bit, but now I can not seem to remove rail. I get the message that the "object can not be mined". Has anyone ever encountered this? If so, what do I do?

Cheers,
Freetambo

EDIT:
Some more info: if I build a new branch, I can delete track, but once I get to my main loop it say "this can not be mined"....

Re: "Rails can not be mined"

Posted: Wed Jul 17, 2013 7:36 pm
by slpwnd
Could you post a link to your save? This used to be a problem couple of months ago but should be fixed by now. The old saves can still have this kind of rails though.

Re: "Rails can not be mined"

Posted: Thu Jul 18, 2013 4:01 pm
by Freetambo
Hi,

Save is in attach.

I've just realized I'm using an old version (I'm not a smart man). I was without reliable internet for a while so I didn't bother with updating... Version info: 0.5.2 build 5327 win64. I'm on Windows 7.

I've just updated to 0.5.3, and yes, the problem persists. I guess I'll just have to start a new game then?

Re: "Rails can not be mined"

Posted: Thu Jul 18, 2013 5:42 pm
by slpwnd
Thanks for the save I had a quick look at it and it looks like a serious bug. Most of the rails actually cannot be mined.

In which version did you start the game? Was it 0.5.2 or earlier? Also did you do remember doing anything "non-standard" with the train / rails?

As a sidenote there is a workaround to destroy objects. Make sure the rail tracks are selected. Open the console (~) and type

Code: Select all

game.player.character.getselected.die()

Re: "Rails can not be mined"

Posted: Thu Jul 18, 2013 7:02 pm
by Freetambo
Thanks for the quick response!

I started in 0.5.2, it's the only version I ever had.

Thanks for the tip on destroying rails, but I just started a new game, which is way cooler anyway, so nothing lost!

Re: "Rails can not be mined"

Posted: Thu Jul 18, 2013 7:09 pm
by Freetambo
Totally forgot to say what I was doing;

You see my rail network basically consist of a Northern Loop (which in turn has two sort-of loops) and a Southern Loop. The southern loop was just added. I added a train to the southern loop (the northern one already had one), but the trains wouldn't run. So I started messing around with the Northern Loop: as you can see it's double track between the main unloading station and where it splits to go to the two loading stations; I also added signals etc. It seems I messed up diagonal double track section? The two tracks seemed to be connected, forming one block, I think that was the problem why I couldn't get the trains to run, but I could never find out since I couldn't change it.

None of this should have been non-standard, but who knows, it might help. I don't have earlier saves that could help out. I spent so much time trying to figure out why my trains weren't running that the autosaves are newer than the save posted.

Re: "Rails can not be mined"

Posted: Fri Jul 19, 2013 3:09 pm
by Chaia
I've got the same problem with a fresh game in 0.5.1.
Is there any way to give "admin-rights" for destroying the railways without typing the destroy command for each tile?

Re: "Rails can not be mined"

Posted: Fri Jul 19, 2013 7:16 pm
by slpwnd
Chaia wrote:I've got the same problem with a fresh game in 0.5.1.
Is there any way to give "admin-rights" for destroying the railways without typing the destroy command for each tile?
Unfortunately there is no "admin" mode for the rails. This is not supposed to be happening - basically the data structures are corrupt and the engine thinks there is a train on those rails. Therefore it is not possible to mine them.

@Freetambo

So I took that save, cleared the corrupted state (programatically not manually:)) and kept riding around in a train for a while. However everything seems to be fine. I used 2 trains, automatic vs. manual, building rails while the train was riding, etc. All the potentially troublesome scenarios I could think ok. Anyway I will keep looking into this and it will hopefully be fixed for 0.6.0.

Re: "Rails can not be mined"

Posted: Sat Jul 20, 2013 9:40 am
by Freetambo
So it's seems my computer messes things up, since it does this in my other game (newer version) as well. Is there anyway I could send more information on what's going one?

Re: "Rails can not be mined"

Posted: Sat Jul 20, 2013 3:53 pm
by slpwnd
I don't think it is your system that causes this error. Anyway there is a way you could help us to solve this one ...

Here is the save you posted with fixed rails: http://kozelek.cz/stuff/factorio/tjo_fixed.zip. It would be great if you could:
1) set show_rolling_stock_count to value "always" in your config.ini file.
2) Continue playing the game.
3) There should be small colorful circles on the tracks below the train, like this: http://kozelek.cz/stuff/factorio/tjo_fi ... xample.jpg.
4) If you notice that there are popping up these circles somewhere else than under the train then let us know (and ideally also how did you manage to do that / how did that happen) - we need to reproduce this scenario in order to fix it.

Those small dots are some state information that there is the train on the track. In both of your saves you posted they were basically everywhere. Which is not supposed to happen under regular circumstances.

Thanks.

Re: "Rails can not be mined"

Posted: Sat Jul 20, 2013 7:27 pm
by Chaia
I've fixed the rails at the railway switch as only these make problems for running trains. I will report if I see any new broken rails

Re: "Rails can not be mined"

Posted: Sun Jul 21, 2013 10:26 am
by Freetambo
Alright, I will try around.

As a side note: I tried to get my other game to work (like that one better), but I couldn't get game.player.character.getselected.die() to work.

What exactly do you mean by "Make sure the rail tracks are selected"? Should I hover over them with the mouse?

Re: "Rails can not be mined"

Posted: Sun Jul 21, 2013 12:31 pm
by Chaia
Exactly, you hover your mouse over the rail like you select anything else for mining, so the blue rectangle appears.
Then enter the cheat-code and the rail disappear and you can build a new one.

Pro tip: for function only you need to remove the rails at railway switches and intersections

Re: "Rails can not be mined"

Posted: Mon Jul 22, 2013 4:32 pm
by slpwnd
Any update on this one? If you could tell us when it starts happening that would be a great help (the visualization for rolling_stock_count should spot it immediately).

Re: "Rails can not be mined"

Posted: Tue Jul 23, 2013 3:30 pm
by kovarex
In 0.6.0 there will be more strict checks that will stop (crash) the game in the moment it gets wrong, this might help to find the moment when it got corrupted.

Re: "Rails can not be mined"

Posted: Tue Jul 23, 2013 7:24 pm
by Freetambo
I've been spending quite some time in the game (too much, some would say) expanding my network, adding signs etc. but the bug has not yet reappeared. It just works gloriously fine.

One thing I haven't mentioned is that I sometimes play the game one battery power on my laptop, and that I end up tweaking "just one more thing" before power runs out, I'm sure you know the feeling. Anyway, if the laptop hibernates, the game crashes on recovery. I don't think this could be related (probably why I didn't mention it) because a: of course you go back to a save before the hibernation, and b: I don't think the two events (hibernation and crash) ever happened close together. But maybe if the autosave happened right during hibernation (something very hard to time manually, so I haven't been able to check), something could get messed up?

Re: "Rails can not be mined"

Posted: Tue Jul 23, 2013 8:14 pm
by kovarex
Freetambo wrote:I've been spending quite some time in the game (too much, some would say) expanding my network, adding signs etc. but the bug has not yet reappeared. It just works gloriously fine.

One thing I haven't mentioned is that I sometimes play the game one battery power on my laptop, and that I end up tweaking "just one more thing" before power runs out, I'm sure you know the feeling. Anyway, if the laptop hibernates, the game crashes on recovery. I don't think this could be related (probably why I didn't mention it) because a: of course you go back to a save before the hibernation, and b: I don't think the two events (hibernation and crash) ever happened close together. But maybe if the autosave happened right during hibernation (something very hard to time manually, so I haven't been able to check), something could get messed up?
I bet my shoes that it is related :)

Re: "Rails can not be mined"

Posted: Wed Jul 24, 2013 5:50 pm
by Freetambo
In that case, sorry for not telling you.

Is there a simply way to time the hibernation to coincide with autosaving? Or maybe it is just not needed. I'll try to get some forced hibernation going on this evening to see if I can screw up my game. I'm counting on you guys to fix it if I do!

Re: "Rails can not be mined"

Posted: Wed Jul 24, 2013 8:23 pm
by n9103
One way to avert the problem (other than never wearing the battery down to the point of hibernation while in-game *eyeroll* :p) would be to never use the most recent save after a hibernation event.

Re: "Rails can not be mined"

Posted: Wed Jul 24, 2013 8:46 pm
by Freetambo
One way to avert the problem (other than never wearing the battery down to the point of hibernation while in-game *eyeroll* :p) would be to never use the most recent save after a hibernation event.
Obviously so. But we're not 100% sure that it is the problem, and of course this shouldn't happen in the first place.

Anyway, I just recovered from a hibernation event. The train is still running in the most recent save, but that was a minute or so before the hibernation happened. So it could (in my mind) never have been affected by the hibernation. Have to quit now, otherwise I would have seen if the problem arises later.