00:08 <+ddnet-discord> @HMH now here 03:47 < ddnet-commits> [ddnet] Jupeyy opened pull request #917: Add DPI awareness support for MSVC compiling for Win8.1 and Win10 (master...master) https://git.io/vdNzN 20:37 <@heinrich5991> Learath2: https://github.com/ddnet/ddnet/pull/910#issuecomment-338499164 21:32 <+ddnet-discord> damn infinite scroll on appveyor :/ 21:32 <+ddnet-discord> @heinrich5991 canmerge 21:38 <+ddnet-discord> except one asyncio test not passing on windows 64bit build??? 21:44 < ddnet-commits> [ddnet] heinrich5991 closed pull request #910: Run the server on CI (master...dd_pr_sanity) https://git.io/vd54D 21:44 <+ddnet-discord> @heinrich5991 not using bors anymore? 21:44 <@heinrich5991> didn't want to push this non-squashed :D 21:45 <@heinrich5991> 6 commits for a 8 line change 21:45 <+ddnet-discord> hmm need our own bors that just checks if it compiles after a merge and has the ability to squash 21:45 <@heinrich5991> gonna ask in the forums if squashing would be possible 21:46 <+ddnet-discord> did you figure out what was going on that time it timed out and why it needs staging.tmp? 21:46 <+ddnet-discord> the timeout is simple 21:46 <+ddnet-discord> mac travis took too long 21:46 <+ddnet-discord> we could just increase the timeout 21:46 <+ddnet-discord> oh it actually did timeout 😄 21:46 <+ddnet-discord> https://forum.bors.tech/t/what-is-the-staging-tmp-branch-used-for/65/2 21:48 <+ddnet-discord> makes sense 21:48 <+ddnet-discord> sounded like that if we host our own bors, we could code that feature without `staging.tmp` 21:50 <+ddnet-discord> https://forum.bors.tech/t/would-squashing-be-possible/69 21:50 <+ddnet-discord> @Learath2 do you have concerns about using bors? 21:51 <+ddnet-discord> It kinda spams my github activity and this channel 21:53 <+ddnet-discord> but I'm all for having master always passing CI 21:54 <+ddnet-discord> if it's about this channel being spammed you can move github logs to its own channel 21:55 <+ddnet-discord> It's kinda nice getting the one notification for the merge tho 😃 21:58 <+ddnet-discord> i don't see sense to make a channel for github logs 21:59 <+ddnet-discord> No one will check 22:00 <+ddnet-discord> why not? 😄 22:01 <+ddnet-discord> you have log stream on github directly, and i bet most people just stay on one channel 22:01 <+ddnet-discord> boris spammed, but without him it was k 22:13 <+ddnet-discord> this ghost diff is so huge... 22:13 <+ddnet-discord> my teehistorian diff wasn't small either, sorry for that btw ^^ 22:13 <+ddnet-discord> well yours was quite readable as I kinda knew what it was trying 22:14 <+ddnet-discord> if(IsDDRace(&ServerInfo)) StartTick--; // the client recognizes the start one tick earlier than ddrace servers 22:14 <+ddnet-discord> `if(IsDDRace(&ServerInfo)) StartTick--; // the client recognizes the start one tick earlier than ddrace servers` 22:14 <+ddnet-discord> this one has magic like that 22:14 <+ddnet-discord> :/ 22:14 <+ddnet-discord> still using `IsDDRace` 22:15 <+ddnet-discord> if only redix was around to kinda give me a walkthrough 22:16 <+ddnet-discord> maybe you could ask him to get on the discord server (or IRC) 22:16 <+ddnet-discord> would also be a good idea for the blocker thing 22:17 <+ddnet-discord> he is here 22:17 <+ddnet-discord> oh, indeed 22:17 <+ddnet-discord> @redix o/ 22:19 <+ddnet-discord> @Learath2 did you see my comment on your use-after-free thing? 22:19 <+ddnet-discord> I'm thinking of using `shared_ptr` on that 22:20 <+ddnet-discord> If you want I can also introduce a lock instead of that 22:20 <+ddnet-discord> idc, `shared_ptr` isn't bad I'd think 22:21 <+ddnet-discord> as soon as I figure out how to use them 22:21 <+ddnet-discord> 😛 22:23 <+ddnet-discord> it's not that hard ^^ 22:23 <+ddnet-discord> sth specific you want to know or should I just give a quick example? ^^ 22:23 <+ddnet-discord> quick example pls 22:25 <+ddnet-discord> `s_RenderingStartedByServer` feels like there should be a message somewhere but It's calculated only using local variables :/ 22:27 <+ddnet-discord> ``` 22:27 <+ddnet-discord> #include 22:27 <+ddnet-discord> std::shared_ptr pShared = std::make_shared(1); 22:28 <+ddnet-discord> std::shared_ptr pSecondPointer = pShared; 22:28 <+ddnet-discord> ``` 22:28 <+ddnet-discord> @Learath2 now `pShared` and `pSecondPointer` point to the same object 22:28 <+ddnet-discord> which will be deallocated when both references are gone 22:29 <+ddnet-discord> how does it deallocate? 'delete'? 22:29 <+ddnet-discord> how does it deallocate? `delete`? 22:29 <+ddnet-discord> yes 22:29 <+ddnet-discord> does that matter? 22:30 <+ddnet-discord> I have a pointer to I`FetchTask`, which actually points to an allocated `CFetchTask`. Would delete work in this case? 22:30 <+ddnet-discord> I have a pointer to `IFetchTask`, which actually points to an allocated `CFetchTask`. Would delete work in this case? 22:30 <+ddnet-discord> if the destructor is virtual in `IFetchTask`, yes 22:32 <+ddnet-discord> only virtual or pure virtual? 22:32 <+ddnet-discord> virtual is sufficient 22:33 <+ddnet-discord> and if it's virtual and I don't define a destructor for CFetchTask it'll all work out fine right? 22:33 <+ddnet-discord> and if it's virtual and I don't define a destructor for `CFetchTask` it'll all work out fine right? 22:33 <+ddnet-discord> should be 22:33 <+ddnet-discord> I'll give it a go 22:34 <+ddnet-discord> btw I hope @redix's blocker stuff works fine, always wanted to get rid of all that ugly code 😛 23:19 <+ddnet-discord> @heinrich5991 it needs to be held in a shared_ptr for this to actually work right? 23:19 <+ddnet-discord> yes 23:20 <+ddnet-discord> I don't like it :/ 23:20 <+ddnet-discord> struct MyFancyJobHandle { std::shared_ptr m_pTask; } ? 23:20 <+ddnet-discord> `struct MyFancyJobHandle { std::shared_ptr m_pTask; }` ? 23:21 <+ddnet-discord> yeah exactly too many wrappers 😛 23:22 <+ddnet-discord> also the user sets his to nullptr to indicate he doesn't give 2shits anymore, if the user doesn't give a shit anymore `IFetchTask::Abort()` needs to be called 23:23 <+ddnet-discord> and it still won't fix my problem b/c as soon as I'm out of FetcherThread the fetcher has also given up his shared_ptr 23:24 <+ddnet-discord> hmm, the problem is that the jobpool does not take ownership of whatever you give it I guess ? 23:24 <+ddnet-discord> yeah 23:25 <+ddnet-discord> the job needs to be a seperate entity from the CFetchTask 23:25 <+ddnet-discord> at which point i have to solve the same problem again 23:25 <+ddnet-discord> the CJob needs to be a seperate entity from the CFetchTask 23:26 <+ddnet-discord> damn object oriented multithreaded programming 23:26 <+ddnet-discord> give the jobpool a shared pointer allocated on heap and let it delete this pointer using another shared pointer within the task 😄 23:26 <+ddnet-discord> or rewrite the jobpool to make it take ownership of the stuff you give to it 23:27 <+ddnet-discord> whatever I do introduces some complexity to CJobPool 23:27 <+ddnet-discord> maybe someone can also have a look at this: https://github.com/ddnet/ddnet/pull/897 23:28 <+ddnet-discord> @HMH have you thought about where we can use that? ^^ 23:28 <+ddnet-discord> it currently just adds a queue that is used nowhere 23:28 <+ddnet-discord> finally do /save and /load right 23:28 <+ddnet-discord> and maybe also the jobpool thing 23:30 <+ddnet-discord> if one thread only writes to a variable and another thread only reads from it, is there really undefined behaviour involved? especially if the read is only a boolean check? 23:30 <+ddnet-discord> yes 23:30 <+ddnet-discord> AFAIK, that is 23:30 <+ddnet-discord> it needs to be an atomic access somehow if you do that 23:30 <+ddnet-discord> do you see a nice way out of this mess? 23:31 <+ddnet-discord> use a lock if you don't want to use `shared_ptr` 23:31 <+ddnet-discord> don't want is sth different to can't possibru 23:32 <+ddnet-discord> even after all the wrapping with shared_ptr there is still the CJob I need to take care of, it's either part of CFetchTask and it's deleted before the job is marked done causing a use after free, or it's dynamically allocated which means I'm leaking it which means I either need a callback or need CJobPool to hold a shared_ptr to it aswell 23:37 <+Learath2> thanks for the insight... I'll figure it out