Cities: Skylines

Cities: Skylines

Extended Road Upgrade
B3NW 15 Mar, 2015 @ 10:22am
Bug report: One way roads editing doesn't work in ubuntu
You can downgrade roads perfectly fine but you cannot change roads to one way roads unfortunately. The roads just don't seem to highlight in that mode, making it impossible to make a selection
< >
Showing 1-15 of 25 comments
Wiliz  [developer] 15 Mar, 2015 @ 11:07am 
Thank you for reporting this. The mod was tested on Windows and OS X, but not on Linux. I don't have any test setup to test it right now, but I will see what I can do.
B3NW 15 Mar, 2015 @ 11:24am 
Thanks for the response! If you need any help getting started on testing for linux then I'd be happy to assist in getting you setup, otherwise I'm happy to test any potential fixes with you.
Dr. Nya 15 Mar, 2015 @ 2:22pm 
It looks like it's caused by some Unity threading shenanigans.

Hovering over road segments will cause a "get_transform can only be called from the main thread" exception.

Moving OnBeforeSimulationTick code to OnUpdate solves the issue, since it belongs to the main thread. Is separating those two parts crucial in any way? I wonder why this problem doesn't manifest itself on Windows.
Last edited by Dr. Nya; 15 Mar, 2015 @ 2:36pm
boldos.cz [\\"BC] 15 Mar, 2015 @ 2:42pm 
Confirmed, does not work :(

Running on Ubuntu Gnome. The tool "does nothing" if I hower my mouse over a one a road using a one way upgrade. What works is the report that "This road is already two way." when tying to use a two way upgrade on a two way road, otherwise nothing.

Ok, will try to hold my breadth for the update, please please, nicely please :D
Last edited by boldos.cz [\\"BC]; 15 Mar, 2015 @ 2:43pm
Wiliz  [developer] 15 Mar, 2015 @ 3:22pm 
Originally posted by Dr. Nya:
It looks like it's caused by some Unity threading shenanigans.

Hovering over road segments will cause a "get_transform can only be called from the main thread" exception.

Moving OnBeforeSimulationTick code to OnUpdate solves the issue, since it belongs to the main thread. Is separating those two parts crucial in any way? I wonder why this problem doesn't manifest itself on Windows.

This is very useful information. Moving all of the code to OnUpdate is likely to cause other issues, because it needs to run in sync with the simulation. However, it is probably possible to move just the parts that reference Unity's transforms and such to OnUpdate.
B3NW 15 Mar, 2015 @ 5:32pm 
Thank you Dr Nya for looking into the issue. Hopefully Wiliz is able to work out a fix! :)

As for why the bug appears in linux, that's one of the issues with api's on different platforms, without rigirous testing, the littlest difference between the two can mean the same input can give a different output. However it's strange something as important as the threading isn't abstracted enough so that these differences shouldn't be an issue.
haimat 16 Mar, 2015 @ 4:09am 
Just wanted to confirm that I have the same issue on a Linux Debian box.
Crossing fingers for a fix :-)
Dr. Nya 16 Mar, 2015 @ 7:44am 
Originally posted by Wiliz:
This is very useful information. Moving all of the code to OnUpdate is likely to cause other issues, because it needs to run in sync with the simulation. However, it is probably possible to move just the parts that reference Unity's transforms and such to OnUpdate.

Moving the code around does indeed cause some weird issues like roads not always connecting to each other properly. However, I think I managed to create a workaround. I've made a pull request:

https://github.com/viakmaky/Skylines-ExtendedRoadUpgrade/pull/1

People with a bit of spare time are welcome to build and test it.
cpw 16 Mar, 2015 @ 2:05pm 
@ Dr Nya, how to test? Happy to give it a try. Seems a few mods are running into this issue...
Dr. Nya 16 Mar, 2015 @ 3:20pm 
Originally posted by cpw:
@ Dr Nya, how to test? Happy to give it a try. Seems a few mods are running into this issue...

Proper way would be to clone the repository, run xbuild/use your IDE of choice, then replace the original workshop mod with the built DLL.

If you aren't that savvy, here's a prebuilt assembly on Dropbox:
https://www.dropbox.com/s/00uzokekcgho1xo/ExtendedRoadUpgrade.dll?dl=0

Either plop it into ~/.local/share/Colossal Order/Cities_Skylines/Addons/Mods and disable the workshop subscription (to avoid conflict with the workshop download),

or replace the corresponding DLL that should be somewhere in the ~/.steam/steam/steamapps/workshop/content/255710 directory.


I could probably set it up as a workshop item to allow easier install, but that won't be quite fair to Wiliz, so I'd wait until he accepts the pull request and/or updates the mod.
Last edited by Dr. Nya; 16 Mar, 2015 @ 3:30pm
boldos.cz [\\"BC] 16 Mar, 2015 @ 3:51pm 
HALELUYAH!!! Works for me :) (on Ubuntu).
Thank you very, very much! :)
Wiliz  [developer] 16 Mar, 2015 @ 4:13pm 
I haven't accepted the pull request yet, because even though it might fix the issue on Linux, it might also cause new issues on other platforms because of the way the code was changed. In this fix some code was moved to the main thread that the game's own tools do in the simulation thread instead. It could cause crashes and/or data corruption.

His suggested fix is very helpful in figuring out the exact issue though.
Wiliz  [developer] 16 Mar, 2015 @ 5:19pm 
I have just uploaded a new version that I think might fix the issue. If anyone wants to give it a shot, it would be much appreciated! Please let me know if the issue is still there and I will continue to investigate it.

You can get the update from Steam or download the dll directly from https://github.com/viakmaky/Skylines-ExtendedRoadUpgrade/raw/master/dll/ExtendedRoadUpgrade.dll
yt 🍆 16 Mar, 2015 @ 5:42pm 
Wiliz,

Doesn't work for me. Tried unsubscribing and resubscribing (making sure the mod didn't exist in-between) and also downloading your DLL and replacing it directly (to triple check that I wasn;'t using the old version). I still face the same issue on Ubuntu 14.04.

Downloading Dr. Nya's DDL and overwriting /home/me/.steam/steam/steamapps/workshop/content/255710/408209297/ExtendedRoadUpgrade.dll did fix the issue though.

Thanks for being so retroactive in fixing this.
Last edited by yt 🍆; 16 Mar, 2015 @ 5:45pm
Wiliz  [developer] 16 Mar, 2015 @ 6:14pm 
Thank you for testing it. I still have a couple of ideas what might be causing it, but at this point I will probably just set up a testing environment so that I can do it properly at once.
< >
Showing 1-15 of 25 comments
Per page: 1530 50