IRC logs for #openttd on OFTC at 2025-03-11
β΄ go to previous day
00:21:08 *** WormnestAndroid has quit IRC (Remote host closed the connection)
00:21:17 *** WormnestAndroid has joined #openttd
00:33:24 *** WormnestAndroid has quit IRC (Remote host closed the connection)
00:33:38 *** WormnestAndroid has joined #openttd
01:12:49 *** Tirili has quit IRC (Remote host closed the connection)
01:32:24 *** Tirili has quit IRC (Quit: Leaving)
01:50:03 <squirejames> xarick: Is that the Iraqi information minister?
02:09:01 *** Wormnest has quit IRC (Quit: Leaving)
02:40:50 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:40:52 *** WormnestAndroid has joined #openttd
02:40:54 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:40:55 *** WormnestAndroid has joined #openttd
02:40:58 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:41:10 *** WormnestAndroid has joined #openttd
03:15:06 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
03:59:42 *** Tirili has quit IRC (Quit: Leaving)
04:44:46 <DorpsGek> - Update: Translations from eints (by translators)
05:05:05 *** WormnestAndroid has quit IRC (Remote host closed the connection)
05:05:07 *** WormnestAndroid has joined #openttd
06:14:25 *** Flygon has quit IRC (Remote host closed the connection)
06:15:05 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:09:13 <peter1138> Guarded from Steam.
07:14:37 <truebrain> The error also reads really weird .. owh well, will look into it tonight
07:25:13 <truebrain> Hmm, maybe clock skew or something? I dunno, it is werid
07:51:50 *** akimoto has quit IRC (Ping timeout: 480 seconds)
08:06:12 <peter1138> Was going to work on stuff.
08:32:53 <peter1138> Hmm, my badge used test is a bit wrong :s
08:33:34 <peter1138> It marks a badge as used, even if the thing using it is not going to become availabl.
08:33:50 <peter1138> Well, minor for now.
08:39:00 *** nielsm has quit IRC (Ping timeout: 480 seconds)
08:42:29 <peter1138> The silly "B" button is just a placeholder for now.
08:43:55 <peter1138> Why yes, yes I am dynamically adding and removing widgets from a live window.
08:51:28 *** thought2 has joined #openttd
08:51:28 <thought2> my discord proceeded to bug out after replaying the video lol
08:52:39 <thought2> i wonder how that would be like on actual openttd lol
09:13:27 <peter1138> Hmm, so I guess that's how you can filter vehicles, but...
09:29:32 <andythenorth> New Purchase menu format? π
09:31:34 <pickpacket> I've found a regression in the code
09:32:38 <pickpacket> I see that companies now get a default name based on the player name, but a rename event to an old-style generated name is sent when the company builds its first station
09:32:54 <pickpacket> how does it work when a player already has a company?
09:38:15 <peter1138[d]> How does a player build a station without a company?
09:39:22 <pickpacket> peter1138[d]: the company is called Unnamed until the first station is built
09:41:10 <pickpacket> In yesterday's nightly build, in multiplayer, when I joined a game as a player named BW and created a new company it was called BW Transport. When I built my first station in a town called Punham a rename event was sent that said my new company name was Punham Transport. The company window still said BW Transport
09:41:55 <pickpacket> it must be that static void GenerateCompanyName(Company *c) is called without actually renaming the company
09:42:25 <pickpacket> I'm having a look at it
09:46:05 <peter1138> pickpacket, I think it's the gotos.
09:46:37 <pickpacket> It makes sense sending a rename event there *if* the company gets a new name, but does the company actually get a new name here?
09:46:43 <peter1138> Line 434 jumps to set_name, which updates c->name_1 from str.
09:46:53 <peter1138> But name = GetString(str, strp) is not called for that path.
09:47:57 <peter1138> Adding name = GetString(str, strp) before line 434 should fix it, but that's a pretty ugly function.
09:48:16 <peter1138> It's not really a regression though, it's your patch that's buggy ;-)
09:48:40 <pickpacket> it's interesting that 434 jumps to set_name and ignores verifying the new name
09:48:48 <pickpacket> pfft. Impossible ;)
09:49:56 <peter1138> It's autogenerated and doesn't rely on user input, so it's valid by default.
09:50:12 <peter1138> If it wasn't valid, then it would try again... and use the same name.
09:52:01 <pickpacket> it wouldn't be valid if two companies have the same president name
09:57:59 <peter1138> GeneratePresidentName()/CmdRenamePresident() prevents that.
10:07:15 <pickpacket> I guess the correct rename event would be generated if I used new ScriptEventCompanyRenamed(c->index, GetString(str, strp)) instead of the sometimes-incorrect "name" variable
10:07:34 <_glx_> Hmm but if company already has a name the function should return immediately
10:09:03 <pickpacket> why do we keep the name as two separate variables? c->name_1 and c->name_2
10:09:31 <pickpacket> is there anywhere in the code where we *don't* use the combined value?
10:11:01 <_glx_> Indeed the `set_name:;` should be moved to line 410
10:11:27 <pickpacket> I don't understand what lines 400 to 402 do
10:11:42 <pickpacket> _glx_: not really; we're not done with the verification yet
10:12:07 <pickpacket> the last condition is tested on line 411
10:15:46 <_glx_> Yeah but `name` should be correct when jumping to `set_name`
10:16:25 <pickpacket> it won't always be, as it now stands
10:18:08 <pickpacket> "name" is generated, but may fail validation. Then it hops down to bad_town_name, which generates new values for str and strp. Then jumps to set_name, which assigns them to c->name_1 and c->name_2 respectively
10:18:40 <pickpacket> but when I send the rename event I make the assumption that the string "name" is the new company name, which it won't always be in this case
10:18:56 <peter1138> _glx_, that could result in the computed name being longer than the maximum length, so it would get in an infinite loop.
10:20:47 <pickpacket> but... why do we keep the company name as two separate parts?
10:21:34 <peter1138> Because the autogenerated string is kept as parameters instead of a raw string.
10:21:56 <pickpacket> yes, but why? I can see *that* it does, but not *why*
10:22:48 <peter1138> Because that's how string formatting works.
10:24:03 <peter1138> Rename the town and your company name will change with it.
10:25:08 <pickpacket> Oh! That makes sense
10:29:04 <pickpacket> so there's name_1 and name_2, which makes sense if a town name is part of the company name, but then we have name. Can we end up in a situation where all three are assigned at the same time?
10:29:48 <pickpacket> would it make sense to only use name_1 and name_2, but leave name_2 as an empty string when the name isn't based on a town name?
10:30:00 <pickpacket> I'm way out on a tangent here...
10:32:49 <xarick> current train progress: 2000+
10:35:37 <pickpacket> it probably wouldn' t makse sense
10:35:48 <pickpacket> I can imagine it would cause issues when a town is renamed
10:37:49 <pickpacket> it's ugly, but I wonder if the best solution here is to insert a copy of line 410 at line 416
10:39:26 <peter1138> If name is set, then name_1 and name_2 are both unused, until you clear your manual name and it goes back to the default name.
10:40:08 <pickpacket> oh! I didn't consider that case. Never heard of anyone reverting to default name
10:41:27 <peter1138> Put a copy of line 410 in at line 434, then it will use the right name, and avoid formatting the name twice.
10:43:54 <peter1138> (Or refactor the whole thing to get rid of nasty gotos ;-))
10:44:02 <peter1138> Seems to be tea time.
10:45:54 <pickpacket> peter1138: One thing at a time :D I'll put that on my todo list
10:46:55 <peter1138> Nope, tea can't wait.
10:57:00 <xarick> windows defender is complaining about HackTool:Win32/Winring0
11:00:02 <LordAro> seems like false positive
11:01:45 <ahyangyi> Lots of people getting this in the past few hours it seems
11:02:35 <peter1138> In fact, tea waited, and I now have a nice strong mug of it.
11:03:15 <jfkuayue> I need a only-linux device, but it is hard to find where they sell it.
11:03:50 <pickpacket> peter1138: well you're definitely right about that
11:04:11 <pickpacket> peter1138: I made myself a pot
11:04:19 <pickpacket> and lunch is now cooking
11:06:22 <ahyangyi> jfkuayue: I think both Lenovo and Dell sell Linux laptops?
11:09:32 <_glx_> The weird thing is most pc manufacturers ask for extra money to not include windows
11:11:43 <xarick> well... RIP FanControl
11:12:04 <xarick> ~time for my system to overheat
11:14:17 <xarick> a 2 year old battle between signing drivers
11:14:36 <LordAro> ignoring all other information
11:14:36 <_glx_> I just let the motherboard do its job
11:16:54 <xarick> beautiful program... now going to the trash bin
11:17:27 <peter1138> Commit titles worded like that are so confusing.
11:17:52 <peter1138> It sends a correct renaming event? We better fix that!
11:19:24 <peter1138> LordAro, and it continues.
11:24:00 <pickpacket> peter1138: I really suck at commit/branch names
11:24:48 <pickpacket> but yes, if we can't find any bugs we must of course create some
11:28:54 <pickpacket> _glx_: how do computer reproduce since there are no fatherboards?
11:35:42 *** michi_cc_ has quit IRC (Ping timeout: 480 seconds)
11:36:43 *** michi_cc_ has joined #openttd
11:47:33 <LordAro> peter1138: it'd be hilarious if it turned out he's actually just /ignored everyone
11:59:49 <andythenorth> how will our infra perform now?
12:00:01 <andythenorth> if I delete Fan Control from my MBP
12:11:06 *** WormnestAndroid has quit IRC (Remote host closed the connection)
12:11:23 *** WormnestAndroid has joined #openttd
12:32:35 <_rei4122> xarick: Thanks for the savedata. I made some adjustments in v94 AAAHogEx. I also uploaded it to Bananas
13:18:56 <frosch123> I knew about forum grave diggers. I did not know about email grave diggers. (Someone replied to a mass-CC mail from 2012 with "do you remember when we all got mailed this spam?")
13:19:37 <LordAro> frosch123: i think you're legally allowed to go round their house with a crowbar now
13:33:55 <xarick> _rei4122: a much more convincing start this time
13:34:40 *** tzh has quit IRC (Quit: Page closed)
13:48:27 <xarick> meanwhile, I'm trying to make my AI not so stupid with trains
13:49:05 <xarick> trying the single rail pathfinder approach
15:19:29 <pickpacket> *something* has changed that breaks the game for me on the latest version. If I compile 14.1 everything works, but as I showed the other day the game crashes when I use any vehicle newgrfs on newer versions. I don't know how far back but 14.1 works and 15.0-beta1 does not π
15:21:42 <LordAro> pickpacket: bisect :)
15:21:48 <LordAro> (and also, a bug report)
15:22:37 <peter1138> I'm glad 15.0beta1 does not work.
15:22:54 <peter1138> Becuase we've done loads of refactoring since then...
15:23:04 <peter1138> Not that there's none before then, but.
15:23:23 <LordAro> we really should do beta2
15:23:54 <peter1138> It was waiting on my to finish refactoring, sorry.
15:23:57 <pickpacket> peter1138: latest doesn't work either π«€
15:24:28 <pickpacket> LordAro: is there a point to a bug report if nobody can replicate it? π€·
15:24:58 <peter1138> bisect to find what first broke i.t
15:25:34 <pickpacket> peter1138: never done a bisect before. How do I do that?
15:55:29 <pickpacket> LordAro: uhm... I guess I'd have to compile versions it chooses to see if they work...
15:56:47 <peter1138> Yes, that's how you find out what version it broke, if you can't take a wild stab and guess.
15:57:28 <pickpacket> a compile takes 150 minutes...
15:58:00 <LordAro> that is somewhat problematic
15:58:44 <LordAro> I'd say it doesn't need to be a full recompile, but you'll probably be doing most of it anyway
15:59:19 <_glx_> yeah git-bisect is a great tool
16:02:02 <_glx_> the available trains window definitely looks wrong in the screenshot
16:02:30 <pickpacket> LordAro: there's a reason I'm fairly good at white box code analysis ;)
16:03:15 <_glx_> less visible in the bug report π
16:03:40 <_glx_> but the one you posted here clearly shows a problem
16:06:04 <_glx_> same crash reason in beta1 ?
16:06:19 <pickpacket> _glx_: yeah I wanted to see if anything was written in console or script debug
16:06:23 <peter1138> Yes, the stack trace there is just a symptom to the issue, not the issue itself.
16:06:33 <pickpacket> Something triggers this
16:07:03 <peter1138> Again, that's not the cause of the problem, just a symptom.
16:07:20 <pickpacket> I know :/ But it's as far as I've come for now
16:07:36 <peter1138> It's further than the bug.
16:07:55 <peter1138> Whatever is broken has already happened by this point.
16:07:57 <_glx_> yeah the invalid "index" might be from something totally unrelated
16:09:18 <_glx_> happening way before you actually try to draw the string
16:10:34 <pickpacket> alright, this is going to take time but I'm gonna bisect it
16:12:51 <peter1138> Step one, does compiling the old version work...
16:15:16 <pickpacket> peter1138: yes. Tried that earlier today
16:15:44 <peter1138> Step two, does compiling something from a few months ago work?
16:16:36 *** Wormnest has joined #openttd
16:16:42 <_glx_> hmm maybe I could try a win32 build, if I can reproduce with that I should be able to quickly bisect π
16:16:50 <LordAro> peter1138: in other words, bisect :p
16:21:43 <xarick> it's working mildly well
16:22:22 <peter1138> LordAro, funny that.
16:22:47 <peter1138> _glx_, pickpacket using gcc on Linux though.
16:23:11 <_glx_> but if it's related to 32 bit it might show on windows too
16:24:50 <_glx_> we should check some strings π
16:33:38 *** kuka_lie has joined #openttd
16:34:10 <_glx_> but it doesn't crash in 15.0beta1
16:34:41 <_glx_> still there's something wrong
16:39:44 <_glx_> 14.1 seems correct indeed
16:43:52 <peter1138> 15.0-beta1 is bad apparently.
16:45:07 <peter1138> The reason I say it's good that 15.0-beta1 is bad is because that's before a shed load of refactoring (PoolID, EnumBitSet, global string parameters, etc...), which means it (probably) isn't that.
16:48:43 <_glx_> yeah it's good because it means it's not caused by all the recent changes
16:51:34 <peter1138> (ZeroedMemoryAllocator removal too)
16:54:52 <_glx_> 3 first steps on the estimated 9 were good
16:56:29 <Rubidium_> so it's likely relatively close to 15.0-beta1
16:57:05 <_glx_> yeah it's closer to 15.0-beta1 than release/14
16:59:21 <LordAro> shows it's actually working :p
16:59:29 <LordAro> i get suspicious when i get too many good/bad in a row
17:00:18 <_glx_> it helps a lot to be able to build in less than 2 minutes
17:00:42 <LordAro> a bit better than 150, yes
17:06:56 <_glx_> f56b6756f1d0df1beb652c54749276838406e2c7 is the first bad commit
17:09:00 <peter1138> Something to do with this? `static inline uint64_t Key(uint32_t grfid, uint16_t internal_id) { return static_cast<uint64_t>(grfid) << 32 | internal_id; }`
17:09:37 <LordAro> no particular reason why it should be...
17:10:07 <LordAro> might be some other narrowing going on though
17:10:18 <_glx_> inline size_t operator()(const EngineIDMapping &eid) const { return eid.Key(); }
17:10:39 <_glx_> Key() is 64bit, size_t is not
17:10:54 <Rubidium_> hmm... why doesn't MSVC whine about that?
17:11:23 <peter1138> Not sure why this would make the window itself broken though.
17:13:52 <_glx_> let's test the simple fix
17:15:34 <_glx_> checking with master too, just in case
17:16:13 <_glx_> but yeah MSVC usually likes to warn about that
17:17:01 <peter1138> Poor 32-bit systems, being forced to deal with 64-bit integers all over the place.
17:19:49 <_glx_> the annoying part is MSVC warns when we do this intentionnaly but when it's an actual error it stays silent
17:20:33 <peter1138> Cool though, 3 months of no 32-bit users...
17:26:57 <_glx_> my guess is somehow ``` auto it = std::ranges::lower_bound(map, key, std::less{}, EngineIDMappingKeyProjection{});
17:26:57 <_glx_> if (it == std::end(map) || it->Key() != key) return EngineID::Invalid();``` is not returning `EngineID::Invalid()` when it was expected to
17:28:59 <_glx_> but even if the key was found, it was pure luck to be a valid one
17:31:23 <_glx_> or it was in `EngineOverrideManager::SetID`
17:31:23 *** HerzogDeXtEr has joined #openttd
17:34:26 <peter1138> If they weren't using NewGRF vehicles then there'd be no conflicts in IDs.
17:35:22 <_glx_> also tea tea deluxe doesn't seem to remove original engines
17:36:31 <peter1138> _glx_, with the key being truncated to 32 bits, it will just find matching things when it shouldn't.
17:36:47 <peter1138> It will return EngineID::Invalid() if it doesn't match.
17:37:14 <peter1138> Yeah, that's rare, but intended. Tea Tea Dexlue is a small addon to vanilla, not a huge replacement set.
17:38:08 <_glx_> but it->Key() != key should catch things
17:38:35 <peter1138> Catch what, exactly?
17:39:27 <xarick> std::less{} ? isn't std::less sufficient?
17:39:29 <peter1138> A key truncated to 32-bits matches a the default engines, which have GRFID == 0.
17:40:00 <_glx_> oh then it overwrites in lower_bound and it is valid
17:40:24 <peter1138> Now, I don't know why the window layout was broken as well.
17:40:50 <_glx_> it was not broken for me
17:40:56 <peter1138> Unless that's an artifact of resizing things and crashing while sizing up a string.
17:41:19 <_glx_> possible prtial redraw yes
17:41:32 <peter1138> pickpacket, were you resizing the window when it crashed?
17:41:44 <peter1138> That might make sense, it hasn't drawn the scrollbar or the bottom panel yet.
17:42:02 <peter1138> It will have revealed an engine with an invalid string.
17:43:18 <pickpacket> peter1138: it crashed when either scrolling or resizing
17:43:50 <peter1138> I'm asking in the specific case of that screenshot with the broken window layout.
17:45:39 <xarick> player can found city towns?
17:45:48 <xarick> is that a bug or new feature?
17:47:13 <pickpacket> xarick: that's a very old setting
17:48:24 <pickpacket> _glx_: it crashes in the road vehicle list with eGRVTS too
17:48:28 <xarick> you sure? I don't remember being able to give city status on new towns
17:55:20 <peter1138> It's there in 14.1.
18:04:38 <truebrain> okay, I can login just fine to Steam with that account .. so not sure why the nightly failed
18:04:42 <truebrain> let's see what it does tonight I guess
18:09:01 <pickpacket> peter1138, _glx_: thank you both *so* much for solving that so quickly β€οΈ
18:13:02 <_glx_> oh you could have found it with bisect, but 150 minute per build is not very nice to do it π
18:16:04 <_glx_> (took 10 builds to find the failing commit)
18:25:13 <xarick> my AI is impressing me, never thought it had this much potential with trains
18:26:13 <xarick> but the bad news is that it requires 250k max ops, it's just so innefficient
18:29:59 <pickpacket> _glx_: it would've taken me days, yeah π
18:31:33 <pickpacket> xarick: I've never tried enabling the setting that let's players found towns. Haven't heard anything about it being changed though
18:32:32 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
18:33:14 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
18:36:26 *** WormnestAndroid has joined #openttd
18:41:23 <xarick> _zephyris: wow, the new dock!
18:53:26 <peter1138> Hmm, can we afford to scale sprites at render time, like the old days?
19:02:44 <Rubidium_> at 640x480 probably
19:04:45 <peter1138> Someoneβ’ needs to crack on with the hardware renderer :S
19:04:57 <jfkuayue> I beat procrastination
19:05:08 <peter1138> Rebase my old OpenGL patch? :D
19:05:18 <jfkuayue> and learned html tables
19:12:47 <peter1138> Where can I put a "configure badges" option?
19:41:18 <andythenorth> Badge top level nav item? π
19:52:02 <peter1138> Does IH have badges yet?
19:55:02 <peter1138> Flexible container would be nice.
19:56:09 <peter1138> Would be nice if the filters collapsed onto a single row if wide enough.
19:56:20 <peter1138> But not something I'm going to fiddle with now.
20:08:20 <peter1138> This is not quite right :-)
20:14:57 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
20:18:33 *** Wormnest has joined #openttd
20:19:17 *** WormnestAndroid has joined #openttd
20:35:31 <frosch123> Does it need all those separate dropdowns? For example the content window has a single text filter, which matches not only the name but also tags
20:44:17 <_glx_> it doesn't match tags anymore π
20:51:01 <peter1138> The text filter does already match names, yes.
21:01:38 *** ChanServ sets mode: +v tokai
21:01:58 <frosch123> _glx_: Not the old tags, but the new auto tags. No idea what to call them instead
21:05:25 <xarick> in squirrel, can I have 2 constructors for a class?
21:08:37 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
21:40:36 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:41:41 <peter1138> Hmm, well, my "allow any widget type to have an index" patch is not going well :(
21:42:04 <peter1138> Seems to break the picker window, which suggests that something might be working only by accident.
21:42:51 <pickpacket> peter1138: "a happy little accident" as Bob Ross would say
22:06:40 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:09:04 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:33:06 *** knolle has quit IRC (Quit: bye)
22:35:01 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:49:17 <andythenorth> peter1138: no I'm just refactoring the entire compile for [I forget]
23:17:58 *** kuka_lie has quit IRC (Quit: Lost terminal)
23:44:36 <peter1138> Anyway, the idea was to allow picking a badge by image/text from a list, instead of having to know what the badge is called.
23:46:07 *** WormnestAndroid has quit IRC (Remote host closed the connection)
23:46:19 *** WormnestAndroid has joined #openttd
continue to next day β΅