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
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

And here be the unguaranteed Windows binary:
OpenTTD-ga7336630-Win32.7z
(5.43 MiB) Downloaded 35 times
TrueSatan wrote:btw ever thought about 45° tunnels and bridges?
I don't need those Roller Coaster style, but sometimes 45°
like the tracks would be nice.
The OpenGFX folks would have to draw and code some default graphics.
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: New map features

Post by romazoon »

i confirm crash with latest version, done nothing, just watched my savegame and then it crashed.

*** OpenTTD Crash Report ***

Crash at: Tue Jan 13 01:23:24 2015
In game date: 2169-06-07 (25)

Crash reason:
Exception: E1212012
Location: 7549C42D
Message: Assertion failed at line 2292 of C:/MinGW/msys/1.0/home/Adminguy/fttd/src/train_cmd.cpp: v->trackdir != TRACKDIR_DEPOT

Binary:
Version: ga7336630 (0)
NewGRF ver: 150064d0
Build date: Jan 12 2015 17:56:06
Flags: 32-bit little-endian

Registers:
EAX: 0028B094 EBX: 00000016 ECX: 00000000 EDX: 0008E3C8
ESI: 75373180 EDI: 00000000 EBP: 0028B0E4 ESP: 0028B094
EIP: 7549C42D EFLAGS: 00000246
Attachments
crash.png
(454.58 KiB) Downloaded 7 times
crash.sav
(3.7 MiB) Downloaded 36 times
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Thank TrueSatan and romazoon for your bug report. The crash was caused by a train trying to leave a depot into a rail track block controlled by a path signal when there was already another train on it, and I traced it to an(other) overzealous assertion.

I have updated the repository with a fix for this bug.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

cirdan wrote:I have updated the repository with a fix for this bug.
... and here is the unguaranteed Windows binary:
OpenTTD-g4568557a-Win32.7z
(5.43 MiB) Downloaded 46 times
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

And here is the freshly generated Ubuntu 14.04 64bit as well.

Not checked yet.
Works fine now, played 2 years with my old save game.

Thanks for the fast fixing again, Cirdan :)

Cheers
Attachments
openttd-custom-g4568557a-UNIX.tar.xz
Version: g4568557a
Ubuntu 14.04 64bit
(4.62 MiB) Downloaded 30 times
aantono
Traffic Manager
Traffic Manager
Posts: 211
Joined: 15 Apr 2010 21:01
Location: Midwest, US

Re: New map features

Post by aantono »

Yosemite build for OSX
Attachments
bundle.zip
Yosemite build for OSX
(6.42 MiB) Downloaded 33 times
Hafting
Engineer
Engineer
Posts: 106
Joined: 13 Feb 2014 11:22

Re: New map features

Post by Hafting »

There is still a bug placing signals on tunnel ends.

I always build path signals, usually one-way path signals. (rightmost on the signal menu)
But when I build one of those on a tunnel end, I get instead a block signal (leftmost on the signal menu)
Strangely, such a signal also appear on the other end of the tunnel, where I wasn't building anything.

I can change signal types with the signal tool, and get what I want. But surely this is a (small) bug? The wrong signal type causes trains to get stuck until I fix the signal. Easy to spot immediately when I build a single signal on the tunnel end. But annoying when I use dragging to create a long row of signals on a long line - and somewhere a small tunnel gets the wrong signal. Something I notice later, when the trains queue up there.

I can provide savegames and images - but this should be easy enough to reproduce. Start a game, build a cheap tunnel, use the signal tool to place a single one-way path signal on the closest tunnel end. Notice how it fails as described above, as well as creating a signal not asked for on the other end. Contrast to placing a signal on a piece of non-tunnel track.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Hafting wrote:There is still a bug placing signals on tunnel ends.
This post describes how signals in tunnels work.
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: New map features

Post by romazoon »

Thanks for the fix Cirdan :), and thanks guys for the binaries

also, i m using the opportunity of this message to make a small anounce:

I m looking for players to test Cirdan's version in multiplayer .

PM me if interested so we can sort out the details of the game.
Hafting
Engineer
Engineer
Posts: 106
Joined: 13 Feb 2014 11:22

Re: New map features

Post by Hafting »

wallyweb wrote:This post describes how signals in tunnels work.
Thanks for clearing that up! I misunderstood this the whole time. It did not occur to me that signalling would work differently in tunnels. It works very well in testing, I can get two trains into a tunnel at the same time - if the tunnel has signals at both ends. That is useful.I still think it'd be less confusing if the tunnel entry signal matched the signal I tried to place - i.e. a path signal when I am using path signals. But it works, and that is the important thing.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Hafting wrote:Thanks for clearing that up!
You're welcome. :D
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: New map features

Post by Eddy Arfik »

Trying to compile 64bit release with VS Express 2013 and I get the following error, not sure how to fix it

Code: Select all

