Page 56 of 69

Re: New map features

Posted: 23 Jul 2016 15:03
by cirdan
Hafting wrote:You are right, when I closed the window. The crash turned out to be repeatable. Your patch did not apply directly, but solved the problem when I applied it manually.
Yes, the crash can be reproduced by selling a vehicle with an invalid order and then closing the depot window. The patch might also fix the other bug that was causing you crashes during autosave, which would explain why I did not see anything wrong in the code. The current codebase goes against the C++ standard and requires workarounds in several places and this is one of them; for the record, the crash happens because GCC 6 assumes that object contents are undefined before running their constructor, but the current code does not always respect this rule and initialises some fields in the memory allocation function (cfr. ZeroedMemoryAllocator). I try to fix this as I go by, but we are not quite there yet.

I will not be able to upload a fix for this bug to the repository for some time, but you should be safe with that patch applied.

Re: New map features

Posted: 01 Aug 2016 11:37
by notafrog
It's a while since I last congratulated you, Cirdan. At the time I hadn't yet played a game with this fork.
I now have and it' s certainly opened up a lot of new possibilities so futher congrats are in store. Please takea bow.
My favourite is being able to build custom-headed bridges over small stations. Along with tunnel signals, It opens up whole new possibilities for metro type systems.

There's just one thing bugging me though. I'm pretty sure you haven't touched the industry production algorithms, yet when playing with this patch my productions just go down and down and down, no matter how high my transport percentages (and I keep them all up above 65%). It's happened with the three games I've started so far but never with the standard OpenTTD version. It's as if the directions have been reversed and the better I deliver the worse they perform!

Re: New map features

Posted: 07 Aug 2016 14:53
by cirdan
notafrog wrote:It's a while since I last congratulated you, Cirdan. At the time I hadn't yet played a game with this fork.
I now have and it' s certainly opened up a lot of new possibilities so futher congrats are in store. Please takea bow.
My favourite is being able to build custom-headed bridges over small stations. Along with tunnel signals, It opens up whole new possibilities for metro type systems.
Well, thank you.
notafrog wrote:There's just one thing bugging me though. I'm pretty sure you haven't touched the industry production algorithms, yet when playing with this patch my productions just go down and down and down, no matter how high my transport percentages (and I keep them all up above 65%). It's happened with the three games I've started so far but never with the standard OpenTTD version. It's as if the directions have been reversed and the better I deliver the worse they perform!
The industry production code should behave the same as in openttd trunk, but there is always the possibility that I messed something up with an independent change. A savegame would be useful here.

Re: New map features

Posted: 14 Aug 2016 11:57
by Hafting
Another crash seen. I was looking at the link graph, trying to figure out a dangerous drop in passenger shipping profits. I think I was zooming/scrolling at the time it crashed.

The crash log:

Code: Select all

*** OpenTTD Crash Report ***

Crash at: Sun Aug 14 11:09:56 2016
In game date: 1998-05-01 (0)

Crash reason:
 Signal:  Aborted (6)
 Message: <none>

Binary:
 Version:    g78838570M-tracerestrict-cirdan (2)
 NewGRF ver: 17006ba4
 Build date: Jul 22 2016 00:06:07
 Flags:      64-bit little-endian

