Skip to main content
Topic: [bug r2866] ****ets and net wealth... [SOLVED] (Read 3101 times) previous topic - next topic

[bug r2866] ****ets and net wealth... [SOLVED]

Hi!

I'm using the last revision availible on the svn repository: r2866 under Gentoo Linux with pak128-1.4.5--102.0.

As you can see on the attached pictures after selling some vehicles and having negative money (maybe also with normal money but i didn't try it)  you get some bizarre numbers on ****ets and net wealth. In the next monthly update they're gone and everything is back to normal, but if you sell some vehicles again you get it again till next month...

Here you got the savegame before selling anything:

http://simutrans-germany.com/files/upload/Tomas_17.sve

and this is the one after the bug and before the next monthly update... Anyway I don't know if it's saved or not but you can try to reproduce it with the first savegame attached. Just go to the depot sell something and you get the bizarre numbers.

http://simutrans-germany.com/files/upload/Tomas_18.sve

I have no addons or anything installed. The game is compiled with gcc-4.3.4 and using this config.default:

Code: [Select]
#
# to compile:
# copy this file to config.default and adjust the settings
#

#BACKEND = allegro
#BACKEND = gdi
BACKEND = sdl
#BACKEND = mixer_sdl
#BACKEND = x11

#COLOUR_DEPTH = 8
COLOUR_DEPTH = 16

#OSTYPE = beos
#OSTYPE = cygwin
#OSTYPE = freebsd
OSTYPE = linux
#OSTYPE = mingw
#OSTYPE = mac

#DEBUG = 1    # Level 1-3, higher number means more debug-friendly, see Makefile
OPTIMISE = 1 # Add umpteen optimisation flags
#PROFILE = 1

# Define these as empty strings, if you don't have allegro/sdl-config
#ALLEGRO_CONFIG = allegro-config
SDL_CONFIG = sdl-config

#VERBOSE = 1

# Do not determine dependencies
# Header dependencies get NOT tracked this way, so if a header changes you're
# on your own (i.e. manually run a make clean)
# Uncomment this if this stage takes exceptionally long, which happens on some
# broken filesystems
# NO_DEPS = 1

# Following flags exists
# DOUBLE_GROUNDS: Enables two height tiles
# HALF_HEIGHT: Enables half height tiles (8 pixel instead 16)
# OTTD_LIKE: Enables half height tiles and crossconnected industries; defaul folder pak.ttd/
# DESTINATION_CITYCARS: Citycars can have a destination (not recommended)
# USE_C: no ****embler for copying
# BIG_ENDIAN: MUST by set for PPC/Motorola byte order! (old mac, amiga)
# STEPS16: 16 steps per tile - nicer on pak64
FLAGS =  -DSTEPS16

I don't know if you need some extra info... Anyway just ask...  :)


EDIT: It happens only using the "sell mode" button, not the "sell" button... As shown on the last attachement on my next post.

Re: [bug r2866] ****ets and net wealth...

Reply #1
I cant reprouce this here on Windows :/
Parsley, sage, rosemary, and maggikraut.

Re: [bug r2866] ****ets and net wealth...

Reply #2
We'll maybe it's something just in linux or maybe it's because i have sdl or something installed in gentoo without some required USE flags... I dunno... But I've observed that it starts always with ~86 millions and then everytime I sell something on the depot (after closing it) it increases aroung ~45 millions... Don't know how to reproduce it in windows... But i'll switch now there and compile it and see if i have it or not...

Edit: We'll I've observed that with the original executable from the version 102.2.0 this bug doesn't happpen. It happens also with the allegro version that i just compiled. And it's not pushing the sell button but below on the sell mode as on the second attached image.

 

Re: [bug r2866] ****ets and net wealth...

Reply #3
I've just downloaded the last version on the svn repository in windows and compiled it. And i got the same problem... But it's the "sell mode" button not the "sell" button. As seen on the latest attachement

Re: [bug r2866] ****ets and net wealth...

Reply #4
I'm not sure this patch is correct or not.

Code: [Select]
Index: simdepot.cc
===================================================================
--- simdepot.cc (r 2867)
+++ simdepot.cc (copy)
@@ -203,7 +203,7 @@
 {
  vehicles.remove(veh);
  get_besitzer()->buche(veh->calc_restwert(), get_pos().get_2d(), COST_NEW_VEHICLE );
- get_besitzer()->buche(-veh->calc_restwert(), COST_****ETS );
+ get_besitzer()->buche(-(sint64)veh->calc_restwert(), COST_****ETS );
  DBG_MESSAGE("depot_t::sell_vehicle()", "this=%p sells %p", this, veh);
  delete veh;
 }


Re: [bug r2866] ****ets and net wealth...

Reply #5
Thank you - incorporated in 2868.

@Tom4s: please check whether the bug is fixed.
Parsley, sage, rosemary, and maggikraut.

Re: [bug r2866] ****ets and net wealth...

Reply #6
Yes, It's solved now.

Thanks!


Re: [bug r2866] ****ets and net wealth... [SOLVED]

Reply #8
Yes, of course, this will be merged to RC too.

Edit: Merged in rev 2871.
Parsley, sage, rosemary, and maggikraut.