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 »

hey True Satan, i edited my last "error" post into a usefull one...the renaming bug seems more subtle than just being too long.
TrueSatan wrote:Thanks romazoon for finding it
my pleasure to somehow help making Cirdan's version clean of bugs :)
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

In any way I guess there is some check missing for the waypoints name length and maybe special characters.
Because the characters of the waypoints are less then the characters you
can type for the station name.
I tried it with a semi long city name builded a waypoint and could rename it withotu trouble.
It was 4 chars shorter then the max input. I left the waypoint intact and rename the city
with 5 chars more.
Guess what... yes the game crashed while trying to rename the waypoint after giving 5 chars more
the the city name.
So its easy to reproduce :)
Haven't tried special characters, but maybe they crash the game as well then.

Cheers and happy conducting
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

cirdan wrote:What settings (os, compiler, etc.) are you (TrueSatan and wallyweb) using when configuring your build? Since TrueSatan's build does not exhibit this bug, perhaps that would help me find the cause of the crash.
WindowsXP SP3
MinGW and dependencies per here (except for libicu which is optional)
tortoisegit
Git for Windows
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Okay....

My virt compiling machine is a 32bit Win7
I used following libs for compiling the executable:
xz-5.0.4
pkg-config_0.23-3_win32
glib_2.26.0-2_win32
gettext-runtime_0.18.1.1-2_win32
freetype-2.4.10
lzo-2.06
lpng1513
zlib-1.2.8

guess it doesn't matter which git, because its only for getting the source and retrieving the revision number.

Config log is attached as well. Its the log from the config that was used to compile the latest build a few posts ago.
If you need more information I will provide them as soon as i can.

Cheers
Attachments
config.txt
Config I use to compile
(7.86 KiB) Downloaded 38 times
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

romazoon wrote: I just made the game crash by renaming a waypoint again...only thing is this time the city's name wasn't that long, and i renamed succesfully the waypoint next to it just before....other difference is i have this time a crash report. (and another important point maybe is, that this was while i was running a multiplayer game...only me connected though )
Your analysis is correct in that there was a problem with overly long waypoint names. Trying to rename a waypoint whose default name was larger than the maximum allowed length was sending the code into an infinte loop. I have a fix for this, which I will post after some additional testing (in the meanwhile, be careful when renaming waypoints ;-) ).

By the way, I also fixed another bug that you did not report but showed up as a misplaced newline in your crash log. :-)

Regarding compilation information, I take it that all of you are using mingw under windows? It seems to me that wallyweb is using GCC 4.6.2 and TrueSatan is using GCC 4.8.1. Is this correct? I do not think that this particular bug is related to external libraries, so this would give me somewhere to start.
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Yup using 4.8.1

btw compiled it again and got these warning

Code: Select all

