New map features

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: New map features

Post by romazoon »

crash seems to happens when i used ottd 1.4.0, so maybe 1.3.1 is still fine.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

romazoon wrote:crash seems to happens when i used ottd 1.4.0, so maybe 1.3.1 is still fine.
Not really. 1.3.1 did not crash, but it still refused the saved game.
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Wally are you compiling with icu?
Had some trouble to get icu working (I always get cmemory.h is missing at fontcache) so I spared it from config.
That beside sdl is as far as I know the only missing lib at my windows compiling vm.
And it is as well a win 7 setup 32 bit.

I used the given instruction from the wiki for msys setup.
But in any case there should be no crash at all.

Has any dev a hint what could lead to that crash? Maybe we should compile
a trunk version as well wally and see what happens then (some older revision for sure)
Then the devs maybe can see why the crash happens.

Also if you use icu try to compile it without icu, wally.
./configure --with-icu="0"

Regards
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

wallyweb:
Judging from all the evidence collected, I think that there is something in your setup that is exposing the bug. Since people on windows are able to consistently trigger the bug using your binaries, could you try making a debug build, to see if we get a better crash log? It should be a matter of adding "--enable-debug" to your configure run, since you seem to be using gcc.
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Since there is a discussion about infrastructure sharing, I was wondering if the new map features could include something like multi owner on a tile?
I guess sharing the infrastructure is only the first step, next would be two or more companies owning for example
a train station or an airport, then there would be a call for multi owners on train tracks, because someone is in debt
by another company and can't pay and so on.
Could be helpful for closing down AI's as well.

Anyway again only two cents from my side :)
And yeah I read that there is not much time for you currently Cirdan.
No rush, just thoughts :)

Regards
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Been busy last couple of days but I should be able to get on to this later today or tomorrow morning.
cirdan wrote:wallyweb:
Judging from all the evidence collected, I think that there is something in your setup that is exposing the bug. Since people on windows are able to consistently trigger the bug using your binaries, could you try making a debug build, to see if we get a better crash log? It should be a matter of adding "--enable-debug" to your configure run, since you seem to be using gcc.
I have to agree my binary is the culprit. I compile with MinGW. I'm going to try TrueSatan's suggestion from above and then I'll look into how to set up a debug.
steili
Engineer
Engineer
Posts: 2
Joined: 29 May 2014 23:43

Re: New map features

Post by steili »

First of all - awesome work! I can't wait to try it out! I'm having some issues compiling with MSVC 2012 though, this error pops up:

Code: Select all

7>..\src\pathfinder\yapf\yapf_rail.cpp(1294): error C2512: 'CYapfRailOrderT<TAstar>' : no appropriate default constructor available
7>          with
7>          [
7>              TAstar=AstarRailTrackDir
7>          ]
7>          ..\src\pathfinder\yapf\yapf_rail.cpp(1292) : while compiling class template member function 'CYapfRailT<Base>::CYapfRailT(const Train *,bool)'
7>          with
7>          [
7>              Base=CYapfRailOrderT<AstarRailTrackDir>
7>          ]
7>          ..\src\pathfinder\yapf\yapf_rail.cpp(1399) : see reference to function template instantiation 'CYapfRailT<Base>::CYapfRailT(const Train *,bool)' being compiled
7>          with
7>          [
7>              Base=CYapfRailOrderT<AstarRailTrackDir>
7>          ]
7>          ..\src\pathfinder\yapf\yapf_rail.cpp(1399) : see reference to class template instantiation 'CYapfRailT<Base>' being compiled
7>          with
7>          [
7>              Base=CYapfRailOrderT<AstarRailTrackDir>
7>          ]
7>..\src\pathfinder\yapf\yapf_rail.cpp(1294): error C2614: 'CYapfRailT<Base>' : illegal member initialization: 'Base' is not a base or member
7>          with
7>          [
7>              Base=CYapfRailOrderT<AstarRailTrackDir>
7>          ]
I'm not that experienced with compiling, but I don't have any problems compiling trunk with my setup. The only change I've done is to change

Code: Select all

#define scsnprintf	snprintf
to

Code: Select all

#define scsnprintf	_snprintf
in squirrel.h. Any idea to what that may cause this?

I'm also getting some warnings, but I don't think they are serious, but I'm attaching the entire build log to this post if you want to have a look.
Attachments
compilelog.txt
(11.61 KiB) Downloaded 80 times
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Sorry for the delay in replying. I have been recently sidetracked from this project by real life issues and, in fact, I have been completely away from keyboard for almost a week now.
steili wrote:First of all - awesome work! I can't wait to try it out! I'm having some issues compiling with MSVC 2012 though, this error pops up:
I am totally at a loss at what can be wrong here. The first error message claims that there is not a default constructor available for CYapfRailT<Base>, which is right, but a default constructor is never required for this class (it is never default-constructed). The second error message complains about one of CYapfRailT's constructors, but the constructor is correct, as far as I can tell (Base is a base class of CYapfRailT<Base>). I am leaning towards blaming the compiler on this, given that other compilers (namely gcc) handle the code just fine.

