Back to Home / #openttd / 2019 / 02 / Prev Day | Next Day
#openttd IRC Logs for 2019-02-07

---Logopened Thu Feb 07 00:00:54 2019
00:46-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has joined #openttd
00:46-!-keoz is "Grmph" on #openttd
01:17-!-sla_ro|master [] has joined #openttd
01:17-!-sla_ro|master is "slamaster" on #sla #openttd
01:24<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7086: Change #6173: Update SDL driver to use SDL 2.0
01:58-!-sla_ro|master [] has quit []
02:11-!-andythenorth [] has joined #openttd
02:11-!-andythenorth is "andythenorth" on #openttd
02:20-!-andythenorth [] has quit [Quit: andythenorth]
02:21<@peter1138>It was him.
02:21-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has quit [Ping timeout: 480 seconds]
02:24-!-Markk [] has quit [Ping timeout: 480 seconds]
02:27-!-andythenorth [] has joined #openttd
02:27-!-andythenorth is "andythenorth" on #openttd
03:00<@peter1138>Yes but no.
03:05<LordAro>seems legit
03:06<andythenorth>\o/ Horse compiled
03:06<andythenorth>it was not compiling
03:07<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7184: Change: Distribute cargo to multiple stations or industries
03:14*andythenorth fixing
03:14<andythenorth>I should just build some default offsets into nml PP
03:14<andythenorth>every newgrf has to piss around with the offsets for every vehicle length
03:14<andythenorth>daft :)
03:15<Eddi|zuHause>provide a default template?
03:17<andythenorth>we should only need the template for 8/8
03:17<andythenorth>the rest is deterministic maths :P
03:18<Pikka>if you draw your shortened vehicles at the front of the 8/8 template, they should use the same offsets. Until you want to reverse them, anyway :)
03:19*Pikka bbl
03:19-!-Pikka [] has quit [Quit: Leaving]
03:29<andythenorth>default tracks are rather too wide for the trains :P
03:30*andythenorth knew this, it's only noticeable when fixing offsets
03:30-!-andythenorth [] has quit [Quit: andythenorth]
03:34-!-supermop_Home [] has quit [Ping timeout: 480 seconds]
04:01-!-andythenorth [] has joined #openttd
04:01-!-andythenorth is "andythenorth" on #openttd
04:46-!-Sularken [] has joined #openttd
04:46-!-Sularken is "Bjum Subjum" on #openttd #bitlbee
04:49-!-andythenorth [] has quit [Ping timeout: 480 seconds]
04:50-!-andythenorth [] has joined #openttd
04:50-!-andythenorth is "andythenorth" on #openttd
04:51<andythenorth>time for another infosec meeting!
05:05-!-andythenorth [] has quit [Quit: andythenorth]
05:06<Eddi|zuHause>dunno what's happening, i started TF, and it freezes every few minutes, while paused
05:06<Eddi|zuHause>just scrolling around the map
05:11<Eddi|zuHause>in perf top i get lots of "ttm_mem_evict_first" "native_queued_spin_lock_slowpath" and "mutex_trylock"
05:19<Eddi|zuHause>might be related to this
05:19<Eddi|zuHause>can anyone translate that for me? :p
05:39<@peter1138>That is about PCI passthrough to a virtualized hardware.
05:39<@peter1138>At least, VT-D is.
05:40-!-andythenorth [~andytheno@] has joined #openttd
05:40-!-andythenorth is "andythenorth" on #openttd
05:40<Eddi|zuHause>so, probably not that related
05:40<Eddi|zuHause>or someone put me in a virtual environment and i didn't notice
05:42<Eddi|zuHause>there's also this thing which probably isn't all that related either, but they all talk about radeon graphics
05:51-!-Speedy` [] has joined #openttd
05:51-!-Speedy` is "Speedy's my name." on #openttd #sd
06:15-!-sla_ro|master [] has joined #openttd
06:15-!-sla_ro|master is "slamaster" on #sla #openttd
06:47<Eddi|zuHause>i'm gonna destroy everything now
06:47-!-Eddi|zuHause [] has quit []
06:48-!-Eddi|zuHause [] has joined #openttd
06:48-!-Eddi|zuHause is "Johannes E. Krause" on #openttd
06:49<Eddi|zuHause>hm, this definitely did not work
07:03<@peter1138>super duper
07:26-!-Zeentch [] has joined #openttd
07:26-!-Zeentch is "..." on #openttd
07:26-!-m3henry [~oftc-webi@] has joined #openttd
07:26-!-m3henry is "OFTC WebIRC Client" on #openttd
07:27<Zeentch>Whee finally some OTTD people :D
07:29<Zeentch>I was wondering, who was it that made the NML Highlighting xml file that's available to download, and do you think that that person could make a YAML 1.2 file for the highligting as well? I use Sublime text for all of my coding and i've recently started to get into NewGRF for OTTD and would be a lot easier with highlighting available as well.
07:33<Eddi|zuHause>i feel like we discussed that before
07:34<Zeentch>First time im here so i've not been a part of that discussion, how did it end?
07:34<Sularken>With the Apocalypse.
07:35<Zeentch>@Eddi|zuHause, thank you so much for the link :D
07:38-!-Markk [] has joined #openttd
07:38-!-Markk is "Bjum Bjumfors" on #openttd #bitlbee
07:39<andythenorth>someone gonna make me one for BBEdit too? o_O
07:44<Zeentch>can't bbedit use the xml file that is already around?
07:44<andythenorth>dunno :)
07:48<Zeentch>unfortunatly i can't test it since i'm not using a mac so it's kinda hard for me to try out, although i do have a mac mini that i need to sort out so might try it at that point.
08:15-!-Samu [] has joined #openttd
08:15-!-Samu is "OFTC WebIRC Client" on #openttd
08:16-!-Flygon [] has quit [Read error: Connection reset by peer]
08:20-!-Mazur [] has quit [Remote host closed the connection]
08:26<Samu>this site is not safe
08:26<andythenorth>cert expired
08:27<m3henry>not using letsencrypt?
08:28<m3henry>oh no, it is, but no-one automated its renewal
08:34<Samu>* Check if the instance is expecting an answer from a DoCommand.
08:34<Samu>oh, he's offline
08:35-!-andythenorth [~andytheno@] has left #openttd []
08:37<Samu>is it normal for the garbage collector to crash?
08:37<Samu>I can't reproduce it
08:38<Samu>it's one of those rare crashes that occur from time to time
08:42<@peter1138>Is it normal to crash... Hmm!
08:43<Samu>crash once in months
08:43<Samu>if i try to make it crash again, i may not get it in a timely manner
08:48<m3henry>Solution is obvious: Get rid of the GC xD
08:50<@peter1138>Just run out memory instead, yes :-)
08:50<milek7>just needs more swap ;d
08:52<Samu>so it ran out of memory?
08:52<Samu>yesterday's night crash?
08:52<@peter1138>Who said that?
08:52<@peter1138>No I didn't.
08:52<Samu>hmm, then how does it crash?
08:52<m3henry>You tell us
08:53<@peter1138>My comment was in response to "get rid of the GC" :)
08:53<@peter1138>Nothing to do with your crash.
08:53<Samu>03:16:23 <Samu> Unhandled exception at 0x00007FF63B8C42CF in openttd.exe: 0xC0000005: Access violation writing location 0x000000B8988BFFD0. occurred 03:16:44 <Samu> Exception thrown at 0x00007FF63B8C42CF in openttd.exe: 0xC0000005: Access violation writing location 0x000000B8988BFFD0. occurred
08:53<Samu><Samu> > openttd.exe!SQClass::Mark(SQCollectable * * chain) Line 529 C++
08:53<@peter1138>Didn't glx already run through it with you?
08:53<Samu>yes and no
08:53<@peter1138>Or did you forget?
08:54<Samu>it's initiated in only 2 places, that's all he said
08:54<@peter1138>There's nothing wrong with the GC.
08:55<m3henry>Have you tried using unique_ptr instead?
08:55<@peter1138>It's the last comment on your bug report.
08:55<m3henry>Or perhaps something is dangling
08:55<@peter1138>What happens is the AI got replaced, but it tried to call the callback of the previous AI.
08:56<Samu>ah, that's not the garbage collector crash
08:56<@peter1138>Why do you say that?
08:56<Samu>it crashes in a different place
08:57<@peter1138>That's how garbage collectors work.
08:57<@peter1138>They collect garbage (unused objects) periodically, not constantly, therefore it will happen in a different place.
08:57<Samu>it's separate from that report, unless you mean it's related
08:58<@peter1138>It's very likely related, yes.
08:58<Samu> i didn't force a reload ai, it just happened by itself when i was just watching
08:58<@peter1138>Could still happen if an AI dies and then another starts up.
08:58<@peter1138>I imagine it's "new" because previously AIs would not start immediately, now they can.
08:59<@peter1138>CcAI needs to check that the current AI instance is the same AI instance.
09:01<Samu>the reload ai button was there since ever
09:01<Samu>i doubt it's due to them starting immediately
09:02<Samu>let me try crash in 1.8.0
09:04-!-octernion [~octernion@] has joined #openttd
09:04-!-octernion is "octernion" on #openttd
09:04<Samu>funny, can't make it crash
09:06<@peter1138>13:58 <@peter1138> I imagine it's "new" because previously AIs would not start immediately, now they can.
09:07<@peter1138>But you know...
09:07<@peter1138>Feel free to ignore me :-)
09:07<Samu>but how come?
09:09<@peter1138>Welcome to "unintended consequences".
09:10<Samu>i know that, but still I don't get how it could be related. Reload AI button is per config slot
09:10<@peter1138>AIs can go bankrupt as well.
09:10<@peter1138>Then they are replaced, by themselves.
09:10<@peter1138>Well, not by themselves.
09:10<Samu>have you seen what Reload AI does?
09:11<@peter1138>It kills off the AI, and then starts a new one. So?
09:12<Samu>this is really strange for me, I can't see why it's related
09:13<Samu>gonna test before 7151
09:13<@peter1138>Just pressing reload by itself won't cause an issue.
09:14<@peter1138>It's if you press reload just as the AI issued a command and would be expecting an answer for.
09:14<@peter1138>after 7151, this could also happen if start_date = 0 and a company goes bankrupt while issuing a command.
09:15<@peter1138>Which is how it could happen without pressing Reload AI.
09:18-!-Eddi|zuHause [] has quit []
09:18<Samu>aha, got a crash before 7151
09:18<Samu>well what now?
09:19<@peter1138>By pressing reload?
09:19<@peter1138>So still the same issue.
09:19<Samu>I rolled back to
09:20<Samu>Commit fa53abe8
09:20<@peter1138>Don't focus on 7151, I only mentioned that as a reason why the issue could occur without pressing Reload ID.
09:20<@peter1138>I didn't mention it to blame it for causing the crash.
09:20<Samu>but i can't make it happen on 1.8.0
09:20<Samu>something between 1.8.0 and fa53abe8
09:21<Samu>very strange, i'm trying the same steps in 1.8.0, no crash
09:23<Samu>no matter how much I try, no crash, gonna give up
09:24-!-Eddi|zuHause [] has joined #openttd
09:24-!-Eddi|zuHause is "Johannes E. Krause" on #openttd
09:29<Samu>testing Commit 4703cd43
09:29<Samu>wondering if it's AI Config related
09:29<Samu>im always restarting random ais
09:30<Samu>ah snap, can't build
09:30<Samu>requires png library all the old library stuff
09:33<Samu>i can use revert commit, i guess
09:36<Samu>nop, crash
09:36<Samu>it's not that either
09:38<Samu>what else could it be
09:38<Samu>stuff that handles ticks?
09:43-!-Eddi|zuHause [] has quit []
09:43-!-Eddi|zuHause [] has joined #openttd
09:43-!-Eddi|zuHause is "Johannes E. Krause" on #openttd
09:45<@planetmaker>can we have slightly bit of a live feed for each command executed on your console?
09:47-!-nielsm [] has joined #openttd
09:47-!-nielsm is "Niels Martin Hansen" on #openttd
09:51<LordAro>planetmaker: people have tried in vain for quite a while to make Samu less verbose
09:56<Samu>i give up
09:56<Samu>the issue is not originated by 7151
10:03<Samu>glx provided fix, prevents the crash on the reload ai, but.. doesn't totally solve the problem from what I can gather, still gonna PR
10:05-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has joined #openttd
10:05-!-keoz is "Grmph" on #openttd
10:05<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick opened pull request #7190: Fix #7188: AI instance crash when reloading AI in a server, and an AI…
10:10<@peter1138>Samu, nobody said the issue originated in 7151
10:17-!-supermop_work [~supermopw@] has joined #openttd
10:17-!-supermop_work is "A CIRC user" on #openttd
10:18-!-Zeentch [] has quit []
10:19-!-supermop_work_ [~supermopw@] has joined #openttd
10:19-!-supermop_work_ is "A CIRC user" on #openttd
10:19<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on pull request #7190: Fix #7188: AI instance crash when reloading AI in a server, and an AI…
10:23-!-octernion [~octernion@] has quit [Ping timeout: 480 seconds]
10:26-!-supermop_work [~supermopw@] has quit [Ping timeout: 480 seconds]
10:27<Samu>is there a unique identifier for instances?
10:27<Samu>start date, start tick, something
10:29<@peter1138>I think it needs a network protocol change :/
10:31-!-octernion [~octernion@] has joined #openttd
10:31-!-octernion is "octernion" on #openttd
10:31<@peter1138>Well, probably not, I'm not really thinking about it at the moment.
10:33<Samu>looking at garbage collector dude, for(SQUnsignedInteger i = 0; i < _stack.size(); i++) SQSharedState::MarkObject(_stack[i], chain);
10:33<Samu>stack size = 1024, allocated = 1024
10:33<Samu>it's full?
10:34<Samu>meh, forget it
10:34<@peter1138>Yes, don't bother looking at the garbage collector.
10:36<Samu>uhm, okay, but it crashed :|
10:36<Samu>I know, it could be related to this reload ai stuff
10:36<@peter1138>The GC crashed because it was given bad information.
10:37<@peter1138>There's no issue with the GC itself.
10:37<Samu>gonna try make garbage collector run every tick
10:37<Samu>maybe i can find a way to crash it
10:40<@peter1138>You can crash it by giving it bad data.
10:41<Samu>dont know which data was given, didn't pay much attention :(
10:42<Samu>it was something in **chain
10:43<@peter1138>Seriously Samu, don't bother wasting your time on it.
10:43<Samu>"access violation writting to "
10:43<Samu>doing the MARK
10:44<Samu>void SQVM::Mark(SQCollectable **chain) {
10:44<Samu>crashed at the '{'
10:45<Samu>which is a weird place for a crash
10:45<Samu>as for what data it contained, I really have no idea
10:45<DorpsGek_II>[OpenTTD/OpenTTD] nikolas commented on pull request #7086: Change #6173: Update SDL driver to use SDL 2.0
10:48<nielsm>yeah seriously, don't attempt to debug a virtual machine for a relatively complex language like squirrel, if you couldn't design and implement it yourself from the ground up
10:48-!-Wormnest [~Wormnest@] has joined #openttd
10:48-!-Wormnest is "Wormnest" on #openttd
10:49<@peter1138>Samu, it probably contained data about an AI instance that is no longer valid.
10:51<Samu>that's why i'm forcing garbage collection every tick
10:51<Samu>to see if i can reproduce it
10:51<Samu>smashing that reload ai button
10:52<@peter1138>Cause and effect.
10:55<Samu>can't trigger any crash
10:56<Samu>oh well
10:56<Samu>time to give up
10:56<@peter1138>Write an AI that sends a network command and expects a callback every tick.
10:57<Samu>i wonder if it simply ran out of memory
10:57<nielsm>if you can't trigger it repeatedly then it's likely related to memory layout or timing and likely a use-after-free bug
10:58<nielsm>trigger it reliably *
10:58<nielsm>(not repeatedly)
10:58<Samu>hmm, gonna try the opposite
10:59<Samu>instead of every tick, gonna try every year or so
11:01<Samu>if ((AI::frame_counter & (DAY_TICKS * DAYS_IN_YEAR) == 0)) {
11:02<nielsm>that looks strange
11:03<Samu>oh right, the parenthesis in the bad place
11:03<Samu>if ((AI::frame_counter & (DAY_TICKS * DAYS_IN_YEAR)) == 0) {
11:04<nielsm>unless DAY_TICKS * DAYS_IN_YEAR happens to be a nice bitmask like 0x0FFF that's just a bad way of writing "once in a random while"
11:04<Samu>it was & 255 originally
11:05<nielsm>yes that's a nice bitmask
11:05<nielsm>that works for triggering the condition every time the low byte is zero
11:06<nielsm>i.e. once every 256 frames
11:06<Samu>ah, I'm doing it wrong then
11:08<nielsm>74*365 == 27010 in decimal, or ‭0110100110000010‬ in binary
11:08<Samu>gonna use this
11:09<nielsm>that would work
11:09<Samu>alright, afk 30 min
11:09<Samu>server running, waiting for a crash
11:13-!-Gabda [] has joined #openttd
11:13-!-Gabda is "realname" on #openttd
11:18-!-HerzogDeXtEr [] has joined #openttd
11:18-!-HerzogDeXtEr is "purple" on #openttd
11:19<DorpsGek_II>[OpenTTD/OpenTTD] glx22 commented on pull request #7190: Fix #7188: AI instance crash when reloading AI in a server, and an AI…
11:24-!-glx [] has joined #openttd
11:24-!-mode/#openttd [+v glx] by ChanServ
11:24-!-glx is "Loïc GUILLOUX" on #openttd.noai #openttd.notice +#openttd
11:24<DorpsGek_II>[OpenTTD/OpenTTD] Gabda87 opened pull request #7191: Add #5654: Initializing graph GUI
11:27<Gabda>does this count as issue necroing?
11:29<+glx>well if the issue is not fixed I guess it's ok
11:33<nielsm>it's not like a closed issue means "this must never be fixed"
11:34<Eddi|zuHause>especially not if it's a "andy closed this in a cleanup spree" ticket
11:34<+glx>same for stale bot closed issues
11:35<Samu>no crashing yet
11:35<nielsm>only if the discussion in the ticket leads up to a "this is definitely not a bug, actually intended" conclusion :)
11:36-!-synchris [~synchris@] has joined #openttd
11:36-!-synchris is "Synesios Christou" on #openttd
11:37<Gabda>ok :)
11:39<Samu>can't get any kind of crash, just reloaded ais and yet nothing
11:39<Samu>oh well, time to give up?
11:43<Samu>it's still july 1950, there was no time for any garbage collection call yet
11:44<Samu>@calc 32767 / 74
11:44<@DorpsGek>Samu: 442.797297297
11:45<Samu>@calc 443 / 30
11:45<@DorpsGek>Samu: 14.7666666667
11:46<Samu>15 months
11:50<Samu>why isn't garbage collection called every tick?
11:50<Samu>just wondering
11:50<nielsm>because it tends to take a long time and the value of calling it too often is generally low
11:50<+glx>because it's useless to call it more often
11:51<+glx>it's called every 255 ticks, but only for 1 AI at a time I think
11:52<nielsm>every 256 ai frames
11:52<nielsm>ai frames may not be every tick, depending on difficulty setting
11:52<nielsm>and the counter for ai frames begins when an ai is started, so every ai will have its gc cycle offset
11:53<+glx>I think the crash you got was just a bad luck when pressing restart
11:54<Samu>it wasn't a restart, it was a thing on its own
11:55*glx is trying to see if we can use args of the callbacks to check if it was our command
11:56<+glx>like on call the AI store cmd, tile, p1 and p2, then compare that when the callback happens
11:59<Samu>studying the results originated from CompanyID cid = (CompanyID)GB(AI::frame_counter, 8, 4);
11:59<Samu>first cid was 1
12:00<Samu>shouldn't it be 0?
12:00<Samu>gonna keep looking at it
12:00<nielsm>...what, why should the AI frame counter determine a company id?
12:00-!-Gustavo6046 [~Gustavo60@] has joined #openttd
12:00-!-Gustavo6046 is "Non dico nomen." on #openttd #oftc #moocows
12:01<+glx>it's just so we don't GC all AI at the same time
12:01<+glx>AI:frame_counter is shared with all AIs
12:02<Samu>256: cid = 1; 512: cid = 2; 768: cid = 3
12:02<nielsm>yes, that's how numbers work
12:03<+glx>and the modulo is 255
12:04<+glx>ah no it's not a modulo
12:05<+glx>but similar
12:06<nielsm> <- how numbers work
12:07<Samu>i wonder what happens when it gets to 14
12:08<nielsm>I'm sure the code will tell you
12:09<+glx>the code checks it's a valid AI id so nothing bad happens
12:09<Samu>what about cid = 0 ?
12:09<+glx>you forgot 0
12:10<Samu>first frame was already = 1
12:10<Samu>didn't start from 0
12:10<nielsm>happens at frame 0x0000, 0x1000, 0x2000, etc
12:10<+glx>yes but cid will be 0 after 15
12:11<+glx>4 bits go from 0 to 15
12:11<+glx>and restart
12:11<Samu>aha, 0
12:12<Samu>15 is not a valid cid though, just pauses a bit longer
12:13-!-octernion [~octernion@] has quit [Ping timeout: 480 seconds]
12:14<Samu>if (((AI::frame_counter - 1)& 255) == 0) {
12:14<Samu>maybe this? or not necessary?
12:14<nielsm>makes no difference
12:14<Samu>just so it would start at cid = 0
12:14<nielsm>just runs it one frame earlier than it usually would
12:14<nielsm>also why do you think this is a problem?
12:15<Samu>not a problem, but hmm... nevermind, not a problem
12:15<+glx>and basically in single player 0 is not an AI anyway ;)
12:15<nielsm>if you want to know when it runs GC, add in a DEBUG() line
12:16<nielsm>if you want to force a gc cycle to run, hack in a console command to force one
12:18<nielsm>and also keep in mind that squirrel itself will probably run a gc cycle on its own after a while
12:19<nielsm>because that's what garbage collected languages like it do
12:21-!-supermop_work_ [~supermopw@] has quit [Ping timeout: 480 seconds]
12:26-!-octernion [~octernion@] has joined #openttd
12:26-!-octernion is "octernion" on #openttd
12:35-!-Progman [] has joined #openttd
12:35-!-Progman is "Peter Henschel" on #openttd
12:35<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick updated pull request #7190: Fix #7188: AI instance crash when reloading AI in a server, and an AI…
12:38-!-Wormnest [~Wormnest@] has quit [Ping timeout: 480 seconds]
12:41<@peter1138>I return.
12:43<Samu>i need cargo_index
12:43<Samu>can't split the function into 2 like you did
12:44<Samu>or maybe i can
12:45<Samu>will split a bit less
12:45-!-m3henry [~oftc-webi@] has quit [Quit: Page closed]
12:45<@peter1138>glx, with the callbacks, it may be sufficient to check it at the command-level, based on company, rather than delving into the AI?
12:47<+glx>when the AI is restarted company is deleted and a new one is created
12:48<+glx>the commands know nothing about companies, only the index
12:48<+glx>I think
12:50<@peter1138>Yup, but you can say the same about the AI instance side, too.
12:50<+glx>for now I added cmd as callback args
12:50<+glx>so I need to store command args when the script calls and check that when handling the callback
12:51<@peter1138>But really it shouldn't be getting to the callback.
12:51<+glx>once the command is queued I don't know if we can do something
12:51<@peter1138>Hmm, I supose it depends if it's the same company but different AI instance, or different company.
12:52<@peter1138>I think a command from a company that got removed and then added as new should not get executed.
12:52<+glx>hard to check I think
12:52<@peter1138>I can think of a way but it'd be intrusive to the network protocol.
12:53<@peter1138>Not that it matters too much :)
12:53<+glx>at least the callback can do some safety checks to be sure it was its command
12:54<Samu>give instance a unique name or so
12:55<Samu>then compare the name ?
12:55<@peter1138>Map company ID to a unique ID within NetworkSendCommand
12:55<@peter1138>Then map it back on the recieving end.
12:56<@peter1138>If there is not mapping, reject it.
12:56<@peter1138>Actually it could still work with a byte value which is just incremented for each new company.
12:56<@peter1138>Then a new company with the same company->index would be a different unique ID
12:57-!-Eddi|zuHause [] has quit [Ping timeout: 480 seconds]
12:58<+glx>hmm should also work if a company is merged while sending a command and a new company is then created in the same slot
12:58<+glx>(very rare case but possible I guess)
12:59<+glx>especially if the server is very slow
13:01-!-Eddi|zuHause [] has joined #openttd
13:01-!-Eddi|zuHause is "Johannes E. Krause" on #openttd
13:19-!-Wolf01 [] has joined #openttd
13:19-!-Wolf01 is "Wolf01" on #openttd
13:28-!-m3henry [] has joined #openttd
13:28-!-m3henry is "OFTC WebIRC Client" on #openttd
13:32<DorpsGek_II>[OpenTTD/OpenTTD] Gabda87 opened pull request #7192: Change: making the style of MakeVoid calls uniform
13:33<Gabda>is this kind of change is welcomed?
13:33<Gabda>or I shouldn't bother if I see something like this?
13:34<Gabda>(you can drop one "is" from my first question)
13:34<@peter1138>"y < MapMaxY()"
13:34<@peter1138>That means the function will be called for every iteration of the loop
13:34<@peter1138>Best not to make that change.
13:35<@peter1138>Although I see it's done elsewhere, so who knows :p
13:36<Gabda>yes, I also saw it elsewhere
13:36<Gabda>and I think the compiler optimizes it
13:36<m3henry>Without -flto that call wouldn't be optimized too
13:36<Gabda>but makes it more readable
13:37<@peter1138>m3henry, well it's inline
13:37<Gabda>hmm, so the compiler does not optimize it by default?
13:37<@peter1138>static inline I mean.
13:37<m3henry>oh It is in the same TU
13:37<@peter1138>Gabda, probably but...
13:38<m3henry>Well then the compiler would be free to optimize it away if it things there's no aliasing
13:38<@peter1138>Gabda, even if the function is optimized away, it could still be the difference between a register compare and a memory compare.
13:38<m3henry>I would just store the value in a const variable
13:38<m3henry>Then I don't need to care if the operation is expensive
13:39<@peter1138>glx, hmm, trying to work out how to synchronize my unique on new company creation.
13:39<@peter1138>*unique id.
13:39-!-gelignite [] has joined #openttd
13:39-!-gelignite is "gelignite" on #openttd
13:40<Gabda>I think it also can be a readability vs optimizing question
13:40<@peter1138>Oh, NetworkServerNewCompany, perhaps.
13:41<m3henry>I would say that storing the value before entering the loop is more readable, because I know that the value does not change
13:41<Gabda>the first gets better a little, the latter might be a little worse
13:41<Gabda>I see
13:42-!-andythenorth [] has joined #openttd
13:42-!-andythenorth is "andythenorth" on #openttd
13:42<m3henry>int const maxX = MapMaxX(); is easy to understand the effect
13:42<@peter1138>I think we prefer const int :-)
13:43<Gabda>ok, I'll rewrite them
13:43<m3henry>I recently found out that if you read variable declarations backwards, then it reads as it would in english
13:44<Gabda>my main concern was to make them uniform
13:44<m3henry>So west-const became my standard
13:44<Gabda>I do not insist any of the particular style
13:45<m3henry>It can't work for function pointer declarations or array declarations
13:46<m3henry>But it's better than nothing
13:51<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick updated pull request #7184: Change: Distribute cargo to multiple stations or industries
13:54<+glx> <-- untested but it compiles fine :)
13:57<andythenorth>one day a faster nml
13:58<andythenorth>how about multi-grfs?
13:58<andythenorth>appears as one grf to openttd, but is actually multiple grf files?
13:59<@peter1138>#include :/
13:59<andythenorth>then I could compile, e.g. one grf per vehicle
13:59<DorpsGek_II>[OpenTTD/OpenTTD] Gabda87 updated pull request #7192: Change: making the style of MakeVoid calls uniform
14:00<andythenorth>which would be, perhaps 20x faster when a single vehicle changes out of 200
14:00<andythenorth>I'm allowing an order of magnitude for overhead
14:01<Gabda>I inserted your suggestions
14:01-!-supermop_work [~supermopw@] has joined #openttd
14:01-!-supermop_work is "A CIRC user" on #openttd
14:02-!-frosch123 [] has joined #openttd
14:02-!-frosch123 is "frosch" on #openttd
14:03-!-supermop_work_ [~supermopw@] has joined #openttd
14:03-!-supermop_work_ is "A CIRC user" on #openttd
14:04-!-octernio_ [~octernion@] has joined #openttd
14:04-!-octernio_ is "octernion" on #openttd
14:06-!-octernion [~octernion@] has quit [Ping timeout: 480 seconds]
14:07<Gabda>in case something like this: is it possible to restart the check, or I have to push a new version of the commits?
14:09<nielsm>there is a restart button some people can push
14:09-!-supermop_work [~supermopw@] has quit [Ping timeout: 480 seconds]
14:12-!-Thedarkb-T60 [] has joined #openttd
14:12-!-Thedarkb-T60 is "realname" on #openttd #oolite
14:15<@peter1138>Hmm, so client send command, server executes command, and then I guess sends it back to all the clients, right?
14:15<nielsm>server validates command can execute, then executes it itself and tells everyone else to do the same thing at that tick
14:16<nielsm>as far as I understand
14:22-!-debdog [~debdog@2a00:79c0:612:9600:7a24:afff:fe8a:d04d] has quit [Quit: Initiating getting-the-hell-out-of-here maneuver!]
14:22<Gabda>nielsm: thanks
14:23<andythenorth>ha ha
14:23<andythenorth>I cut Horse compile time from 1 minute to 15 seconds
14:23<andythenorth>much better
14:23<nielsm>by doing something dumb and in retrospect obvious?
14:23<andythenorth>I deleted 200 of the vehicles
14:23<andythenorth>much faster now
14:24<andythenorth>I think I might rework it to be a minimal set, like Pikka's
14:24<andythenorth>I bored of waiting for compiles
14:24<andythenorth>10 engines, 10 wagons
14:25<andythenorth>or I do separate grfs
14:26<andythenorth>24 grfs
14:29<@peter1138>Why is it so slow?
14:29<Samu> the fix I got partially fixes the issue
14:30<andythenorth>script musa to upload them all
14:30<andythenorth>peter1138: it's slow for multiple reasons
14:30<Samu>this is the part I was unable to fix "It als shows that the latest version of the AI has been loaded instead but it didn't receive the savegame data because it's incompatible even though min version to load is 1"
14:30<andythenorth>it's python
14:30<andythenorth>it has some kind of massive ID resolution phase, for action 2 IDs etc
14:31<andythenorth>it's single threaded
14:31<andythenorth>there's no partial compiling
14:31<andythenorth>it does have caches
14:32<Samu>help me think. I save my AI which is version 7 but has a min load version of 2
14:32<Samu>if I load it on a computer that only has version 6 of the AI
14:32<Samu>what will happen?
14:33<Samu>doesn't load the data, because it was saved as version 7?
14:33<Samu>loads the data, because the min load version is 2?
14:35<andythenorth>Horse makefile sample run time is 52s, of that 47s is spent in nmlc
14:35<andythenorth>to compile 270 trains with a crapload of varaction 2
14:36-!-Thedarkb-T60 [] has quit [Ping timeout: 480 seconds]
14:37<andythenorth>if I decompile/recompile the grf with grfcodec, the encode is 2 seconds
14:44-!-Thedarkb-T60 [] has joined #openttd
14:44-!-Thedarkb-T60 is "realname" on #openttd #oolite
14:50<@peter1138>Nice, got a crash on Reload AI...
14:51<Samu>who's a savegame versioning expert?
14:53-!-Gabda [] has quit [Quit: Leaving]
14:58<LordAro>@topic get 3
14:58<@DorpsGek>LordAro: Don't ask to ask, just ask
14:58<LordAro>Samu: ^
14:58<andythenorth>how will he know who to highlight otherwise :P
14:59<andythenorth>Samu: broadly speaking, there are no experts
14:59<@peter1138>So I've queued up a command for a company that no longer exists.
14:59<@peter1138>Which means my code is on the right track, BUT, i'm doing the company -> unique_id mapping too late.
14:59<LordAro>that seems inconvenient
15:01-!-Gja [] has joined #openttd
15:01-!-Gja is "Martin" on #ceph #bcache #openttd
15:03<@peter1138>I could try checking that the company exists but that kinda defeats the point of the mapping.
15:04-!-debdog [~debdog@2a00:79c0:612:9600:7a24:afff:fe8a:d04d] has joined #openttd
15:04-!-debdog is "Wowbagger" on #bitlbee #openttd
15:06-!-Gja [] has quit []
15:14<DorpsGek_II>[OpenTTD/OpenTTD] LordAro requested changes for pull request #7192: Change: making the style of MakeVoid calls uniform
15:16<DorpsGek_II>[OpenTTD/OpenTTD] LordAro approved pull request #7191: Add #5654: Initializing graph GUI
15:17<DorpsGek_II>[OpenTTD/OpenTTD] LordAro merged pull request #7191: Add #5654: Initializing graph GUI
15:28<DorpsGek_II>[OpenTTD/OpenTTD] LordAro updated pull request #7170: Update: Changelog
15:28<LordAro>arbitrary reminder for someone to review ^
15:28<LordAro>i've bumped the date to sunday now :p
15:28-!-synchris [~synchris@] has quit [Quit: yeeha!]
15:29-!-cHawk [] has quit [Quit: Leaving]
15:37<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh approved pull request #7170: Update: Changelog
15:40<DorpsGek_II>[OpenTTD/OpenTTD] nikolas commented on pull request #7170: Update: Changelog
15:41<DorpsGek_II>[OpenTTD/OpenTTD] Gabda87 commented on pull request #7192: Change: making the style of MakeVoid calls uniform
15:41-!-Gabda [] has joined #openttd
15:41-!-Gabda is "OFTC WebIRC Client" on #openttd
15:42<LordAro>Gabda: yeah, like the old commit :)
15:43<Gabda>ok :)
15:45<Gabda>peter1138 and m3henry suggested that adding the variable might be a good idea, so I created a new version
15:45<LordAro>peter1138: ^ thoughts on #7192?
15:45<Gabda>but as there are different preferences, maybe you should talk about it
15:46<Samu>a version 7 with a min version of 2 can't load on a version 6
15:46<Samu>must understand why
15:47<@peter1138>I'd imagine because 7 > 6;
15:47<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh updated pull request #6965: Add: Option for population-linear town cargo generation
15:48<@peter1138>LordAro, I didn't specifically request const, but I did say putting the function call inside the for () condition was maybe not so good.
15:48<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh commented on pull request #6965: Add: Option for population-linear town cargo generation
15:48<@peter1138>But, I dunno.
15:51*LordAro sees what godbolt says
15:52-!-cHawk [] has joined #openttd
15:52-!-cHawk is "realname" on #openttd
15:55<LordAro> -O2 optimises away very nicely
15:55<LordAro>as does -O1, in fact
15:58<Gabda>oh, it is a nice tool
15:59<nielsm>modern compilers are pretty good at simplifying expressions also involving many layers of (inline) functions and more
16:00<@peter1138>So it already loads it into a local variable.
16:00<@peter1138>Er, register, I mean.
16:02<@peter1138>I like that when MakeVoid is a NOP it's just... nothign :p
16:03<@peter1138>Gabda, so apologies, I was talking bollocks :p
16:04<Gabda>no problem, it wasn't much work, and we learned something in return :)
16:05<Gabda>I'll push the first commit back tomorrow (with the changed commit msg), but I have to go now
16:05<Gabda>bye everyone!
16:05-!-Gabda [] has quit [Quit: Page closed]
16:06-!-Progman [] has quit [Remote host closed the connection]
16:06<nielsm>okay, I just looked ath that BitpackedUint template thing I wrote the other day again
16:06<nielsm>both gcc and clang optimize it nicely
16:06<nielsm>microsoft less so
16:07<nielsm>in fact it's pretty terrible
16:08<@peter1138>MSVC is pretty terrible for LordAro's example too.
16:09<LordAro>it's not great, it has to be said
16:09-!-octernion [~octernion@] has joined #openttd
16:09-!-octernion is "octernion" on #openttd
16:09<LordAro>even when adding /Ob /Og
16:10<@peter1138>Seems to be ignoring all the inlines, as it's allowed.
16:11<LordAro>even adding __forceinline does nothing
16:11-!-sla_ro|master [] has quit []
16:11<LordAro>wait hang on, is it just that it's not optimising the functions away, so it looks bigger?
16:12<nielsm>yeah in your example it's leaving in the functions
16:12-!-octernio_ [~octernion@] has quit [Ping timeout: 480 seconds]
16:12<nielsm>but optimizing the actual main()
16:13<LordAro>looks like the loop is still there though
16:13<LordAro>wait, of course it is
16:13<LordAro>yeah, looks much the same as gcc
16:17<@peter1138>clang goes weird.
16:18<LordAro>oh, that's weird
16:18<LordAro>has it tried to unroll the loop?
16:19<LordAro>no, something to do with the volatile variable
16:19<LordAro>if i change it to an extern variable, it behaves much better
16:29<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick opened pull request #7193: Fix #6468: Load correct version of AI as specified during the time of its save.
16:29<Samu>inb4 rejected
16:31-!-gelignite [] has quit [Quit: Good fight, good night!]
16:33<andythenorth>bananas cert outdated?
16:33<LordAro>uh oh
16:33<LordAro>no? doesn't have https
16:34<LordAro>wait, yes it does, chrome is hiding it from me
16:34<m3henry>Is there pointer aliasing going on?
16:39<dwfreed>andythenorth: "Not Valid After: Wednesday, November 27, 2019 at 18:59:59 Eastern Standard Time"
16:39<dwfreed>cert is valid for *
16:56<DorpsGek_II>[OpenTTD/OpenTTD] LordAro dismissed a review for pull request #7170: Update: Changelog
16:56<DorpsGek_II>[OpenTTD/OpenTTD] LordAro updated pull request #7170: Update: Changelog
16:57-!-nielsm [] has quit [Ping timeout: 480 seconds]
16:59-!-octernion [~octernion@] has quit [Quit: octernion]
17:00-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
17:01-!-octernion [~octernion@] has joined #openttd
17:01-!-octernion is "octernion" on #openttd
17:03<@peter1138>White stilton with mango and ginger.
17:03<@peter1138>Not really proper cheese, is it?
17:03<LordAro>bit poncy
17:04<@peter1138>Oh... there were some builds, apparently.
17:05<@peter1138>We should just go with it an add NRT for 1.9 :p
17:05<@peter1138>Then a week later release 1.9.1 with some of the bugs fixed.
17:05<andythenorth>loads of builds
17:05<andythenorth>loads of grfs
17:05<@peter1138>I'm kinda not joking.
17:05<LordAro>well we've not reached feature freeze yet
17:06<@peter1138>We put off massive features and it just gets... never done.
17:07*peter1138 rebases it
17:08<Samu>there are differences between ai_sl.cpp and game_sl.cpp
17:10<@peter1138>It builds, ship it!
17:10<Samu>gonna try fix this
17:10-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
17:10<andythenorth>it has been more widely play tested than normal
17:11<andythenorth>there was no NoAI or NoGo support iirc though
17:11<Samu>btw I found a way to detect if a GS is active in scenario editor without resorting to my ai gui stuff
17:11<Samu>ai debug window
17:12<Samu>how could I forget
17:12<supermop_work_>peter1138: if you don't put it in 1.9, when will it go in
17:12<Samu>the big Game Script rectangular button is not grayed out if it's active, and it is if it's not
17:12<@peter1138>They do build road vehicles at least :p
17:13<andythenorth>it will go in 2.0
17:13<@peter1138>Did AIs ever build trams?
17:13<andythenorth>otherwise known as 10.10
17:13<andythenorth>oops too many 0
17:14<andythenorth>at least nrt has nml support :)
17:14<supermop_work_>i just mean, people have been messing about with NRT since before 1.8
17:14<andythenorth>not merged but eh
17:14<@peter1138>Ok, they build tramlines too.
17:14<@peter1138>Not efficiently, mind.
17:15<@peter1138>No trams on it, haha
17:15<supermop_work_>and it works pretty ok, most of the 'problems' seem to be philosophical differences as to what NRT might do
17:15<supermop_work_>but without it in, idk if you will get a better critical mass of testing than you do now
17:16<supermop_work_>at least, i am certainly not motivated to do more nrt grf work for the past year-ish
17:17<@peter1138>Hmm, no notification.
17:18<Samu>loading a scenario is loaded as if it was a savegame
17:18<Samu>is there a distinction?
17:18<@peter1138>No, they are the same.
17:19<Samu>ok, that's the problem
17:19<m3henry>What would count as a big enough change to make 2.0?
17:19-!-andythenorth is now known as Guest479
17:19-!-andythenorth [] has joined #openttd
17:19-!-andythenorth is "andythenorth" on #openttd
17:19<Samu>or maybe the problem is during save
17:19<LordAro>i'm not sure anyone knows
17:20<Samu>have to investigate this
17:20<andythenorth>stick nrt in the RC, revert if fail?
17:20<andythenorth>or just fix?
17:20<m3henry>Probably best to go with 1.10 then
17:20<andythenorth>it's not like we force upgrades on people
17:21<LordAro>depends how badly it fails, i imagine
17:22<@peter1138>Lots of subtle things are touched.
17:23<DorpsGek_II>[OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT)
17:23<@peter1138>That took you a while...
17:23<DorpsGek_II>[OpenTTD/OpenTTD] PeterN dismissed a review for pull request #6811: Feature: Add NotRoadTypes (NRT)
17:26<DorpsGek_II>[OpenTTD/OpenTTD] M3Henry commented on issue #7125: Convert singleplayer game to multiplayer server
17:26-!-Guest479 [] has quit [Ping timeout: 480 seconds]
17:27<DorpsGek_II>[OpenTTD/OpenTTD] PeterN commented on issue #7125: Convert singleplayer game to multiplayer server
17:27<@peter1138>If it add it to beta1, we'd get loads of testing.
17:27<@peter1138>And mostly no bug reports, but still.
17:30<@peter1138>docs/landscape.html is wrong.
17:31<@peter1138>Apparently I never updated the docs when I did the 16 -> 64 change.
17:33*andythenorth bed
17:33-!-andythenorth [] has quit [Quit: andythenorth]
17:34<Samu>launching scenario editor does it correctly
17:34<Samu>loading a scenario does it wrong
17:41<m3henry>Can't believe I hadn't thought until now to do a dist upgrade
17:53-!-Thedarkb-T60 [] has quit [Ping timeout: 480 seconds]
18:00<Samu>there is no stopping a GS from starting
18:03<Samu>GS needs something similar to what's in the AI
18:03<Samu>or else, scenario editor will always load and activate GS
18:04<Samu>how to solve
18:09-!-snail_UES_ [] has joined #openttd
18:09-!-snail_UES_ is "Jacopo Coletto" on #openttd
18:11-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has quit [Ping timeout: 480 seconds]
18:12-!-octernion [~octernion@] has quit [Quit: octernion]
18:12-!-Thedarkb-T60 [] has joined #openttd
18:12-!-Thedarkb-T60 is "realname" on #openttd #oolite
18:18-!-supermop_work_ [~supermopw@] has quit [Ping timeout: 480 seconds]
18:23<guru3>what months does property maintenance come due?
18:24<Samu>can't treat OWNER_DEITY as a company
18:24<guru3>also thanks
18:24<Samu>what can I do:(
18:27-!-HerzogDeXtEr [] has quit [Read error: Connection reset by peer]
18:46<@peter1138>Hmm, why do we need to introduce electrified road and non-electified trams
18:49<Samu>no idea
18:56-!-m3henry [] has quit [Quit: Page closed]
19:01-!-tokai [] has joined #openttd
19:01-!-mode/#openttd [+v tokai] by ChanServ
19:01-!-tokai is "Christian Rosentreter" on +#openttd
19:08-!-tokai|noir [] has quit [Ping timeout: 480 seconds]
19:17-!-Flygon [] has joined #openttd
19:17-!-Flygon is "Flygon" on #openttd
19:23-!-Thedarkb-T60 [] has quit [Ping timeout: 480 seconds]
19:24-!-Thedarkb-X40 [] has joined #openttd
19:24-!-Thedarkb-X40 is "realname" on #openttd #/r/openttd #oolite
19:54<DorpsGek_II>[OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT)
19:57<Eddi|zuHause><peter1138> Hmm, why do we need to introduce electrified road and non-electified trams <-- because andy is annoyed of steam trams needing wires
19:58<Eddi|zuHause>and maybe 3 other people :p
19:58<Eddi|zuHause>also, trolleybusses which might be slightly higher requested :)
19:59<@peter1138>I think it's acceptable to require a NewGRF provide the extras.
19:59<@peter1138>And preferable.
20:00<Eddi|zuHause>i think the precedence here is that openttd provides tram rails by default even though it doesn't provide any trams
20:00<@peter1138>Yes but that's historical
20:01<@peter1138>Well, I'll figure something out, but I dislike it.
20:02<@peter1138>Anyway, night night.
20:02<Eddi|zuHause>i'm fine with not providing them
20:02<Eddi|zuHause>and andy probably went back and forth on this :p
20:09-!-Thedarkb-X40 [] has quit [Ping timeout: 480 seconds]
20:19-!-Wormnest [~Wormnest@] has joined #openttd
20:19-!-Wormnest is "Wormnest" on #openttd
20:29<Samu>gonna do what andythenorth asked
20:30<Samu>i really have a tendency to put everything in the same pr
20:43<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick opened pull request #7194: Fix: Remove desert around lakes upon generation.
20:52<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick updated pull request #7073: Feature: Generate lock ready rivers upon world generation
20:57-!-Thedarkb-X40 [] has joined #openttd
20:57-!-Thedarkb-X40 is "realname" on #openttd #/r/openttd #oolite
21:16<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick opened pull request #7195: Change: Don't build town bridges in possible lock locations.
21:16-!-snail_UES_ [] has quit [Quit: snail_UES_]
21:24-!-snail_UES_ [] has joined #openttd
21:24-!-snail_UES_ is "Jacopo Coletto" on #openttd
21:38-!-Thedarkb-X40 [] has quit [Ping timeout: 480 seconds]
21:52-!-Wormnest [~Wormnest@] has quit [Quit: Leaving]
21:54-!-Mazur [] has joined #openttd
21:54-!-Mazur is "Stefan Linnemann" on #openttd #oolite
21:56<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick updated pull request #7073: Feature: Generate lock ready rivers upon world generation
22:03<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick commented on pull request #7073: Feature: Generate lock ready rivers upon world generation
22:19<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick updated pull request #7084: Change: AI/GS Config GUI overhaul
22:21<DorpsGek_II>[OpenTTD/OpenTTD] SamuXarick updated pull request #7158: Add: Client setting gui.start_spectator
22:33-!-Samu [] has quit [Quit: Page closed]
22:36-!-D-HUND [~debdog@2a00:79c0:63d:4b00:7a24:afff:fe8a:d04d] has joined #openttd
22:36-!-D-HUND is "Wowbagger" on #bitlbee #openttd
22:36<DorpsGek_II>[OpenTTD/OpenTTD] Eddi-z commented on pull request #7195: Change: Don't build town bridges in possible lock locations.
22:39-!-debdog [~debdog@2a00:79c0:612:9600:7a24:afff:fe8a:d04d] has quit [Ping timeout: 480 seconds]
22:55-!-snail_UES_ [] has quit [Quit: snail_UES_]
23:13-!-glx [] has quit []
---Logclosed Fri Feb 08 00:00:55 2019