C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp: In function 'voi
d SetCompositionPos(HWND)':
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp:502:14: warning:
NULL used in arithmetic [-Wpointer-arith]
  if (hIMC != NULL) {
              ^
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp: In function 'voi
d SetCandidatePos(HWND)':
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp:524:14: warning:
NULL used in arithmetic [-Wpointer-arith]
  if (hIMC != NULL) {
              ^
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp: In function 'LRE
SULT HandleIMEComposition(HWND, WPARAM, LPARAM)':
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp:559:14: warning:
NULL used in arithmetic [-Wpointer-arith]
  if (hIMC != NULL) {
              ^
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp: In function 'voi
d CancelIMEComposition(HWND)':
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp:622:14: warning:
NULL used in arithmetic [-Wpointer-arith]
  if (hIMC != NULL) ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
              ^
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp: In function 'voi
d FindResolutions()':
C:/MinGW/msys/1.0/home/testuser/nmf/fttd/src/video/win32_v.cpp:1112:26: warning:
 comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (dm.dmBitsPerPel == bpp &&
                          ^
I hate the msys/mingw console but i am to lazy to switch to something decent lol

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

Re: New map features

Post by wallyweb »

cirdan wrote:It seems to me that wallyweb is using GCC 4.6.2 ...
Correct.
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: New map features

Post by romazoon »

cirdan wrote:Your analysis is correct in that there was a problem with overly long waypoint names. Trying................ infinte loop. I have a fix for this, which I will post after some additional testing (in the meanwhile, be careful when renaming waypoints ;-) ).

By the way, I also fixed another bug that you did not report but showed up as a misplaced newline in your crash log. :-)
great two bug for the price of one !
and really a big thanks you for keeping to invest so much time in your branch. You are doing GREAT !. The more i test it and the more amazed i am by the new possibilities that brings bridgehead.

Also i have a small question regarding multiple docks, am i suposed to use "waypoints" to ensure boats uses differents docks ? or are they suposed to pick only free docks ? so far boats seems to always pick the closest docks even if busy. I just don t really know what to expect so i thought i'd ask.

looking forward next binary to resume test ;)
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Comparing my libraries with TrueSatans, the only difference that I see is with libpng.
TrueSatan uses v. 1.5.13 while I have 1.5.16
The confusion here is with the Compiling on Windows using MinGW wiki.
List of packages points to libpng-1.5.13
Compiling libpng points to libpng-1.5.16

Could this be the problem?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: New map features

Post by planetmaker »

wallyweb wrote: List of packages points to libpng-1.5.13
Compiling libpng points to libpng-1.5.16
Could this be the problem?
No.
aantono
Traffic Manager
Traffic Manager
Posts: 211
Joined: 15 Apr 2010 21:01
Location: Midwest, US

Re: New map features

Post by aantono »

Any chance at all someone here can publish a DMG image for a Mac version of the game? I would love to test it, but can't seem to be able to build it on my mac. :(
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Sorry for the delay, real life is keeping me busy this week.
romazoon wrote:Also i have a small question regarding multiple docks, am i suposed to use "waypoints" to ensure boats uses differents docks ? or are they suposed to pick only free docks ? so far boats seems to always pick the closest docks even if busy. I just don t really know what to expect so i thought i'd ask.
Dock behaviour has not changed in this respect: they still have unlimited capacity. Ships will head for the nearest dock irrespectively of how many other ships are already there.
wallyweb wrote:Comparing my libraries with TrueSatans, the only difference that I see is with libpng.
TrueSatan uses v. 1.5.13 while I have 1.5.16

Could this be the problem?
Unlikely. I have seen weird libpng-related crashes when a binary and one of its auxiliary libraries are linked against different versions of libpng (libpng's versioning scheme is not particularly helpful with this, since incompatible ABI changes do not bump the major version number), but I cannot see how this particular bug could be related to libpng.

By the way, I have compiled a binary with GCC 4.6 myself and the bug is still eluding me. My guess is that it is some sort of interaction between the compiler and the OS (GCC 4.6 and mingw).
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

TrueSatan wrote:Yup using 4.8.1
How did you get 4.8.1? Which version of MinGW did you install?

I have mingw-get-inst-20120426 but when I click the link on the How-to wiki, it tells me that version is no longer available.
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

I used the mingw-get-setup
So nothing special, the rest was auto setup.
Since I knew the newer gcc compiled fine on linux
I though its okay to use that one.
So I tried to compile those extra libs
and all worked so far. only thing that compiled but didn't work
was icu so i excluded it from my config.

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

Re: New map features

Post by romazoon »

cirdan wrote:Dock behaviour has not changed in this respect: they still have unlimited capacity. Ships will head for the nearest dock irrespectively of how many other ships are already there.
fair enough ;) and thanks for the answer.

adding waypoint is not much (given that boats anyway need plenty of waypoint to not hurt the pathfinder)...and at least give me a full control of wich boats go to wich docks ;) that s probably much better than a random choice as now i can specialise docks into a specific cargo with eyecandy/stations tiles :)

So no need to change the actual behavior, for me it s totally fine as it is.
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Branch updated. Noteworthy changes are:
  • Increased maximum map height ("more height levels") from openttd trunk has been merged. Please note that I have rewritten several commits, so you may find more (or fewer) bugs. All such commits deal with viewports and drawing, so any newly-introduced bug is likely to show up as a graphical glitch of some sort but not ruin your game. Still, it is a fairly invasive change; tread lightly and save your game frequently.
  • Fixed a crash that happened when reversing a train that was loading at a station but whose tail was still in a depot (reported by romazoon).
  • Fixed a hang when trying to edit a name whose default value was larger than the maximum allowed custom length (reported by romazoon).
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: New map features

Post by romazoon »

Oh Sweet ! You really rocks :)
Lechuza
Engineer
Engineer
Posts: 16
Joined: 30 Oct 2014 01:33

Re: New map features

Post by Lechuza »

Nice! Amazing work!

I would love if the daylength patch ends up making it to trunk too! :D
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Thanks for the new version cirdan :)
Will try it right away.
Attachments
openttd-custom-geac50efd-UNIX.tar.xz
Version: geac50efd
Ubuntu 14.04 64bit
(4.61 MiB) Downloaded 34 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

cirdan wrote:Branch updated.
... and here be the Win32 binaries with the usual guarantee of a lack of any guarantee:
OpenTTD-geac50efd-Win32.7z
(5.26 MiB) Downloaded 33 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 49 guests