News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Preparing for release of 9.9

Started by jamespetts, June 20, 2011, 12:25:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I have been working all week-end on the preparing the next release of Experimental, version 9.9, which is now nearly finished on the devel branch of my Github repository. There are still one or two bug fixes to finish, but it is largely complete other than that. It merges all the latest changes from Standard, including the industry boost, the liveries feature and Inkelyad's recent enhancement to the spacing feature.

There are quite a few changes in this one, so I should be grateful if some people could assist in some pre-release testing. One thing with which I have been having trouble is making this with GCC/MinGW. In order to make sure that I have a good stable Linux build, I should very much appreciate any testing that anyone might be able to do with this. Note that, although this is still numbered as 9.x in Experimental version numbering, the Standard version number is increased (to 110.6), and some Experimental features (liveries and Inkelyad's spacing shift) are saved under the 110.6 number, so that games saved with 9.9 cannot be opened with 9.8.

If anyone would like to test the liveries feature, the sources for a liveries enabled version of Pak128.Britain-Ex (with only one or two vehicles with different liveries at present - look for the BR Class 47, which has 3 different liveries for testing) are available on the liveries branch of the Pak128.Britain-Ex Github repository.

Thank you in advance for any feedback - it is always appreciated.

Edit: One bug that I notice is that passengers do not seem to walk anywhere.
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.

sdog

#1
QuoteThere are quite a few changes in this one, so I should be grateful if some people could assist in some pre-release testing. One thing with which I have been having trouble is making this with GCC/MinGW. In order to make sure that I have a good stable Linux build, I should very much appreciate any testing that anyone might be able to do with this.

Just compiling it with  4.5.2-8ubuntu4 on a 64 bit machine, just using thes standard Makefile. What exactly would you like to have tested?

I'm running a savegame from the server, saved roughly 3 years before the crash fast forward to see if anything happens.



the persistent crash from the server is still there in your preliminary 9.9. See the crash-report-thread for details and a savegame.

AvG

James,
Just in case you did not see it yourself:
Transport-fees for 250m are 4 times higher than 1000m. Should be 4 times lower.
AvG
Ad van Gerwen

inkelyad

#3
dataobj/fahrplan.cc:

              if (file->get_experimental_version() >= 10) {
                       file->rdwr_short(eintrag[i].spacing_shift);



   if(file->get_experimental_version() >= 10)
       {
           file->rdwr_bool(same_spacing_shift);
       }

You don't change this?

jamespetts

Sdog,

thank you for checking that. I wanted to test whether it would compile at all under GCC, as I had been unable to get it to compile with MinGW. You were able to compile and run without difficulty?

AvG,

I cannot reproduce this error, as, with 250m/tile, the base prices of goods/passengers are multiplied by 250 then divided by 1000, which I have confirmed to work correctly with a debugger. Can I clarify here what you mean by "transport fees" and how you tested?

Inkelyad,

thank you for spotting that - fix now pushed.
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.

sdog

Quote from: jamespetts on June 20, 2011, 09:30:44 PM
S I wanted to test whether it would compile at all under GCC, as I had been unable to get it to compile with MinGW. You were able to compile and run without difficulty?

it ran out of the box, just pulling and hitting make. same config.default setting as before.

I'm not sure if i understood you correctly, i though you were trying it on your linux machine with gcc? But now you're talking about mingw?

jamespetts

Ahh, the Linux machine that I had was temporary: it now resides with my parents, so I use MinGW to test GCC compatibility. Glad that it worked for you, though. Can you re-test again now that I have updated the makefile? Thank you for your help.
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.

sdog


From http://github.com/jamespetts/simutrans-experimental
* branch            9.x        -> FETCH_HEAD
Already up-to-date.

can't see anything new in your 9.x branch.

jamespetts

That's because I'm using the devel branch at present :-) I was using it to merge in the major changes in Standard whilst I kept the 9.x branch for bug fixes in case I needed to release a bugfix version before I had finished merging, but it looks now as if the next version will be the version with the merges, so the 9.x branch probably won't be used until 9.9 is released.
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.

sdog

oh, 9.x already steped the version number up to 9.9.

here's gcc's error message:

===> CXX bauer/brueckenbauer.cc
In file included from bauer/../simwerkz.h:12:0,
                from bauer/brueckenbauer.cc:11:
bauer/../simworld.h:428:36: error: duplicate 'const'
In file included from bauer/../gui/messagebox.h:7:0,
                from bauer/../simwerkz.h:25,
                from bauer/brueckenbauer.cc:11:
bauer/../gui/components/gui_fixedwidth_textarea.h:41:7: error: extra qualification 'gui_fixedwidth_textarea_t::' on member 'set_text'
In file included from bauer/../dings/../vehicle/simvehikel.h:19:0,
                from bauer/../dings/../vehicle/simverkehr.h:15,
                from bauer/../dings/../simcity.h:20,
                from bauer/../dings/leitung2.h:16,
                from bauer/brueckenbauer.cc:40:
bauer/../dings/../vehicle/../simconvoi.h:646:38: warning: type qualifiers ignored on function return type
In file included from bauer/../dings/../vehicle/../besch/vehikel_besch.h:21:0,
                from bauer/../dings/../vehicle/simvehikel.h:25,
                from bauer/../dings/../vehicle/simverkehr.h:15,
                from bauer/../dings/../simcity.h:20,
                from bauer/../dings/leitung2.h:16,
                from bauer/brueckenbauer.cc:40:
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:79:58: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:87:59: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:95:58: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:103:59: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:111:59: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:112:59: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:114:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:115:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:116:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:117:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:118:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:119:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:121:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:122:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:123:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:124:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:125:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:126:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:190:27: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:192:27: warning: type qualifiers ignored on function return type
In file included from bauer/../dings/../vehicle/simvehikel.h:25:0,
                from bauer/../dings/../vehicle/simverkehr.h:15,
                from bauer/../dings/../simcity.h:20,
                from bauer/../dings/leitung2.h:16,
                from bauer/brueckenbauer.cc:40:
bauer/../dings/../vehicle/../besch/vehikel_besch.h:371:44: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/vehikel_besch.h: In member function 'const bool vehikel_besch_t::check_livery(const char*) const':
bauer/../dings/../vehicle/../besch/vehikel_besch.h:379:10: warning: unused variable 'livery_index'
make: *** [build/default/bauer/brueckenbauer.o] Error 1



from bauer/brueckenbauer.cc:11:
bauer/../gui/components/gui_fixedwidth_textarea.h:41:7: error: extra qualification 'gui_fixedwidth_textarea_t::' on member 'set_text'


edit: posted incomplete output at first.

jamespetts

Hmm - the offending line appears to be


void distribute_groundobjs_cities(const settings_t const *set, sint16 old_x, sint16 old_y);


in simworld.h, but that is very odd, as that line is not new with this version, and appears legal: the two consts should indicate that both the pointer and the object to which the pointer is pointing are const. I'm not quite sure what the problem is here, especially as it works on  MSVC++. Any suggestions, anyone?

Thank you very much for testing that, incidentally.

Edit: I've just merged some changes to the makefile from Standard - could you perhaps give it another go with the changes integrated?
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.

sdog

===> CXX bauer/brueckenbauer.cc
In file included from bauer/../simwerkz.h:12:0,
                 from bauer/brueckenbauer.cc:11:
bauer/../simworld.h:428:36: error: duplicate 'const'
In file included from bauer/../gui/messagebox.h:7:0,
                 from bauer/../simwerkz.h:25,
                 from bauer/brueckenbauer.cc:11:
bauer/../gui/components/gui_fixedwidth_textarea.h:41:7: error: extra qualification 'gui_fixedwidth_textarea_t::' on member 'set_text'
In file included from bauer/../dings/../vehicle/simvehikel.h:19:0,
                 from bauer/../dings/../vehicle/simverkehr.h:15,
                 from bauer/../dings/../simcity.h:20,
                 from bauer/../dings/leitung2.h:16,
                 from bauer/brueckenbauer.cc:40:
bauer/../dings/../vehicle/../simconvoi.h:646:38: warning: type qualifiers ignored on function return type
In file included from bauer/../dings/../vehicle/../besch/vehikel_besch.h:21:0,
                 from bauer/../dings/../vehicle/simvehikel.h:25,
                 from bauer/../dings/../vehicle/simverkehr.h:15,
                 from bauer/../dings/../simcity.h:20,
                 from bauer/../dings/leitung2.h:16,
                 from bauer/brueckenbauer.cc:40:
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:79:58: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:87:59: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:95:58: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:103:59: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:111:59: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:112:59: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:114:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:115:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:116:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:117:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:118:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:119:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:121:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:122:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:123:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:124:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:125:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:126:53: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:190:27: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/../utils/float32e8_t.h:192:27: warning: type qualifiers ignored on function return type
In file included from bauer/../dings/../vehicle/simvehikel.h:25:0,
                 from bauer/../dings/../vehicle/simverkehr.h:15,
                 from bauer/../dings/../simcity.h:20,
                 from bauer/../dings/leitung2.h:16,
                 from bauer/brueckenbauer.cc:40:
bauer/../dings/../vehicle/../besch/vehikel_besch.h:371:44: warning: type qualifiers ignored on function return type
bauer/../dings/../vehicle/../besch/vehikel_besch.h: In member function 'const bool vehikel_besch_t::check_livery(const char*) const':
bauer/../dings/../vehicle/../besch/vehikel_besch.h:379:10: warning: unused variable 'livery_index'
make: *** [build/default/bauer/brueckenbauer.o] Error 1

TurfIt

Bad merge with https://github.com/aburch/simutrans/commit/2011c22555f97d5e7c4587d87ca6ee5b91ca32f7#diff-0 from standard?
i.e. 'gui_fixedwidth_textarea_t::set_text' is removed in standard but not expermental-devel...

inkelyad

Quote from: jamespetts on June 20, 2011, 10:49:38 PM
the two consts should indicate that both the pointer and the object to which the pointer is pointing are const. I'm not quite sure what the problem is here, especially as it works on  MSVC++. Any suggestions, anyone?

Then it is

const settings_t  * const set

or

settings_t const * const set


See http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.5
Cite from http://duramecho.com/ComputerInformation/WhyHowCppConst.html:

Basically 'const' applies to whatever is on its immediate left (other than if there is nothing there in which case it applies to whatever is its immediate right).

inkelyad

#14
vehicle/simvehikel.cc:

               switch(waytype)
               {
                       case track_wt:
                       case narrowgauge_wt:
                       case monorail_wt:
                       case maglev_wt:
                               max_speed_90 = kmh_to_speed(30);
                               max_speed_135 = kmh_to_speed(20);
                               max_speed_180 = kmh_to_speed(4);
                               break;

                       case tram_wt:
                               max_speed_90 = kmh_to_speed(42);
                               max_speed_135 = kmh_to_speed(35);
                               max_speed_180 = kmh_to_speed(20);
                               break;

                       case road_wt:
                               max_speed_90 = kmh_to_speed(45);
                               max_speed_135 = kmh_to_speed(40);
                               max_speed_180 = kmh_to_speed(35);
                               break;

                       default:
                               base_limit;
               }


vehicle/simvehikel.cc:1525: warning: statement has no effect


EDIT: My own fix for gcc warnings: https://github.com/inkelyad/simutrans-experimental/tree/gcc_warnings

jamespetts

Inkelyad - thank you: I have merged that now. That is most helpful.
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.

inkelyad

#16
vehicle/simvehikel.cc:

               const char* name = current_livery.c_str();
               file->rdwr_str(name);
               current_livery = name;

From dataobj/loadsave.h:

// s is a malloc-ed string (will be freed and newly allocated on load time!)
void rdwr_str(const char *&s);

So code in simvehikel.cc is really wrong on loading.
EDIT^2:
Use this:

void loadsave_t::rdwr_string(std::string &s) {
        if (saving) {
                const char* name = s.c_str();
                rdwr_str(name);
        } else {
                const char *name = NULL;
                rdwr_str(name);
                s = name;
                free(const_cast<char *>(name));
        }
}


---
typo ( % -> & ) in bool wkz_change_line_t::init( karte_t *, spieler_t *sp ):

sscanf( p, "%c,%hi,&hi", &tool, &line_id, &livery_scheme_index );

jamespetts

Inkelyad,

thank you very much for that. I have used your std::string save code rather than the code on your Github branch, as I think that the Github code doesn't accommodate both loading and saving. I have also found some other errors in the livery scheme loading/saving code, which I have also fixed. Can you take a look to check that all is correct with this code? Thank you 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.

inkelyad

#18
in void haltestelle_t::add_connexion:

simhalt.cc:1421: warning: right shift count >= width of type
simhalt.cc:1431: warning: right shift count >= width of type
simhalt.cc: In member function 'ware_t haltestelle_t::hole_ab(const ware_besch_t*, uint32, const schedule_t*, const spieler_t*, convoi_t*, bool)':
simhalt.cc:2332: warning: right shift count >= width of type

It is about

average_speed = speed_to_kmh(cnv->get_min_top_speed()) >> 1  * 100;

I think it should be

average_speed = (speed_to_kmh(cnv->get_min_top_speed()) >> 1)  * 100;

------------
uint16 haltestelle_t::get_average_waiting_time(halthandle_t halt, uint8 category) const

simhalt.cc:1378: warning: taking address of temporary


if(&waiting_times[category].get(halt->get_basis_pos()) != NULL)

waiting_times[category] is koordhashtable_tpl<koord, waiting_time_set >
hashtable_tpl::get will return value_t() (in our case waiting_time_set()) when it can't find key.

it is pointless compare its address to NULL.
-------------------
bool wkz_change_line_t::init( karte_t *, spieler_t *sp ):

   char tool = 0;
       uint16 line_id = 0;
       uint16 livery_scheme_index = 0;
   
       // skip the rest of the command
       const char *p = default_param;
       while(  *p  &&  *p<=' '  ) {
           p++;
       }
   
       sscanf( p, "%c,%hi,%hi", &tool, &line_id, &livery_scheme_index );
   
       // skip to the commands ...
       for(  int z = 3;  *p  &&  z>0;  p++  ) {
           if(  *p==','  ) {
               z--;
           }
       }

I am very confused. Why you read  livery_scheme_index here, not inside

case 'V': // Change livery

If you send livery_scheme_index in every command as second argument, then you must change 'z = 3' to 'z = 2'

jamespetts

Inkelyad,

thank you very much for that. I have fixed the first; the second, I think, was put in to prevent crashes in particular (and possibly obscure) detected cases, and so I shall leave it in place to retain stability.

The third point I am not sure that I fully understand, since reading all of the tool data have to be read in the same sscanf line, I think, so even if the livery scheme index is only actually used in one of the tools, it has to be read in the general section.
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.

inkelyad

Your forget

simhalt.cc:1421: warning: right shift count >= width of type
simhalt.cc:2332: warning: right shift count >= width of type

It is same error. (Why so complcated?, '*50' is much better).

jamespetts

Ahh, I think that the >> 1 thing is a leftover from Standard, but you are right: *50 is preferable. This will be changed for the next version. Thank you for spotting it.
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.

sdog

9.x branch doesn't compile for me (linux, gcc)


===> CXX gui/message_frame_t.cc
In file included from gui/message_frame_t.cc:8:0:
gui/../simwin.h:167:33: error: 'size_t' has not been declared
make: *** [build/default/gui/message_frame_t.o] Error 1


I suppose you didn't build 9.9's release from your devel branch?

inkelyad

Well, james said: 'Ahh, the Linux machine that I had was temporary'.

James, how good is your main machine? Can you install VirtualBox with Debian inside? Minimal(gcc, devtools) Debian distribution is not than big.

sdog

Didn't James wrote he had an i7 or so? HD space shouldn't be an issue. Might it be easier for the beginning to use a distro like Arch or so, when geting a linux for the first time?

AvG

James,
Sorry I missed your reply on post nr 2.
I came to that conclusion when using key i >settings.
Changing the meters per tile resulted in a higher transport-fee for 250m (4*) then at 1000m.
Alas, this is still the case in Exp 9.9.
AvG
Ad van Gerwen

jamespetts

AvG,

please see my reply to your thread here for an explanation of the issue with changing the scale.

SDog,

the Windows 9.9 release was built from the master branch as it now is; the "size_t" problem I think might be specific to GCC, and is fixed according to Inkelyad's suggestion here. Can you compile from my 9.x branch?
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.