Skip to main content
Topic: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^ (Read 6825 times) previous topic - next topic

[Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Colin has spotted a bug : if you try to add or remove electrification, you will find that your money increases drastically.


Re: [Bug v4.5] A Easy Way to Become a Billionnaire ^_^

Reply #1
Thank you for the report - problem found and will be fixed in the next version :-)
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

 

Re: [Bug v4.5] A Easy Way to Become a Billionnaire ^_^

Reply #2
WTF, this has been a problem in simutrans-standard a long time ago... and it was not in the 4.4 version...

Why is this problem always comping back...

Re: [Bug v4.5] A Easy Way to Become a Billionnaire ^_^

Reply #3
Because the base values for the price of the way object is an unsigned integer. If that is used in the accounting without casting, where a - is used, it overflows and becomes a very high number. The fix is to cast it to a signed integer somewhere, but, if the code is changed around, somebody might well forget to cast it back again.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: [Bug v4.5] A Easy Way to Become a Billionnaire ^_^

Reply #4
Because the base values for the price of the way object is an unsigned integer. If that is used in the accounting without casting, where a - is used, it overflows and becomes a very high number. The fix is to cast it to a signed integer somewhere, but, if the code is changed around, somebody might well forget to cast it back again.

That explains it

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #5
WTF, this has been a problem in simutrans-standard a long time ago... and it was not in the 4.4 version...

Why is this problem always coming back...

This post by Nathan is strange to me because, the many years that I have been playing Simutrans this is the first time I have come across this particular phenomenon. I must have missed a version somewhere down the track.
I may not agree with what you say, but I will defend to the death your right to say it

Thought for the day

 When you are up to your backside in alligators, it is difficult to remind yourself that your initial objective was to drain the swamp.

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #6
This post by Nathan is strange to me because, the many years that I have been playing Simutrans this is the first time I have come across this particular phenomenon. I must have missed a version somewhere down the track.

I think I made a mistake:
I interpreted electrifaction as laying power lines between a power factory and another factory, but what was meant here was electrification of tracks

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #7
I think I made a mistake:
I interpreted electrifaction as laying power lines between a power factory and another factory, but what was meant here was electrification of tracks

I thought I had'nt seen this bug before. Yes it is electrification of Tram & Train lines.
I may not agree with what you say, but I will defend to the death your right to say it

Thought for the day

 When you are up to your backside in alligators, it is difficult to remind yourself that your initial objective was to drain the swamp.

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #8
I thought I had'nt seen this bug before. Yes it is electrification of Tram & Train lines.

Thats what I mean, this particular bug indeed didn't exist before (as far as I know), but a similar bug with powerlines did

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #9
This bug seems to be reappeared in ver 6.1 again.

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #10
Thank you for the report - I will have to look into this...

Edit: I cannot reproduce this. Can you give more details about the circumstances in which it occurs?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #11
Quote
I interpreted electrifaction as laying power lines between a power factory and another factory, but what was meant here was electrification of tracks
Quote
Thats what I mean, this particular bug indeed didn't exist before (as far as I know), but a similar bug with powerlines did

For me it looks now exactly as this.  Construct power line on every title gives me ~43000000 $ .
It happens when I have exe built from sources, or downloaded from http://www.43-1.org/~simutrans/simutrans-exp/i386/.
I have used clean configs but all time the same.  Build 5.1 ( released 17 VII 2009 ) works ok , build 6.1 ( released 26 VII 2009 ) gives 43M per power line title.

Ubuntu 9.04, 32-bit
EDIT: I tested pak64 and pak128 on both problem is reproducible.

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #12
Ahh, sorry, I thought that it was to way electrification that reference was being made. I have found this and fixed it, and the fix will be available with the next release.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #13
Could you commit fix to github? Current version because of this bug has very limited playability - no power lines at all

Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^

Reply #14
That'll be done to-morrow - I can't do it in advance of a release, because the Linux nightlies will then automatically build, and I don't want them being built with a half-baked version.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.