Config
Log for #openttd on 6th February 2019:
Times are UTC Toggle Colours
00:27:11  *** supermop_work_ has quit IRC
00:54:23  <Samu> silent
01:00:19  <Pikka> shhh
01:24:43  *** Thedarkb-X40 has joined #openttd
01:31:32  *** Thedarkb-T60 has quit IRC
02:15:52  *** Wormnest has joined #openttd
02:25:45  *** Wormnest has quit IRC
03:38:36  *** D-HUND has joined #openttd
03:41:59  *** debdog has quit IRC
03:45:48  *** Samu has quit IRC
03:46:19  *** Thedarkb-X40 has quit IRC
03:52:37  *** glx has quit IRC
05:54:33  *** keoz has joined #openttd
06:57:11  *** andythenorth has joined #openttd
07:12:44  <andythenorth> moin
07:16:34  *** keoz has quit IRC
07:20:10  *** sla_ro|master has joined #openttd
07:40:59  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7118: Add #5006: Flag to hide rail type from construction. https://git.io/fh6Vk
07:46:47  <andythenorth> \o/
07:46:56  <andythenorth> now how can I abuse that? :D
07:47:07  <andythenorth> universal rail vehicle? o_O
07:47:30  <planetmaker> Moin. That existed before :)
07:47:37  <planetmaker> To the dismay of some other authors :P
07:48:22  <andythenorth> hmm, can I connect NG to RAIL, and have a vehicle go between them?
07:48:41  <planetmaker> label is label. If a vehicle says it can run on both: fine
07:48:59  <peter1138> You can now do it the other way.
07:49:14  <peter1138> Universal rail type that is compatible with everything.
07:49:24  <peter1138> Hmm, no
07:49:26  <peter1138> Wait
07:49:33  <peter1138> Yeah that was the oroginal way
07:49:44  <andythenorth> yeah
07:49:44  <peter1138> I dunno :p
07:49:54  <andythenorth> one day we'll have a spec :D
07:50:05  <peter1138> Yeah I need to update the wiki. Where is the wiki?
07:50:21  <andythenorth> https://newgrf-specs.tt-wiki.net/wiki/Action0/Vehicles/Trains#Track_type_.2805.29
07:50:22  <andythenorth> and stuff
07:50:24  <planetmaker> There definitely should be an OpenTTD 1.10 next year. Not 2.0 ;)
07:50:29  <andythenorth> you probably want the railtypes page
07:50:37  <andythenorth> not the vehicle track type page
07:50:53  <andythenorth> it's nice that they're different
07:50:54  <peter1138> planetmaker, we should never do 2.0 :-)
07:51:11  <andythenorth> I think we should keep the threat of 2.0 alive
07:51:19  <peter1138> Hmm, needs a login to edit.
07:51:23  <andythenorth> oof
07:51:26  <andythenorth> forums login should do it
07:51:28  <peter1138> Is it the same as the other logins or separate?
07:51:35  <andythenorth> should be same as forums, but it breaks sometimes
07:51:45  <andythenorth> I couldn't edit for ~2 years, then I could
07:52:19  <peter1138> " Auto-creation of a local account failed: Automatic account creation is not allowed. "
07:52:22  <peter1138> Hmm, well.
07:52:44  <peter1138> So, er, can someone else add it? :p
07:52:44  <andythenorth> yeah for 2 years I had to request edits via forum threads
07:53:06  <peter1138> Is it orudge who looks are that site?
07:53:33  <andythenorth> I don't thnk anyone looks after it afaict
07:54:15  <peter1138> Somebody hosts it and set that account linking up.
07:55:41  <andythenorth> yes, I don't even know if that one's on ottd or coop hosting though
07:56:00  <andythenorth> I know that getting anybody to answer questions about it is ~impossible
07:56:33  *** m3henry has joined #openttd
07:56:51  * andythenorth wonders about sacking that wiki
07:57:02  <andythenorth> and distributing the docs with nml or grfcodec using readthedocs
07:58:31  <peter1138> No, it's a useful reference.
07:58:47  <peter1138> github :p
07:59:27  <andythenorth> yeah, AIUI, readthedocs just publishes from a github repo, and edits are via PR
07:59:38  <andythenorth> and we have one less web service to run
08:00:58  <andythenorth> oof I have to go in the office for Risk Register meeting
08:01:09  <andythenorth> much rather stay at home and make enterprise software
08:01:33  <peter1138> Hmm, I need to change my tt-forums password.
08:02:21  <peter1138> "Must be between 6 characters and 30 characters."
08:02:23  <m3henry> Is the wiki difficult to maintain?
08:02:25  <peter1138> Limits, lol
08:02:31  <m3henry> 123qwe
08:02:33  *** m3henry has quit IRC
08:04:28  *** m3henry has joined #openttd
08:04:30  <andythenorth> nobody knows if the wiki is difficult to maintain :P
08:04:44  <andythenorth> I think frosch has tried to keep the lights on for it sometime
08:05:33  <peter1138> In my experience once installed they generally just run by themselves. Moderators deal with junk edits.
08:06:08  *** m3henry has quit IRC
08:06:28  <peter1138> Of course, it's likely to be out of date, security patch wise.
08:07:31  <andythenorth> it would be nice to make newgrf less generally shit to develop for
08:07:37  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #5006: Railtypes: 'hide railtype' flag https://git.io/fh9z0
08:07:38  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed issue #5006: Railtypes: 'hide railtype' flag https://git.io/fh9zE
08:07:40  <andythenorth> it's kinda un-fun right now
08:07:50  <peter1138> Okay, I must remember to squash and retitle commits to include the PR :/
08:08:00  <andythenorth> remember that
08:08:18  *** m3henry has joined #openttd
08:09:48  *** m3henry has joined #openttd
08:09:53  <m3henry> Would having to raise a PR discourage users from editing?
08:10:40  *** m3henry has quit IRC
08:11:46  *** m3henry has joined #openttd
08:11:50  <m3henry> Phone is not the best IRC client :v
08:11:52  <peter1138> Probably.
08:12:24  <Eddi|zuHause> <m3henry> Would having to raise a PR discourage users from editing? <-- almost definitely
08:12:26  <andythenorth> I wondered
08:12:30  <andythenorth> but compared to this?
08:12:31  <andythenorth> https://www.tt-forums.net/viewtopic.php?f=68&t=74378
08:12:32  <Eddi|zuHause> but so would not being able to make an account
08:13:02  <andythenorth> from 2016-2018 I could only edit via request in forums
08:13:10  <andythenorth> and nobody gave a fuck to fix it
08:13:16  <andythenorth> and I made new accounts that also don't work
08:13:35  <andythenorth> so eh, yeah, I'm somewhat biased agains the wiki
08:13:50  *** m3henry has quit IRC
08:14:06  <andythenorth> standard example of 'we must do it this way, it's the most technically correct'
08:14:08  <andythenorth> but also broken
08:14:43  <andythenorth> :D
08:15:39  *** m3henry has joined #openttd
08:15:40  <andythenorth> oh George has done AC-DC engines
08:16:25  <peter1138> Yes.
08:18:47  *** m3henry has quit IRC
08:22:21  <andythenorth> nice use of the feature
08:23:50  * andythenorth must finish Horse, then make an NRT grf
08:27:14  *** andythenorth has quit IRC
08:47:02  *** tokai has quit IRC
08:55:59  <Eddi|zuHause> <peter1138> "Must be between 6 characters and 30 characters." <-- what? you can't have the entirety of "war and peace" as your password?
08:57:31  *** andythenorth has joined #openttd
09:03:55  <peter1138> Sadly not.
09:16:25  <peter1138> Bah, my password DB is not synced :/
10:32:53  *** andythenorth has left #openttd
10:37:35  <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh9af
10:44:45  *** sla_ro|master has quit IRC
10:55:31  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh9a2
11:00:36  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh9a6
11:44:07  *** m3henry has joined #openttd
11:47:49  *** keoz has joined #openttd
12:02:04  <peter1138> Hmm, need a matrix with lowered entries :/
12:02:51  <peter1138> Or... inheritence and custom drawing, maybe.
12:06:55  *** supermop_Home has joined #openttd
12:36:08  <supermop_Home> Pikka is new tai just the color wireframe shapes for now?
12:53:05  *** m3henry has quit IRC
12:53:49  <peter1138> supermop_Home, yes
13:02:56  <Eddi|zuHause> is that an upgrade or downgrade from flat scrabble tiles?
13:09:31  <peter1138> Ok, the chocolate cake is now gone.
13:16:03  <Eddi|zuHause> how dares it
13:17:35  *** Flygon has quit IRC
13:37:19  *** Samu has joined #openttd
13:37:22  <Samu> hi
13:39:59  <Samu> what is pikka's basic industries named?
13:46:39  <Samu> round-robin too hard for my understanding
13:55:07  *** supermop_work has joined #openttd
13:56:24  *** supermop_work_ has joined #openttd
13:57:52  <supermop_work_> yo
14:01:38  <supermop_work_> @logs
14:01:38  <DorpsGek> supermop_work_: https://webster.openttdcoop.org/index.php?channel=openttd
14:01:57  <Samu> google is useless https://www.youtube.com/watch?v=b-hnwVKN-kE
14:02:53  <Samu> all i can find is cpu scheduling
14:03:00  <Samu> not helpful
14:03:27  <Samu> and round robin tournaments
14:04:11  *** supermop_work has quit IRC
14:04:20  <LordAro> the fact that it's on a cpu is irrelevant, use it
14:06:02  <Samu> I don't see the connection
14:08:24  <Samu> i'm not dealing with time
14:08:28  <Samu> I don't get it
14:08:56  <LordAro> you can treat time as just a other resource
14:18:04  <Samu> i don't get it
14:19:21  <Samu> dont know what round robin is nor what is supposed to do in this case
14:19:36  <Samu> i send 1 piece of cargo to an industry at random
14:19:49  <Samu> sometimes there's less cargo than industries
14:20:45  <Samu> if I send it in turns, some industries get 0
14:21:07  <Samu> if I send it at random, there's a chance every industry get it
14:21:50  <Samu> cargo packets fragmentates amounts in many small pieces
14:21:54  <Samu> usually 5
14:22:01  <Samu> depending on vehicle
14:22:44  <Samu> ships get 20 at times
14:23:02  <Samu> trains and road vehicles get 5
14:23:12  <Samu> and unsure about aircraft
14:24:46  <Samu> cargo age may also dictate how many pieces are in a packet
14:24:58  *** tokai has joined #openttd
14:24:58  *** ChanServ sets mode: +v tokai
14:25:28  <Samu> can fragment 1 packet of 5 pieces into up to 5 packets
14:25:43  <Samu> then that function is only distributing 1 piece
14:25:55  <Samu> distributing at random was the best solution I could find
14:26:01  <Samu> avoids save game conversion
14:26:13  <Samu> avoids some industries getting more than the others
14:26:21  <Samu> avoids "bias"
14:27:39  <Samu> round robin, no idea what would it do here
14:29:53  <Samu> there was some other different implementation by someone
14:30:14  <Samu> which requires savegame conversion, saving the data into the save for sync
14:30:22  <Samu> let me find
14:33:47  <Samu> https://www.tt-forums.net/viewtopic.php?f=33&t=77093#p1192630
14:39:32  <DorpsGek_II> [OpenTTD/OpenTTD] btzy commented on pull request #7005: Fix #7004: Redraw linkgraph overlay correctly after zoom https://git.io/fh9oa
14:41:32  <Samu> where do I get Pikka's Basic Industries grf
14:43:02  *** nielsm has joined #openttd
14:43:16  *** sla_ro|master has joined #openttd
14:44:36  <Samu> Is it Tal Industries?
14:49:54  <Samu> bah i always get a crash in debug mode when i download something from bananas
14:50:29  <nielsm> well, crash where?
14:50:47  <Samu> when exiting openttd
14:52:19  <Samu> https://paste.openttdcoop.org/pzifimxjz
14:56:03  <Samu> launch openttd
14:56:07  <Samu> check online content
14:56:12  <Samu> download something
14:56:16  <Samu> exit openttd
14:56:17  <Samu> crash
14:57:08  <Samu> --------------------------- Microsoft Visual C++ Runtime Library --------------------------- Debug Assertion Failed! Program: ...OpenTTD GitHub\OpenTTD\projects\..\objs\x64\Debug\openttd.exe File: minkernel\crts\ucrt\src\appcrt\lowio\close.cpp Line: 49 Expression: (_osfile(fh) & FOPEN) For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. (Press Retry to debug the application) -------
15:02:36  <peter1138> it's TaI Town.
15:04:15  <nielsm> yeah that's saying it's trying to close a file twice
15:04:25  <nielsm> what is trying to close what file?
15:04:37  <peter1138> "download something from bananas"
15:04:38  <peter1138> Hmm
15:05:13  <Samu> tick some content to download, download it
15:05:21  <Samu> then exit
15:06:10  <nielsm> it's a stdio handle it's trying to close
15:06:41  <nielsm> https://0x0.st/zsxY.png
15:08:42  <nielsm> oh well actually just closing all file handles opened with stdio.h
15:09:48  <peter1138> So closing an already closed file is an issue, I suppose.
15:09:54  <nielsm> indicating something is closing file handles behind its back
15:12:43  *** octernion has joined #openttd
15:24:10  <LordAro> windows specific?
15:28:01  *** Wormnest has joined #openttd
15:29:53  *** cHawk has joined #openttd
15:31:27  <nielsm> unknown, but may also be a problem on other platforms
15:31:50  <nielsm> I'm not sure how to approach debugging this
15:34:47  <peter1138> Add a wrapper around fclose :/
15:39:10  *** Thedarkb-T60 has joined #openttd
15:41:05  <Samu> about industry stopping acceptance
15:41:18  <Samu> it's handled
15:41:47  <Samu> if every industry is rejecting, the while loop returns false
15:42:39  <Samu> 		if (IndustryTemporarilyRefusesCargo(ind, cargo_type)) { 			rejected.Include(ind);
15:43:11  <Samu> } while (num_pieces != 0 && rejected.Length() != st->industries_near.Length());
15:43:36  <Samu> if all are rejecting, then rejected.Length will equal industries_near.Length
15:43:42  <Samu> the loop breaks
15:44:12  <Samu> i don't think an infinite loop will happen
15:46:29  <peter1138> What are you refering to?
15:46:37  <Samu> andythenorth
15:47:32  <peter1138> I don't see him saying anything about infinite loops.
15:47:32  <Samu> just tested pikka's grf
15:48:19  <Samu> what is he referring to then
15:49:18  <Samu> the tiles themselves stopping acceptance
15:49:49  <peter1138> He just says there may be bugs to take care of.
15:50:02  <peter1138> He doesn't say "this stuff happens so you'll have an infinite loop"
15:51:50  <Samu> st->always_accepted ?
15:52:15  <peter1138> He doesn't refer to anything specific.
15:52:33  <Samu> yeah, I have to guess
15:53:36  <Samu> the part I'm touching is just the industry, the industry tiles are handled elsewhere, and I didn't touch it
15:54:06  <peter1138> Nothing about guessing.
15:54:06  <Samu> unless he refers to my other PR
15:54:16  <peter1138> It's about making a note that things need to be fully tested, not just "i ran it and it's okay"
16:02:07  <Samu> dont know how to implement the robin-hood thing
16:02:13  <peter1138> robin-hood lol
16:02:18  <Samu> round-robin
16:05:42  <nielsm> many files are opened and closed, certainly...
16:05:46  <peter1138> Yup
16:06:32  *** Thedarkb-T60 has quit IRC
16:06:39  <peter1138> Samu, basically instead of using random, use a counter.
16:07:06  <peter1138> Store that counter inside the station struct.
16:07:10  <peter1138> (And it needs to be saved)
16:07:41  <peter1138> When you come to deliver cargo, it will be given to the next nearby industry as indicated by the counter, instead of a random one.
16:08:22  <peter1138> You may want a separate counter per cargo type.
16:08:24  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh9lr
16:08:40  <peter1138> (And it needs bounds checking in case industries are added to removed)
16:09:42  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh96i
16:11:10  <nielsm> why must openening the online content browser open/close a zillion files?
16:11:46  <peter1138> Does it check what's available locally?
16:13:01  <nielsm> yeah, it seems to be checking locally available files very muchj
16:13:04  *** Thedarkb-T60 has joined #openttd
16:29:08  <nielsm> hmm... https://0x0.st/zs3T.txt
16:29:32  <nielsm> that's from downloading the new content to pressing Exit and getting the assert
16:30:12  <nielsm> (nothing happens if you get the list of content available and do not download any new items, so didn't start logging until just before clicking Download)
16:34:26  <nielsm> okay, turns out it's actually the very first stream it attempts to close in the stdio shutdown that fails here, everything before it is called from ottd code or freetype code
16:35:34  *** Gja has joined #openttd
16:36:58  <Samu> the amount could be 0 if the industry doesn't want to process more cargo, not sure, have to recheck
16:37:16  <Samu> industry is full
16:40:28  *** octernio_ has joined #openttd
16:40:57  *** octernion has quit IRC
16:42:10  <nielsm> ahh, I have a suspicion on the fclose assert
16:42:56  <Samu> GetStockpiledCargo
16:42:56  <nielsm> might be related to gzopen/gzclose, those seem to not use fopen/fclose with FILE* streams but open/close with os handles
16:43:57  <Samu> i guess the max stockpiled cargo could be 65535 :P
16:44:12  <Samu> need to test this better
16:52:23  <peter1138> Samu, when could "min(1, xxx)" ever be less than 1?
16:52:59  <Samu> when stockpilled cargo is 65535, if that is even possible, i'm checking
16:53:33  <peter1138> How so?
16:54:13  <nielsm> why... why is zlib K&R C
16:54:14  <Samu> i think a way to force this test would be to have a cargo packet of 65535 units
16:55:00  <peter1138> Samu, oh fudge, ignore me, I confused max and min :p
16:55:04  <Samu> have a vehicle unload 65535 at a time
16:55:22  <peter1138> Deleted comment.
16:55:35  <Samu> ok :|
17:05:43  *** Progman has joined #openttd
17:08:10  <LordAro> nielsm: ha
17:08:30  <LordAro> presumably because it has to be compatible with *everything*
17:08:42  <LordAro> or just because it's ancient
17:10:03  <nielsm> anyway I should probably make a test case that tries to gzopen("file.gz", "r"); gzclose(fh); fopen("file", "r"); fclose(fp);
17:10:05  <peter1138> Definitelky just ancient.
17:10:13  <nielsm> such that the two would use the same file handle in the stdlib
17:10:19  <nielsm> then see if it triggers the bug
17:10:32  <nielsm> because I'm really not sure why else it would fail like this
17:17:30  *** synchris has joined #openttd
17:22:34  <Pikka> yo
17:27:36  *** supermop_work_ has quit IRC
17:29:14  <peter1138> Hi
17:36:52  <nielsm> what it looks like is happening is that someone/something is doing the equivalent of FILE *fh = fopen(...); close(fileno(fh)); and leaving the FILE* dangling
17:40:50  <Samu> testing copper mill
17:41:28  <Samu> maximum copper that is stockpilled is said to be 1000, but it only starts rejecting at 1001
17:41:37  <Samu> intended or bug?
17:42:37  <Samu> if (IndustryTemporarilyRefusesCargo(ind, cargo_type)) { came out false and was already at 1000
17:43:07  <Samu> this goes into newgrf code which is a complete mess for me
17:43:19  <Samu> scope resolvers, callbacks, hex numbers, mess!
17:44:09  <peter1138> You don't need to care about that.
17:45:55  <peter1138> You only care if it's rejected or not.
17:48:38  <Samu> pikka is the author?
17:49:35  <Samu> it looks wrong imo
17:49:40  <Samu> if it's 1000, it's not 1001
17:51:18  <Samu> who's at fault here? newgrf author or openttd code?
17:52:44  <Pikka> neither?
17:54:40  <Pikka> afaia the opt out of accepting cargo callback either accepts a cargo unload or doesn't. accepting part of the unload up to a limit isn't an option.
17:55:12  <Pikka> I guess if there's a "fault" it's in my description of the limit.
17:55:20  <Samu> but it's unloading 1 piece at a time
17:55:35  <Samu> didn't stop at 1000
17:56:22  <Pikka> then I guess it's off by one in the grf
17:57:10  <Samu> if (HasBit(indspec->callback_mask, CBM_IND_REFUSE_CARGO))
17:57:15  <Samu> this is hard to follow :|
17:58:04  <Samu> GetIndustryCallback(CBID_INDUSTRY_REFUSE_CARGO, 				0, indspec->grf_prop.grffile->cargo_map[cargo_type], 				ind, ind->type, ind->location.tile);
18:02:18  <Samu> returns 0
18:02:27  <Samu> when it's already at 1001
18:06:16  <peter1138> So?
18:06:20  <peter1138> That's not your problem.
18:06:35  <peter1138> You only care that it refuses or doesn't refuse.
18:06:40  <peter1138> Beyond that callback is not your concern.
18:06:45  <Samu> i want to be sure it's not openttd problem
18:07:52  <nielsm> if the GRF callback evaluation engine mis-evaluated this, it would be a grave error that would mean every NewGRF using callbacks would fail in strange ways
18:07:58  <nielsm> and they are not all failing
18:08:07  <nielsm> hence it's a problem with the specific GRF in question
18:09:29  *** Wolf01 has joined #openttd
18:11:41  *** HerzogDeXtEr has joined #openttd
18:12:19  <nielsm> hmm yeah, GunzipFile in network_content.cpp does do some suspicious things with mixing fopen and gzclose
18:19:52  <Wolf01> o/
18:20:28  <nielsm> ahh, nice, it's a 10 year old bug: https://github.com/OpenTTD/OpenTTD/commit/fdc2e851840f919f71b7cdad328511600c7fe535
18:20:48  <nielsm> well, 9 years and 15 days
18:20:57  <nielsm> uh 9 years and 350 days
18:21:46  *** supermop_work has joined #openttd
18:22:31  *** gelignite has joined #openttd
18:23:05  <LordAro> nice
18:23:41  <peter1138> gzclose already closes it, right?
18:23:43  *** supermop_work_ has joined #openttd
18:23:53  <nielsm> gzclose closes the file handle
18:23:57  <nielsm> not the FILE* object
18:24:06  <peter1138> Hmm.
18:24:20  <nielsm> this leaves a FILE* object hanging around the stdio library with an invalid OS file handle
18:24:32  <nielsm> and that's why it asserts during shutdown
18:26:57  <peter1138> Hmmm why is my widget the wrong height :s
18:27:22  <nielsm> either the fopen() on the input file needs to be replaced with _open(), or somehow the FILE* object needs to be destroyed without closing the file handle
18:29:40  <peter1138> " If you are using fileno() to get the file descriptor from a FILE *, then you will have to use dup() to avoid double-close()ing the file descriptor."
18:29:51  *** supermop_work has quit IRC
18:29:51  <nielsm> ahh
18:29:58  <peter1138> ^ in the zlib docs.
18:30:07  <peter1138> dup(fileno()) ?
18:34:24  *** Thedarkb-T60 has quit IRC
18:34:51  *** Wormnest has quit IRC
18:36:17  *** Thedarkb-T60 has joined #openttd
18:37:48  <Samu> return min(this->industry->incoming_cargo_waiting[variable - 0x40], (uint16)0xFFFF);
18:37:59  <Samu> min(1000, 65535)
18:38:03  <Samu> hmm
18:38:13  <nielsm> pointless, Samu
18:38:20  <nielsm> since incoming_cargo_waiting is uint16
18:38:47  <nielsm> 0xFFFF is its max value, the first argument to min() can never be larger than the second
18:42:58  <nielsm> grmblkdsofjsodfsbfsr5
18:43:11  <nielsm> WSL session has lost its network ability again
18:43:52  <Samu> 			if (this->ranges[i].low <= value && value <= this->ranges[i].high) {
18:44:01  <Samu> .low is 0
18:44:05  <Samu> .high is 1000
18:44:24  <peter1138> Well then.
18:44:36  <peter1138> 18:06 <@peter1138> That's not your problem.
18:44:55  *** andythenorth has joined #openttd
18:45:11  <andythenorth> o/
18:48:28  <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh91G
18:48:38  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7185: Fix fdc2e85: Double close of file handles https://git.io/fh91Z
18:48:57  *** Progman has quit IRC
18:49:46  <nielsm> I hope the code is not too fancy :P
18:49:47  *** Progman has joined #openttd
18:49:52  <Samu> hmm
18:50:00  <supermop_work_> hi andythenorth
18:50:04  <andythenorth> lo supermop_work_
18:50:10  <Samu> i think Pikka needs to change something on the grf side
18:50:16  <Samu> that makes .high to be 999
18:50:19  <Samu> not 1000
18:50:36  <Samu> which is kinda weird
18:50:45  <Samu> 999 means 1000 in this case
18:51:10  <nielsm> "the largest stockpile where you will still accept more cargo"
18:51:53  <Samu> oh, where did u find that
18:52:12  <nielsm> nowhere
18:52:13  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7185: Fix fdc2e85: Double close of file handles https://git.io/fh91B
18:52:15  <nielsm> I just typed it
18:53:56  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7185: Fix fdc2e85: Double close of file handles https://git.io/fh91u
18:54:18  * andythenorth has been busy brexit planning
18:55:03  <peter1138> andythenorth, phew, nobody else has.
18:57:04  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7185: Fix fdc2e85: Double close of file handles https://git.io/fh91V
18:58:07  <andythenorth> peter1138: I'm getting customer questions about it
18:58:13  <andythenorth> I had to assess supply chain disruptions
18:58:32  <andythenorth> so I had a look at the electricity interconnects between UK, and European mainland
18:58:41  <andythenorth> also the island of Ireland, both political parts
18:58:57  <andythenorth> also we kind of need to know if there will be food in the ships
18:59:02  <andythenorth> or shops :P
18:59:11  <andythenorth> but the typo is probably equally accurate there
18:59:30  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7185: Fix fdc2e85: Double close of file handles https://git.io/fh91Z
18:59:43  <andythenorth> the thing is, the customer is one of the organisations we're relying on to ensure there's food in the shops
18:59:47  <andythenorth> so it's a bit circular
18:59:50  <andythenorth> 'you tell us'
18:59:54  <andythenorth> 'no you'
18:59:56  <andythenorth> 'no you'
19:00:06  <andythenorth> such lolz
19:00:19  <LordAro> sounds about right
19:03:33  <andythenorth> so how many PRs are left?
19:03:41  <Samu> what does the documentation say, if there's any
19:03:45  <Samu> newgrf doc
19:04:08  <Samu> nielsm: was it documented?
19:05:57  <nielsm> I don't know
19:06:36  <peter1138> nielsm, looks better
19:06:37  <nielsm> is it this one? https://newgrf-specs.tt-wiki.net/wiki/Callbacks#Opt_out_of_accepting_cargo_.283D.29
19:06:59  <nielsm> because it documents that the callback must return 0 or 1 to indicate whether the cargo is accepted
19:07:16  <nielsm> and nothing about how it can reach that return value
19:07:29  <nielsm> except presumably do some range checks of its stockpile variables
19:08:10  *** m3henry has joined #openttd
19:08:33  <Samu> it's 0x40
19:08:35  <andythenorth> I read the logs, PBI is probably just an obiwan by pikka in nfo
19:08:37  <Samu> whatever it is
19:08:43  <andythenorth> or it's integer maths
19:08:46  *** Progman has quit IRC
19:09:07  <andythenorth> classic derailment :)
19:09:09  *** Thedarkb-T60 has quit IRC
19:09:33  <nielsm> there is no callback 0x40
19:11:09  <Samu> uhm..
19:11:47  <Samu> 61?
19:11:53  <Samu> in hex
19:11:56  <Samu> it's something else
19:12:14  <Samu> 3D
19:13:10  <nielsm> 3D is exactly the one I linked
19:13:37  <Samu> looks like it
19:13:45  <nielsm> and the minimum and maximum in action 2 switches are inclusive, exactly as defined
19:14:09  <nielsm> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2
19:15:21  <nielsm> so if the callback is defined as checking the industry variable for stockpiled cargo against range 0 to 1000, and return 1 if it is in that range, then yes it works exactly as designed
19:15:35  <nielsm> and a stockpile equal to 1000 will mean it accepts
19:16:41  <Samu> Maximum (inclusive) of the range I see
19:17:34  *** frosch123 has joined #openttd
19:17:47  <Samu> then there's nothing to do on openttd side :)
19:17:58  <Samu> it's newgrf's fault
19:18:01  <Samu> or design
19:18:18  <nielsm> yes, you have reached the conclusion that callback resolution in openttd does indeed work
19:19:05  <nielsm> imagine if the only reason it had worked for the past 10 (?) years was because everyone believed it should work, and it would have stopped working the instant you discovered it was supposed not to
19:19:37  <andythenorth> nielsm that's a bit quantum information :P
19:20:10  <andythenorth> also what am I doing?
19:20:19  <Samu> the thing only returns 1 or 0, can't even compare amounts
19:20:20  <andythenorth> diligently working on Horse issues for a Beta?
19:20:30  *** Progman has joined #openttd
19:20:32  <andythenorth> playing tanks?
19:20:46  <andythenorth> figuring out why extending newgrf sucks so much, and persuading us to fix it?
19:20:54  *** supermop_work has joined #openttd
19:22:37  *** supermop_work__ has joined #openttd
19:25:39  <nielsm> and btw Samu, thanks for noticing that this assert failure on exit happened specifically when you had downloaded content and not in other situations
19:25:49  <nielsm> it was a big help in tracing down the root cause
19:25:59  <Samu> oh, really? well no problem
19:27:19  *** Gja has quit IRC
19:28:15  <Samu> it was happening since ever I started messing with virtual studio
19:28:41  *** supermop_work_ has quit IRC
19:28:48  <Samu> visual* studio
19:29:23  <nielsm> I'm guessing lots of people have encountered it since the bug was introduced but nobody noticed the cause before
19:29:57  *** supermop_work has quit IRC
19:31:12  <Samu> andythenorth, it doesn't need savegame conversion if it's implemented like this
19:31:24  <Samu> but if you want to add an option, then yes, it needs
19:32:03  *** supermop_work has joined #openttd
19:33:18  *** supermop_work_ has joined #openttd
19:38:26  *** Progman has quit IRC
19:39:01  *** supermop_work__ has quit IRC
19:39:18  *** Progman has joined #openttd
19:40:06  *** supermop_work has quit IRC
19:50:26  <Samu> and if you want a savegame conversion, I guess that also means you want the robin-round thing
19:50:32  <Samu> :|
19:52:33  <peter1138> Samu, 19:20 < Samu> the thing only returns 1 or 0, can't even compare amounts
19:52:46  <peter1138> Samu, yeah, that's the point of callbacks. It's the NewGRF's job to do the comparing :-)
19:53:14  <peter1138> round-robin would be more deterministic, which might be better.
19:53:34  <peter1138> Might be wasteful of space, though.
19:54:09  <Samu> isn't random also deterministic
19:54:33  <Samu> pseudo-random or so
19:55:09  <Samu> i tested in a network game, it doesn't desync
19:55:36  <Samu> let me test again, I guess, things may have changed since back then
19:58:12  *** supermop_work has joined #openttd
19:58:39  <peter1138> Yes but...
19:58:49  <peter1138> Hmm, how do you the weighting?
19:59:09  <Samu> the what?
19:59:37  *** HerzogDeXtEr has quit IRC
19:59:51  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7186: Fix #7108: Missed generate_widget script run for livery changes. https://git.io/fh9Mj
19:59:51  *** supermop_work__ has joined #openttd
20:00:13  <peter1138> "it splits to all nearby stations, while still considering station rating from highest to lowest"
20:00:33  <Samu> that's not industry
20:00:35  <peter1138> Oh right, that's station rating, there's no such thing as industry rating :-)
20:01:20  <Samu> of, that's the weighting?
20:01:33  <Samu> could be based on industry proximity to station
20:01:44  <Samu> but currently it's just random
20:01:54  <peter1138> No, forget it, I was confused again.
20:04:30  <nielsm> round-robin delivery of cargo to industries would absolutely help with things like FIRS supplies
20:04:47  <peter1138> nielsm, samu's patch will help, it just does it randomly.
20:04:57  <nielsm> yeah, round-robin would be better imo
20:04:59  <peter1138> Which statistically may work fine.
20:05:20  <peter1138> RR guarantees each industry will see a bit.
20:05:41  *** supermop_work_ has quit IRC
20:05:47  <nielsm> I suppose you could do a middle path
20:06:16  *** supermop_work has quit IRC
20:06:16  <nielsm> each delivery takes one random value, which is used for the first industry to get any cargo, and the following are done RR
20:07:09  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7185: Fix fdc2e85: Double close of file handles https://git.io/fh9DI
20:07:33  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #7185: Fix fdc2e85: Double close of file handles https://git.io/fh9DL
20:07:45  <peter1138> Oh!
20:07:49  <peter1138> That's quite a good idea.
20:08:33  <peter1138> As I understand it, the first industry will take as much as it can, or is it one at a time?
20:08:57  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7186: Fix #7108: Missed generate_widget script run for livery changes. https://git.io/fh9DY
20:08:59  <Samu> the num_pieces is a low value
20:09:04  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7185: Fix fdc2e85: Double close of file handles https://git.io/fh91Z
20:09:12  <Samu> 5, 10 or 20
20:09:45  <Samu> road vehicles unload 5 at a time
20:09:48  *** Progman has quit IRC
20:09:50  <Samu> trains too
20:09:55  <Samu> ships can unload 20
20:09:59  <peter1138> Per wagon, though, no?
20:10:12  <Samu> 5 per wagon, the function is called per wagon
20:10:15  <nielsm> each unload generates one cargo packet
20:10:17  <peter1138> Ahhh
20:10:37  *** Progman has joined #openttd
20:12:06  <peter1138> So it looks until every industry rejects it. Makes sense.
20:13:07  <peter1138> And you deliver 1 piece at a time. Hmm.
20:13:19  <peter1138> I wonder how this affects performance on a map with lots of deliveries.
20:13:54  <peter1138> You are calling the NewGRF calling 5, 10 or 20 times instead of once or twice.
20:14:00  <peter1138> callback*
20:14:17  <Samu> yes
20:14:25  <DorpsGek_II> [OpenTTD/OpenTTD] michicc commented on pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh9DW
20:14:37  <andythenorth> I am broken
20:14:45  <peter1138> In which case it may be better to distribute min_pieces every time, and do full round-robin to ensure distribution.
20:14:48  <andythenorth> I went climbing, everything hurts now
20:14:48  <andythenorth> also I had a kebab
20:15:19  <DorpsGek_II> [OpenTTD/OpenTTD] michicc merged pull request #7186: Fix #7108: Missed generate_widget script run for livery changes. https://git.io/fh9Mj
20:16:05  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh9D4
20:16:36  <peter1138> I had dinner, and then went out on a bike. But the bike is too small, so I came back before I killed my knees.
20:16:40  <peter1138> My MTB is dead :(
20:18:33  <LordAro> D:
20:19:46  <peter1138> Who can create newgrf-specs wiki accounts?
20:20:03  <peter1138> LordAro, I'm gutted.
20:20:13  <LordAro> what happened to it?
20:20:15  <peter1138> LordAro, it was in my garden
20:20:18  <peter1138> and it fell over
20:20:21  <peter1138> and it cracked the frame
20:20:27  <orudge> peter1138: They're just tt-forums.net accounts
20:20:31  <LordAro> ...impressive
20:20:32  <peter1138> orudge!
20:20:37  <orudge> peter1138!
20:20:40  <peter1138> LordAro, think it must have bounced off a corner.
20:20:47  <peter1138> " Auto-creation of a local account failed: Automatic account creation is not allowed. "
20:20:54  <peter1138> orudge, I get that
20:21:20  <andythenorth> I got that for a while
20:21:22  <andythenorth> then I didn't
20:22:05  <peter1138> I even changed my tt-forums password in case is was something like it being ancient.
20:22:12  <peter1138> And lol, that password was bad.
20:22:14  <andythenorth> yeah I did all this
20:22:17  <peter1138> And then I discovered by dropbox isn't syncing.
20:22:21  <orudge> peter1138: interesting
20:22:28  <andythenorth> then one day it started working again
20:22:29  <peter1138> So I had to a password reset anyway.
20:22:30  <orudge> It could be that it has been broken for years and nobody's complained
20:22:33  <andythenorth> on my original account and password
20:22:38  <andythenorth> I complained a lot :)
20:22:55  <peter1138> Well, I need to update the wiki else someone will complain at me :D
20:22:57  <nielsm> I think I don't have a working login for newgrf-wiki either
20:23:01  <andythenorth> https://www.tt-forums.net/viewtopic.php?f=68&t=74378
20:23:11  <andythenorth> post your wiki updates in a thread on tt-f
20:23:20  <andythenorth> and the community will update the wiki for you
20:23:48  <nielsm> [citation needed]
20:23:59  <nielsm> [quote]this good enough?[/quote]
20:24:02  <peter1138> garryg seems an interesting fellow
20:24:17  <andythenorth> he is
20:24:24  <peter1138> Can't seem to decide if his industry newgrf should be 32 or 64 cargos :p
20:24:25  <orudge> peter1138: Were you at one point "petern" on the wiki?
20:24:30  <andythenorth> he has a brain injury of some kind, but he makes loads of nice grfs
20:24:33  <peter1138> orudge, erm, possible.
20:24:49  <peter1138> andythenorth, yeah, I figured. He's not unpleasant at all.
20:24:53  <orudge> There's a petern user there, I wonder if we changed your username on the forums and it hasn't changed here, or similar
20:25:31  <peter1138> " The supplied credentials could not be authenticated. "
20:25:34  <peter1138> Ah
20:25:37  <peter1138> Think you've got it.
20:25:42  <peter1138> Stupid me, changing my name.
20:25:51  <orudge> I'll get the wiki account renamed
20:26:23  <peter1138> Thanks <3
20:27:17  <Samu> testing for a desync while having dinner, afk
20:27:31  <peter1138> I don't think it'll desync.
20:28:10  <orudge> "The user "Petern" does not exist." while trying to rename, helpful
20:28:17  <peter1138> o_O
20:39:52  <planetmaker> hi
20:43:37  *** supermop_work has joined #openttd
20:47:41  *** glx has joined #openttd
20:47:41  *** ChanServ sets mode: +v glx
20:49:39  <orudge> peter1138: can you try to log in to the grfspecs wiki now?
20:50:57  *** supermop_work__ has quit IRC
20:51:53  <nielsm> orudge, I can't log in either :) username on forums jfs, might have been G4S once upon a time
20:52:45  <orudge> nielsm: what error do you get? Is it the "auto-creation" error?
20:53:11  <nielsm> yes
20:53:12  <nielsm> Auto-creation of a local account failed: Automatic account creation is not allowed.
20:53:26  <planetmaker> hm... I got previously an SSL_ERROR_NO_CYPHER_OVERLAP on tt-f. But that's gone now
20:56:17  <orudge> nielsm: can you try again now?
20:56:42  <nielsm> nope still not
20:57:30  <nielsm> and just logged out and back in on forums to confirm password :P
21:01:21  <orudge> nielsm: could you try one more time?
21:02:53  <nielsm> still not :(
21:04:39  *** octernion has joined #openttd
21:05:25  *** gelignite has quit IRC
21:09:41  *** octernio_ has quit IRC
21:15:34  *** Thedarkb-T60 has joined #openttd
21:20:54  <peter1138> orudge, works, thanks :-)
21:22:12  <peter1138> Hmm, the wiki wants ottd svn revision :p
21:23:58  <orudge> nielsm: can you try now, perhaps in a different browser/fresh browsing session?
21:24:03  <orudge> I was just able to log in with a brand new user
21:24:40  <nielsm> yep worked now
21:24:43  <nielsm> ty
21:24:52  <orudge> No problem, thanks for letting me know
21:25:17  <peter1138> Sorry to have mess you around.
21:25:24  <orudge> No, sorry it was broken!
21:27:16  <andythenorth> :)
21:28:14  <peter1138> "  Initial planning for the Transport Tycoon Forums Meet 2017, which is taking place in Birmingham, UK "
21:28:17  <peter1138> Hmm
21:28:21  <peter1138> Did it?
21:28:24  <orudge> It did!
21:28:32  <orudge> And some people even turned up
21:28:33  <orudge> We had cake
21:28:46  <peter1138> And I wasn't around at that point.
21:29:03  <peter1138> Also I'm about twice the age of everyone else :p
21:29:14  <peter1138> Well, not any more, heh.
21:29:30  <orudge> Some of our younger users are probably half my age now, at any rate
21:30:36  * andythenorth wonders about cleaning up some forum stickies :)
21:30:55  <andythenorth> this one is quite dead :) https://www.tt-forums.net/viewtopic.php?f=33&t=21678
21:31:36  <andythenorth> this one should really just delegate to github :) https://www.tt-forums.net/viewtopic.php?f=33&t=7933
21:32:07  <peter1138> Is it stickied?
21:33:06  <andythenorth> yes
21:33:12  <andythenorth> this one could do with going to github too https://www.tt-forums.net/viewtopic.php?f=31&t=7253
21:33:13  <peter1138> OS X fonts?
21:33:37  <andythenorth> I have some
21:33:38  <peter1138> Strange, I don't see stickied posts then.
21:34:07  <andythenorth> :o
21:35:40  <peter1138> Ah, cos my settings don't show older posts by default.
21:35:51  <peter1138> And stickied posts apparently still count as threads. Nice.
21:40:45  *** frosch123 has quit IRC
21:40:51  *** synchris has quit IRC
21:47:56  *** supermop_work has quit IRC
21:56:14  <planetmaker> adjusted as of your reply @ andy
22:02:59  <andythenorth> thanks :)
22:03:48  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7184: Change: Distribute cargo to multiple stations or industries https://git.io/fh9lr
22:08:17  *** nielsm has quit IRC
22:09:06  *** sla_ro|master has quit IRC
22:12:54  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7187: Change: Add scrollbar to cargo legend in cargo payment rates window. https://git.io/fh99m
22:16:55  *** Progman has quit IRC
22:20:53  *** Flygon has joined #openttd
22:33:00  *** andythenorth has quit IRC
22:36:38  <glx> hey #7186 was squirrel_export, not generate_widgets
22:36:52  <peter1138> :/
22:37:36  <glx> but I guess you ran both anyway
22:37:47  <peter1138> Yes
22:37:52  <LordAro> lol
22:38:06  <LordAro> really need to add both of those to the commit hooks somehow
22:38:30  <peter1138> It proves I should continue my build changes to always build them.
22:38:49  <glx> yes better to integrate in the flow
22:39:02  <peter1138> I have most of it working, anyway.
22:39:14  <peter1138> At least for Makefile, I don't remember if I got anywhere with MSVC :-)
22:41:59  *** octernion has quit IRC
22:43:46  *** Wolf01 has quit IRC
22:46:47  *** keoz has quit IRC
22:50:10  *** Thedarkb1-T60 has joined #openttd
22:51:47  <Samu> peter1138: there's still problems with multiple AIs in multiplayer :(
22:52:07  <glx> hehe indeed you ran generate_widgets in #7108 :)
22:52:36  <Samu> https://imgur.com/Kv4lzLH
22:52:47  <Samu> i clicked reload AI in one of the AIs
22:52:53  <Samu> got that error on the left
22:52:57  <glx> but it would be better to just run both script in one command
22:53:19  <Samu> the other on the right which was connected to the server, timed out after 20 seconds, and i guess it crashes when heading to main meny
22:53:25  <peter1138> ^ I dunno, that might be fixed by the last commit?
22:54:04  <peter1138> Or it's just somethign that's always happened.
22:54:12  <peter1138> And I should just ignore you.
22:55:09  *** Thedarkb-T60 has quit IRC
22:57:14  <Samu> oosp
22:57:28  <Samu> https://imgur.com/yFlk0Xn the error on the client wasn't in that last image
22:57:44  <peter1138> Why are you telling me?
22:58:28  <glx> but you should do the testing in clean master
22:59:49  <Samu> the one with 1 day per company?
22:59:56  <Samu> 1 company per day
23:00:18  <peter1138> No, clean master.
23:01:13  <Samu> ok
23:02:11  *** octernion has joined #openttd
23:03:32  *** octernion has quit IRC
23:03:42  <Samu> shouldn't do any different
23:03:46  <Samu> but let's see
23:03:55  <peter1138> Probably but that's not the point.
23:04:12  <peter1138> Then I suggest posting an issue to github.
23:04:16  <peter1138> Following the template.
23:04:28  <peter1138> Then maybe someone else can replicate it.
23:04:31  <Samu> steps to reproduce
23:04:33  <peter1138> But I'm going to bed.
23:04:47  <Samu> needs a server and a client
23:04:53  <Samu> gonna be tough
23:05:04  <glx> always check if issue happens in master before reporting :)
23:05:11  <glx> that's rule number 1
23:05:54  <peter1138> Just document your steps.
23:06:00  <peter1138> Bye!
23:06:05  <Samu> tc
23:09:31  <Samu> got it!
23:11:11  <Samu> it doesn't always happen
23:11:17  <Samu> :|
23:11:27  <Samu> only sometimes
23:12:16  <Samu> i get two crash reports, do I send them in?
23:12:37  <glx> txt may help, dmp is useless
23:13:17  <glx> because dmp requires your exe and pdb as you built yourself
23:13:55  <LordAro> glx: should it not be the same as one that you built on your system?
23:14:01  <LordAro> (assuming clean master, etc etc)
23:14:21  <glx> no msvc can do things differently on each build
23:14:36  <LordAro> that's rather irritating
23:14:40  <glx> indeed
23:15:02  <glx> but pdb always match the generated exe :)
23:22:34  *** m3henry has quit IRC
23:28:47  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened issue #7188: Both server and client crash, AI related https://git.io/fh9Ha
23:35:53  <Samu> oops, the crash logs are equal :(
23:37:55  <Samu> fixed
23:47:55  *** Gustavo6056 has joined #openttd
23:52:02  *** Gustavo6046 has quit IRC
23:52:02  *** Gustavo6056 is now known as Gustavo6046

Powered by YARRSTE version: svn-trunk