The other warnings you get should be harmless.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

cirdan wrote:wallyweb:
Judging from all the evidence collected, I think that there is something in your setup that is exposing the bug. Since people on windows are able to consistently trigger the bug using your binaries, could you try making a debug build, to see if we get a better crash log? It should be a matter of adding "--enable-debug" to your configure run, since you seem to be using gcc.
I as well have rturned from a trip into real life.
Unfortunaty these forums seem to choke on the 7z file size of 17.6MB (18,031KB).
Perhaps you could PM me with your email address?
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: New map features

Post by Eddi »

you could split the file into 6MB parts.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Eddi wrote:you could split the file into 6MB parts.
I could? Oh well. Maybe next time. It's already sent, but thanks for the heads up. :bow:
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Anything new cirdan or was it only a resync to the trunk on your repo?
Last comment was from may.

Linux version works fine :)

Thanks.
Regards
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

As you can see, I have indeed pushed a new batch of commits. However, there are no new features among them, only a lot of code refactoring and some bug fixes (one of them is a nasty vulnerability that makes OpenTTD freeze on startup, at least on 32-bit x86, if a tar file of a certain kind is present in any content directory; this could be used for a denial-of-service attack if such a file is uploaded to bananas).

I am currently trying to get past recent changes in OpenTTD regarding strings and settings. As you know, I try to cherry-pick all (relevant) commits made to OpenTTD. However, some time ago they replaced the functions used to handle strings all over the place, in a way that I did not like at all, so I decided to take the opportunity to rework string handling to my liking. This is mostly done; if some additional testing goes well, I will likely publish these changes soon.

Then there is the problem with game settings. As in the previous case, recent activity in OpenTTD drew my attention to the settings code, and I am exploring some ways to make it cleaner. I have just started with this, and it may take a while.

(Yes, this means no new features in the near future. But I cannot help to overhaul the code when I find it difficult to navigate. And it pays off: just take a look at the YAPF directory and the fact that I have completely removed NPF because YAPF is now understandable and, as a result, can be used for river generation.)
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Thanks for the information cirdan.
Take your time, it wasn't about new features but I wondered why the last comments were from May this year but I got those updates near end of June (checking regular).

And I stopped looking at the source code a long time ago ;) So I trust you on that.
Since nmf is working great so far and none of my trains are lost, it looks for me like yapf is working flawless.

Regards and thanks for all your efforts again :)
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

I have just pushed a (big) bunch of commits to the repo. This brings my branch in line with openttd revision 26604. There are no new features in this update, only code cleanups and refactoring, most notably an overhaul of how strings are handled (now we have a class that encapsulates bounds checking) and stricter checks for savegame data. The latter was prompted by some changes to the same end in openttd, but I implemented the checks in a different way: they happen at saveload data construction time, so they have no runtime overhead and will catch most encoding mistakes at compile time or during program startup.

Be extra careful with the update, since it touches saveload code. And please do not find any bugs, because I may not be able to fix them in some time. ;-)

On the other hand, if you are feeling adventurous, here is a patch in need of testing. It brings a feature suggested by wallyweb that I will call buoy-docks, or dock-buoys, for lack of a better name. As you can guess, it allows you to build buoys that function as regular docks (use the dock tool on a flat water tile to build them). And you can have several of these per station, too, and mix them with the standard docks. Do note that this is an experimental patch, so it may not be compatible with the version that ends up in trunk; it does not change the savegame format, though, so you can always remove all your dock-buoys and get a forward-compatible savegame.
Attachments
dockbuoys.diff
(11.85 KiB) Downloaded 70 times
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Checked out and maybe feeling adventures enough tomorrow to test the new save/load routine ;)
And for sure you will get every single bug in here.
I don't mind if it takes some time to fix the bugs :)

Thanks again for the updates.

Regards
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

A project on the go but I should be able to get at the Windows binaries on the weekend.
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Compiled it tonight, hadn't much time to test it. But it was pretty fast starting and it loaded my savegame.
Will provide a linux binary for 14.04 tonight.

Thanks for the update Cirdan
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Found a bug :)

If you build a station, then an joined station and try to remove the first station the game crashes.
Does only happen if the the stations are at least 3 tiles away.

Strange but it happens in the version before as well.
My linux doesn't produce any logfiles or crashdumps.
I will see if I can get it crashing on my windows machine as well.

Regards
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Here are the Windows binaries, fresh from the compiler oven. Simply add GRFs, stir, enjoy.
There are no guarantees and bicarbonate will not be dispensed.

The first file is unpatched.
OpenTTD-gc170ccb4-Win32.7z
Unpatched
(5.18 MiB) Downloaded 61 times
The second has been patched to include the docking buoy.
Also patched to include hot fix.
OpenTTD-gc170ccb4M-Win32-2.7z
PATCHED - twice
(5.18 MiB) Downloaded 69 times
Please report any observations below.
Last edited by wallyweb on 27 Jul 2014 18:42, edited 1 time in total.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 7 guests