Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories โ€” IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2017-10-22 00:00:00Z and 2017-10-23 00:00:00Z
Avatar
SDL can create a framebuffer/window that isn't scaled by the DPI. Only tested under Windows 10.
Avatar
damn infinite scroll on appveyor :/
19:32
@heinrich5991 canmerge
19:38
except one asyncio test not passing on windows 64bit build???
Avatar
d6bcc4f Run the server on CI (#910) - Learath2
Avatar
@heinrich5991 not using bors anymore?
Avatar
<heinrich5991> didn't want to push this non-squashed :D
19:45
<heinrich5991> 6 commits for a 8 line change
Avatar
hmm need our own bors that just checks if it compiles after a merge and has the ability to squash
Avatar
<heinrich5991> gonna ask in the forums if squashing would be possible
Avatar
did you figure out what was going on that time it timed out and why it needs staging.tmp?
Avatar
the timeout is simple
19:46
mac travis took too long
19:46
we could just increase the timeout
Avatar
oh it actually did timeout ๐Ÿ˜„
Avatar
GitHub provides a web API to merge a โ€œheadโ€ branch into a โ€œbaseโ€ branch, instantly writing the result over the top of the base. We donโ€™t actually want to write the result over the top of the base, however. We want the base to be master, the head to be your PR, and the result to go into staging. Homu, for example, works around this by force-pushing master to staging, then performing the merge (assuming youโ€™re set to โ€œcloud modeโ€; it supports local merging, too). Unfortunately, on services that ...
Avatar
makes sense
Avatar
sounded like that if we host our own bors, we could code that feature without staging.tmp
19:50
As indicated in What is the staging.tmp branch used for?, bors apparently only uses the GitHub API for creating merge commits. Would it similarly be possible to squash all the commits into one using the GitHub API, or does that not exist? Iโ€™d envision a syntax like bors r+ squash or similar.
19:50
@Learath2 do you have concerns about using bors?
Avatar
It kinda spams my github activity and this channel
19:53
but I'm all for having master always passing CI
Avatar
if it's about this channel being spammed you can move github logs to its own channel
Avatar
It's kinda nice getting the one notification for the merge tho ๐Ÿ˜ƒ
Avatar
i don't see sense to make a channel for github logs
19:59
No one will check
Avatar
you have log stream on github directly, and i bet most people just stay on one channel
20:01
boris spammed, but without him it was k
Avatar
this ghost diff is so huge...
Avatar
my teehistorian diff wasn't small either, sorry for that btw ^^
Avatar
well yours was quite readable as I kinda knew what it was trying
20:14
if(IsDDRace(&ServerInfo)) StartTick--; // the client recognizes the start one tick earlier than ddrace servers (edited)
20:14
this one has magic like that
Avatar
:/
20:14
still using IsDDRace
Avatar
if only redix was around to kinda give me a walkthrough
Avatar
maybe you could ask him to get on the discord server (or IRC)
20:16
would also be a good idea for the blocker thing
Avatar
he is here
Avatar
oh, indeed
Avatar
@redix o/
Avatar
@Learath2 did you see my comment on your use-after-free thing?
Avatar
I'm thinking of using shared_ptr on that
20:20
If you want I can also introduce a lock instead of that
Avatar
idc, shared_ptr isn't bad I'd think
Avatar
as soon as I figure out how to use them
20:21
๐Ÿ˜›
Avatar
it's not that hard ^^
20:23
sth specific you want to know or should I just give a quick example? ^^
Avatar
quick example pls
20:25
s_RenderingStartedByServer feels like there should be a message somewhere but It's calculated only using local variables :/
Avatar
#include <memory> std::shared_ptr<int> pShared = std::make_shared<int>(1); std::shared_ptr<int> pSecondPointer = pShared;
20:28
@Learath2 now pShared and pSecondPointer point to the same object
20:28
which will be deallocated when both references are gone
Avatar
how does it deallocate? delete? (edited)
Avatar
yes
20:29
does that matter?
Avatar
I have a pointer to IFetchTask, which actually points to an allocated CFetchTask. Would delete work in this case? (edited)
Avatar
if the destructor is virtual in IFetchTask, yes
Avatar
only virtual or pure virtual?
Avatar
virtual is sufficient
Avatar
and if it's virtual and I don't define a destructor for CFetchTask it'll all work out fine right? (edited)
Avatar
should be
Avatar
I'll give it a go
20:34
btw I hope @redix's blocker stuff works fine, always wanted to get rid of all that ugly code ๐Ÿ˜›
Avatar
@heinrich5991 it needs to be held in a shared_ptr for this to actually work right?
Avatar
yes
Avatar
I don't like it :/
Avatar
struct MyFancyJobHandle { std::shared_ptr<IFetchTask> m_pTask; } ? (edited)
Avatar
yeah exactly too many wrappers ๐Ÿ˜›
21:22
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
21:23
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
Avatar
hmm, the problem is that the jobpool does not take ownership of whatever you give it I guess ?
21:25
the CJob needs to be a seperate entity from the CFetchTask (edited)
21:25
at which point i have to solve the same problem again
21:26
damn object oriented multithreaded programming
Avatar
give the jobpool a shared pointer allocated on heap and let it delete this pointer using another shared pointer within the task ๐Ÿ˜„
21:26
or rewrite the jobpool to make it take ownership of the stuff you give to it
Avatar
whatever I do introduces some complexity to CJobPool
Avatar
maybe someone can also have a look at this: https://github.com/ddnet/ddnet/pull/897
This also contains a wrapper for condition_variables which manages the lifetime of the mutex required for the condition_variable.
Avatar
@HMH have you thought about where we can use that? ^^
21:28
it currently just adds a queue that is used nowhere
Avatar
finally do /save and /load right
21:28
and maybe also the jobpool thing
Avatar
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?
Avatar
yes
21:30
AFAIK, that is
21:30
it needs to be an atomic access somehow if you do that
Avatar
do you see a nice way out of this mess?
Avatar
use a lock if you don't want to use shared_ptr
Avatar
don't want is sth different to can't possibru
21:32
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
Avatar
<Learath2> thanks for the insight... I'll figure it out
Avatar
@heinrich5991 Some words on the blockers: I will add one more commit tomorrow to fix some issues i encountered. But in general it should exactly work like the previous solution in most cases. Instead of checking the velocity each time when it is modified, it is now only checkend one time before being applied to the position. I did not explicitly check the coordinates but most of the time the prediction from the old client still works, so it should be fine in most cases. But there might be problems with the map that uses this enterable-behavior. Something like this will not work anyore since you cannot completely go into the tile:
23:51
23:53
But this should still work:
Avatar
@redix https://ddnet.tw/maps/?map=Wailand this map uses what you showed in the first screen (but it works if you don't go fully on the ground somehow) (edited)
Exported 103 message(s)