Stacktrace:
 [00] openttd(_ZNK12CrashLogUnix13LogStacktraceEP7stringb+0x69) [0x706659]
 [01] openttd(_ZNK8CrashLog12FillCrashLogEP7stringb+0x122) [0x5fcbd2]
 [02] openttd(_ZNK8CrashLog12MakeCrashLogEv+0xa4) [0x5fd5e4]
 [03] openttd() [0x706582]
 [04] /usr/lib/libc.so.6(+0x330b0) [0x7fdde653a0b0]
 [05] /usr/lib/libc.so.6(gsignal+0xcf) [0x7fdde653a04f]
 [06] /usr/lib/libc.so.6(abort+0x16a) [0x7fdde653b47a]
 [07] /usr/lib/libc.so.6(+0x2bea7) [0x7fdde6532ea7]
 [08] /usr/lib/libc.so.6(+0x2bf52) [0x7fdde6532f52]
 [09] openttd() [0x67de59]
 [10] openttd(_ZNK14SmallMapWindow16GetStationMiddleEPK7Station+0x3b) [0x7b02db]
 [11] openttd(_ZNK16LinkGraphOverlay16GetStationMiddleEPK7Station+0x28) [0x675728]
 [12] openttd(_ZNK16LinkGraphOverlay9DrawLinksEPK13DrawPixelInfo+0x70) [0x6757a0]
 [13] openttd(_ZNK16LinkGraphOverlay4DrawEPK13DrawPixelInfo+0x11) [0x675a11]
 [14] openttd(_ZNK14SmallMapWindow12DrawSmallMapEP13DrawPixelInfo+0x23c) [0x7ae9ec]
 [15] openttd(_ZNK14SmallMapWindow10DrawWidgetERK4Recti+0x31b) [0x7aed2b]
 [16] openttd(_ZN17NWidgetBackground4DrawEPK6Window+0x367) [0x849cf7]
 [17] openttd(_ZN19NWidgetPIPContainer4DrawEPK6Window+0x24) [0x8479c4]
 [18] openttd(_ZN17NWidgetBackground4DrawEPK6Window+0x14d) [0x849add]
 [19] openttd(_ZN22NWidgetSmallmapDisplay4DrawEPK6Window+0x2a5) [0x7b07a5]
 [20] openttd(_ZN19NWidgetPIPContainer4DrawEPK6Window+0x24) [0x8479c4]
 [21] openttd(_ZN19NWidgetPIPContainer4DrawEPK6Window+0x24) [0x8479c4]
 [22] openttd(_ZNK6Window11DrawWidgetsEv+0x1e) [0x84a90e]
 [23] openttd() [0x84ff77]
 [24] openttd() [0x84ff53]
 [25] openttd(_Z26DrawOverlappedWindowForAlliiii+0x81) [0x8510d1]
 [26] openttd(_Z16RedrawScreenRectiiii+0x52) [0x641512]
 [27] openttd(_Z15DrawDirtyBlocksv+0x11e) [0x64171e]
 [28] openttd(_Z13UpdateWindowsv+0xe3) [0x852eb3]
 [29] openttd(_ZN15VideoDriver_SDL8MainLoopEv+0x1f9) [0x8399b9]
 [30] openttd(_Z12openttd_mainiPPc+0x1306) [0x6f7966]
 [31] /usr/lib/libc.so.6(__libc_start_main+0xf1) [0x7fdde6527291]
 [32] openttd(_start+0x29) [0x560669]

Operating system:
 Name:     Linux
 Release:  4.6.4-rt8-2-rt
 Version:  #1 SMP PREEMPT RT Fri Jul 29 18:50:55 CEST 2016
 Machine:  x86_64
 Compiler: GCC 6.1.1 "6.1.1 20160707"

Configuration:
 Blitter:      32bpp-sse4-anim
 Graphics set: aBase (5981)
 Language:     /usr/local/share/games/openttd/lang/norwegian_bokmal.lng
 Music driver: extmidi
 Music set:    NoMusic (0)
 Network:      no
 Sound driver: null
 Sound set:    OpenSFX (87)
 Video driver: sdl

Fonts:
 Small:  DejaVu Sans
 Medium: DejaVu Sans
 Large:  DejaVu Sans
 Mono:   sprite

AI Configuration (local: 0):
  0: Human
  1: DictatorAI (v183)
  2: NoCAB (v499)
  3: DictatorAI (v183)
  4: NoCAB (v499)
  6: NoCAB (v499)
  7: DictatorAI (v183)
 GS: Renewed City Growth (v5)

Libraries:
 FontConfig: 2.12.1
 FreeType:   2.6.5
 ICU i18n:   57.1
 ICU lx:     57.1
 LZMA:       5.2.2
 LZO:        2.09
 PNG:        1.6.24
 SDL:        1.2.15
 Zlib:       1.2.8