Error	154	error C2280: 'std::unique_ptr<char,TextfileDesc::delete_free>::unique_ptr(const std::unique_ptr<char,TextfileDesc::delete_free> &)' : attempting to reference a deleted function (..\src\settings_gui.cpp)	C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\vector	678	1	openttd
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Hafting wrote:
wallyweb wrote:This post describes how signals in tunnels work.
Thanks for clearing that up! I misunderstood this the whole time. It did not occur to me that signalling would work differently in tunnels. It works very well in testing, I can get two trains into a tunnel at the same time - if the tunnel has signals at both ends. That is useful. I still think it'd be less confusing if the tunnel entry signal matched the signal I tried to place - i.e. a path signal when I am using path signals. But it works, and that is the important thing.
The post wallyweb pointed you to explains how signals in tunnels work, as well as I can. It is not the same as regular signals, but they are not regular signals, after all. As for the signal into the tunnel, it does not really matter if it is a one-way normal block signal or a one-way path signal, as there is no difference in behaviour between them (in this particular case). But, if you would rather have a path signal, I will see how much work it would be to allow it.
Eddy Arfik wrote:Trying to compile 64bit release with VS Express 2013 and I get the following error, not sure how to fix it

Code: Select all

Error 154 error C2280: [...]
Your compiler complains that std::unique_ptr has no copy constructor, which is the whole point of std::unique_ptr. The question is then why and where your compiler needs such a copy constructor, but your report is not detailed enough. Is that all the output from the compiler? There should be some context around that error line.
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: New map features

Post by Eddy Arfik »

cirdan wrote:Your compiler complains that std::unique_ptr has no copy constructor, which is the whole point of std::unique_ptr. The question is then why and where your compiler needs such a copy constructor, but your report is not detailed enough. Is that all the output from the compiler? There should be some context around that error line.
Attached is the full compiler output log
Attachments
openttd_vs100.log.txt
(58.41 KiB) Downloaded 40 times
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Thank you. Your compiler is broken: It is trying to generate the default copy constructor for class TextfileDesc, which is not possible, since one of its members is a std::unique_ptr, which lacks a copy constructor itself. According to the standard, since TextfileDesc does not explicitly declare any copy (or move) constructor, one is declared implicitly as defaulted (12.8 [class.copy] 7) and defined as deleted (12.8 [class.copy] 11) because of its std::unique_ptr data member, so your compiler is trying to do something that it should not (and is impossible). Complain fiercely.

(Of course, that will not give you a binary on the short run. Try adding the line

Code: Select all

TextfileDesc (const TextfileDesc &) = delete;
at the end of the declaration of struct TextfileDesc, around line 67 in textfile.h.)
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: New map features

Post by Eddy Arfik »

cirdan wrote:Thank you. Your compiler is broken: It is trying to generate the default copy constructor for class TextfileDesc, which is not possible, since one of its members is a std::unique_ptr, which lacks a copy constructor itself. According to the standard, since TextfileDesc does not explicitly declare any copy (or move) constructor, one is declared implicitly as defaulted (12.8 [class.copy] 7) and defined as deleted (12.8 [class.copy] 11) because of its std::unique_ptr data member, so your compiler is trying to do something that it should not (and is impossible). Complain fiercely.

(Of course, that will not give you a binary on the short run. Try adding the line

Code: Select all

TextfileDesc (const TextfileDesc &) = delete;
at the end of the declaration of struct TextfileDesc, around line 67 in textfile.h.)
Apparently Microsoft are aware of the error, and suggest explicitly defining a move constructor as a workaround until it is fixed, but I'm not really familiar with c++ so not sure about that. Anyway I tried the code you suggested and I'm now getting a similar yet different error, attached is new build log
Attachments
openttd_vs100.log.txt
(58.89 KiB) Downloaded 36 times
User avatar
te_lanus
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 19 Jul 2012 18:04
Location: The Elizabeth Arkham Asylum for the Criminally Insane

Re: New map features

Post by te_lanus »

Not sure why but buying a plane (was.grf) and assigning it a airport to fly to and from freezes the build :( . I'm using wallyweb 's latest build (if I'm right) (build g4568557a). Also happens with av8 but not the default openttd ones
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

te_lanus wrote:Not sure why but buying a plane (was.grf) and assigning it a airport to fly to and from freezes the build :( . I'm using wallyweb 's latest build (if I'm right) (build g4568557a). Also happens with av8 but not the default openttd ones
Does this happen with OTTD trunk?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: New map features

Post by Alberth »

As far as I know, av8 is pretty often used. If there is such a problem in trunk, I am sure we'd get swamped by bug reports about the 1.5.0-beta1 :)
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Eddy Arfik wrote:Apparently Microsoft are aware of the error, and suggest explicitly defining a move constructor as a workaround until it is fixed, but I'm not really familiar with c++ so not sure about that. Anyway I tried the code you suggested and I'm now getting a similar yet different error, attached is new build log
I see. So the problem is that the compiler is trying to use the copy constructor in the return from BaseSet::GetTextFile, and possibly other places, instead of the move constructor. Could you try replacing the line I suggested you to add by this one?

Code: Select all

TextfileDesc (TextfileDesc &&) = default;
te_lanus wrote:Not sure why but buying a plane (was.grf) and assigning it a airport to fly to and from freezes the build :( . I'm using wallyweb 's latest build (if I'm right) (build g4568557a). Also happens with av8 but not the default openttd ones
I cannot reproduce this on my build. Could you upload a savegame as close as possible to the freeze and detailed instructions to reproduce it from that point?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Amazon [Bot] and 6 guests