---- gamelog start ----
Tick 0: New game
    Revision text changed to g78838570M-tra, savegame version 24, modified, newgrf version 0x17006ba4
    New game mode 1, landscape 1
    Added NewGRF: GRF ID F1250006, checksum D30B7D445FCF33F3FA16232376E2B073, filename: firs.grf (md5sum matches)
    Added NewGRF: GRF ID 54670901, checksum F3699B81A7B2BB59EABD49164AE53796, filename: TGrandom.grf (md5sum matches)
    Added NewGRF: GRF ID FBFB9905, checksum F747797A14AAA646402DC4E16DE5E82C, filename: longer_girder__steel_bridge.1/longergirdersteelbridge.grf (md5sum matches)
    Added NewGRF: GRF ID EC0D9110, checksum D1510A1006B03BCDAAFE562D5D05BACF, filename: raise_landscaping_costs.2/raise_landscaping_costs.grf (md5sum matches)
    Added NewGRF: GRF ID 48530101, checksum EC17E22A38C037D156BD22A96F4A8523, filename: reduced_passenger_payment.1.0/reducedpassengerpayment.grf (md5sum matches)
    Added NewGRF: GRF ID 52571201, checksum 9548AAA21E5B7E8168B3B19EF8290A83, filename: grvts32.grf (md5sum matches)
    Added NewGRF: GRF ID 44440A01, checksum FCEEC76CF44EC23E7FE9C88048CF11CC, filename: av8_aviators_aircraft_set-2.21/pb_av8w.grf (md5sum matches)
    Added NewGRF: GRF ID 4A430002, checksum 332F5EE83BB1A8F7C1766E610B48A222, filename: indstatr_32.grf (md5sum matches)
    Added NewGRF: GRF ID 44440000, checksum A15C21BAFCC06FBB85CDB2E7CB945667, filename: pineapple_trains-1.2/pb_trains_10cc.grf (md5sum matches)
    Added NewGRF: GRF ID 4D4E0103, checksum 0727CAF0B249F0D3BD08E6140657FC27, filename: modified_bridge_properties.0.3/bridgeprop.grf (md5sum matches)
    Added NewGRF: GRF ID 414E0201, checksum 536506BDDDBD8644815FC2E7E6A80D7A, filename: fish_2-2.0.2/fish.grf (md5sum matches)
    Game started
Tick 58918: Load game
    Revision text changed to g78838570M-tra, savegame version 24, modified, newgrf version 0x17006ba4
    Game loaded
Tick 20932: Load game
    Revision text changed to g78838570M-tra, savegame version 24, modified, newgrf version 0x17006ba4
    Game loaded
Tick 46388: Load game
    Revision text changed to g78838570M-tra, savegame version 24, modified, newgrf version 0x17006ba4
    Game loaded
Tick 19184: Load game
    Revision text changed to g78838570M-tra, savegame version 24, modified, newgrf version 0x17006ba4
    Game loaded
---- gamelog end ----

*** End of OpenTTD Crash Report ***
The crashed game and png is attached. I use my own custom versions of firs.grf and Renewed_City_Growth-5. These are available from:
http://tenkende-august.homelinuxserver.org/sw/firs.grf and http://tenkende-august.homelinuxserver. ... owth-5.tar

Re: New map features

Posted: 17 Aug 2016 10:17
by notafrog
cirdan wrote:
notafrog wrote:There's just one thing bugging me though. I'm pretty sure you haven't touched the industry production algorithms, yet when playing with this patch my productions just go down and down and down, no matter how high my transport percentages (and I keep them all up above 65%). It's happened with the three games I've started so far but never with the standard OpenTTD version. It's as if the directions have been reversed and the better I deliver the worse they perform!
The industry production code should behave the same as in openttd trunk, but there is always the possibility that I messed something up with an independent change. A savegame would be useful here.
Here you are. My running version displays g2505861bM in the top bar and I downloaded it on 25th March this year. But I've witnessed the same behaviour with all previous versions I've run, starting around last October.

The lowest transport rating on primary raw materials is 68%.
If I let the game run one year from 01.04.1970 to 01.04.1971, there are 11 production decreases for 2 increases.
I know increases/decreases are probabilistic, but this goes way beyond the bounds of believability.
And it's pretty much every year, and it's the same in the other two games I've started.

Re: New map features

Posted: 17 Aug 2016 21:35
by cirdan
Hafting wrote:Another crash seen. I was looking at the link graph, trying to figure out a dangerous drop in passenger shipping profits. I think I was zooming/scrolling at the time it crashed.

The crashed game and png is attached. I use my own custom versions of firs.grf and Renewed_City_Growth-5. These are available from:
http://tenkende-august.homelinuxserver.org/sw/firs.grf and http://tenkende-august.homelinuxserver. ... owth-5.tar
Thanks for your bug report, I will look into this.
notafrog wrote:Here you are. My running version displays g2505861bM in the top bar and I downloaded it on 25th March this year. But I've witnessed the same behaviour with all previous versions I've run, starting around last October.

The lowest transport rating on primary raw materials is 68%.
If I let the game run one year from 01.04.1970 to 01.04.1971, there are 11 production decreases for 2 increases.
I know increases/decreases are probabilistic, but this goes way beyond the bounds of believability.
And it's pretty much every year, and it's the same in the other two games I've started.
Thank you too, I will also look into this.

Re: New map features

Posted: 23 Aug 2016 20:43
by cirdan
Hafting wrote:Another crash seen. I was looking at the link graph, trying to figure out a dangerous drop in passenger shipping profits. I think I was zooming/scrolling at the time it crashed.
I could not load your savegame because it was made with JGR's tracerestrict patch applied on top of my branch, but I think I managed to find the bug anyway, as I can reliably make the game crash with the same stack trace. The crash happens when trying to draw link graphs for emtpy (lingering) stations in the smallmap. The attached patch should fix this. Thanks for the bug report.

Re: New map features

Posted: 01 Sep 2016 20:24
by cirdan
notafrog wrote:The lowest transport rating on primary raw materials is 68%. If I let the game run one year from 01.04.1970 to 01.04.1971, there are 11 production decreases for 2 increases. I know increases/decreases are probabilistic, but this goes way beyond the bounds of believability. And it's pretty much every year, and it's the same in the other two games I've started.
It turns out that I had indeed messed up the probabilities of industry production increase/decrease when smooth economy is enabled. The attached patch should fix this. Thanks for your bug report.

Re: New map features

Posted: 03 Sep 2016 19:39
by wallyweb
These Windows 32 bit compilations include the following diffs (follow the links to see what they are about):

free-bridges.diff
fix.diff
fix-smooth-economy.diff

Here are the unguaranteed binaries:
OpenTTD-g78838570b-tracerestrict-cirdan-3 diff-Win32.7z
JGR's tracerestrict version
(5.5 MiB) Downloaded 48 times

Re: New map features

Posted: 06 Sep 2016 13:55
by notafrog
Thank you Cirdan and thank you Wally Web. Great job.

Re: New map features

Posted: 06 Sep 2016 15:49
by notafrog
wallyweb/cirdan: I'm not sure whether it's the compilation or the patch but I seem to be stuck in Mexican Spanish.
When I change the language to English in the cfg file, it changes straight back to Spanish_MX as soon as I run the binary.
Even if I rename the Spanish_MX language file, it still brings it back with the changed name. I'm not sure if I'm overlooking something obvious. ?(

(I can actually read Spanish, so I can still play, but this probably isn't the behaviour people are looking for.)

Re: New map features

Posted: 07 Sep 2016 01:23
by wallyweb
notafrog wrote:wallyweb/cirdan: I'm not sure whether it's the compilation or the patch but I seem to be stuck in Mexican Spanish.
When I change the language to English in the cfg file, it changes straight back to Spanish_MX as soon as I run the binary.
Even if I rename the Spanish_MX language file, it still brings it back with the changed name. I'm not sure if I'm overlooking something obvious. ?(

(I can actually read Spanish, so I can still play, but this probably isn't the behaviour people are looking for.)
Does this happen when you start NMF OpenTTD with no grf's?

Re: New map features

Posted: 07 Sep 2016 06:45
by cirdan
notafrog wrote:wallyweb/cirdan: I'm not sure whether it's the compilation or the patch but I seem to be stuck in Mexican Spanish.
When I change the language to English in the cfg file, it changes straight back to Spanish_MX as soon as I run the binary.
Even if I rename the Spanish_MX language file, it still brings it back with the changed name. I'm not sure if I'm overlooking something obvious. ?(

(I can actually read Spanish, so I can still play, but this probably isn't the behaviour people are looking for.)
Certainly not. Mexican Spanish is the last language added to the project, and I had this happen to me once, only that with Latin, which was the last language added at that time. The cause was that somehow the rest of the languages had not been recompiled after a code change so the program switched to the only language file that was up to date. Did you copy the new files over an existing installation? If you did, can you try installing them somewhere else for a test?

Re: New map features

Posted: 07 Sep 2016 17:38
by notafrog
cirdan wrote:Certainly not. Mexican Spanish is the last language added to the project, and I had this happen to me once, only that with Latin, which was the last language added at that time. The cause was that somehow the rest of the languages had not been recompiled after a code change so the program switched to the only language file that was up to date.
cirdan wrote:Did you copy the new files over an existing installation? If you did, can you try installing them somewhere else for a test?
wallyweb wrote:Does this happen when you start NMF OpenTTD with no grf's?
Thanks for the feedback. It helped point me to the solution, although it wasn't quite so simple since I keep my data on a different disk.
To cut a long story short, the "lang" directory from the new compile has to be copied to the data directory if you use a custom location like I do.

When I tried installing the new compile in a clean directory, I got a message in Spanish telling me the graphics files were missing. I expected a message like this but I didn't expect it to be in Spanish.
However, since my openttd.cfg file is also in the custom location, there was no language specified in the clean directory. As soon as I copied the .cfg over, I got English.

But then when I then pointed the program to my custom data directory, the Spanish came back and even changed my .cfg to "language=Spanish_MX".
So I copied the whole of the lang directory from the download directory to my data directory and it finally recognized English as a language.

Re: New map features

Posted: 16 Sep 2016 19:55
by cirdan
I have just pushed another update to the repository:
  • Fixed a crash that could happen when setting the start date for a timetable.
  • Station spread is now checked better when listing the possible stations for distant-join.
  • Invasive reworking of drawing code; there may be bugs lurking here.
  • Fixed a crash when drawing empty stations in the linkgraph view of the smallmap; thanks to Hafting for reporting.
  • Fixed the probability of industry production increase/decrease; thanks to notafrog for reporting.
  • Merged openttd commits to r27601, including a fix for compiling with GCC 6.

Re: New map features

Posted: 16 Sep 2016 21:57
by wallyweb
cirdan wrote:I have just pushed another update ...
:bow:
Excellent timing ... Tomorrow is my birthday. :D

For those who wish to help me celebrate, the unguaranteed Win32 binaries are posted below:
OpenTTD-REBASED-r27601-gc28fc172-Win32.7z
non gMo
(5.48 MiB) Downloaded 41 times
and for those who want bridges over stations (free-bridges.diff):
OpenTTD-FreeBridge-gc28fc172M-Win32.7z
Made with free-bridges.diff
(5.48 MiB) Downloaded 35 times
Enjoy
:D

Re: New map features

Posted: 17 Sep 2016 09:02
by TrueSatan
Ty for the updates Cirdan.
I will post my compiled linux binaries l8er.

Here it is, compiled with some warining:

Code: Select all

[SRC] Compiling network/network_chat_gui.cpp
/nmf/src/network/network_chat_gui.cpp: In function ‘void NetworkDrawChatMessage()’:
/nmf/src/network/network_chat_gui.cpp:216:11: warning: unused variable ‘blitter’ [-Wunused-variable]
  Blitter *blitter = Blitter::get();
           ^
Think its not that important, but its a new one so I reported it :)

JGR's next if its gets the same update.
So can't test the new version now. I am to used to play with tracerestriction.

Fast test and... as soon as i move the mouse new game or old game the game crashes
I will make a new post with the crash report.
Edit: removed because this version just crashed and the other waits for a fix.

Thanks and cheers

Re: New map features

Posted: 17 Sep 2016 21:34
by TrueSatan
Crashreport Ubuntu Linux 14.04 64bit version.
As said before as soon as I move around the map it crashes baldy.
Vamilla game without any newgrfs enabled

Re: New map features

Posted: 17 Sep 2016 22:24
by wallyweb
TrueSatan wrote:

Code: Select all

[SRC] Compiling network/network_chat_gui.cpp
/nmf/src/network/network_chat_gui.cpp: In function ‘void NetworkDrawChatMessage()’:
/nmf/src/network/network_chat_gui.cpp:216:11: warning: unused variable ‘blitter’ [-Wunused-variable]
  Blitter *blitter = Blitter::get();        ^
I saw this as well when compiling with MinGW on Windows.
I didn't think much about it as it seems to involve network chat and as far as I know none of the network players have migrated to NMF as yet meaning that there is no way to test it. Any chance that this might be an r27601 issue?

Re: New map features

Posted: 18 Sep 2016 06:22
by cirdan
TrueSatan wrote:Crashreport Ubuntu Linux 14.04 64bit version.
As said before as soon as I move around the map it crashes baldy.
Vamilla game without any newgrfs enabled
Your savegame works just fine here... Can you compile a debug build to see if we get a better stacktrace? Since you are compiling your own binaries, it would also help me if you could bisect this.