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 2021-02-24 00:00:00Z and 2021-02-25 00:00:00Z
Avatar
i dont think anyone knows sql here better than u
08:04
justatest
Avatar
Hey, I need some help, I think. I have 2 issues, first one is this crash: https://pastebin.com/raw/CzcgPjRr And second one is this: https://github.com/fokkonaut/F-DDrace/blob/F-DDrace/src/game/server/entities/trail.cpp#L121-L122 if i uncomment this line it crashes due to out of bounds (historypos + 1), but i dont know a good fix for it since I cant reach timakro who originally made the trail
Avatar
[freenode] timakro[m] BOT 2021-02-24 10:53:43Z
@Learath2 If you're considering pass, at least for android you wouldn't have to write your own app. I use android password store It's awesome
Avatar
timakro: @fokkonaut was looking for you ๐Ÿ˜›
Avatar
[freenode] timakro[m] BOT 2021-02-24 11:43:00Z
It's too long ago that I wrote that code, I don't know any more about what I did there than you do @fokkonaut
Avatar
ouch
Avatar
ouch
Avatar
game/collision.cpp : 1093 dbg_msg("collision", "something is VERY wrong with the %s layer please report this at https://github.com/ddnet/ddnet, you will need to post the map as well and any steps that u think may have led to this", aBuf); nice error message lol
Avatar
got that couple of times ๐Ÿ˜…
Avatar
still from ddrace times where we had the random tile bug
12:40
that one was very annoying
12:40
it caused random tiles to appear in the map, but only for the server
12:41
so then you'll find you're 90% through a map, and the server has decided to spawn a blocker at just the right place to block you from finishing
12:41
or a random death tile
12:41
(not seen in entities btw)
Avatar
good that you fixed it
Avatar
idk who fixed it, probably GreYFoX
Avatar
Sorry if this isnt the proper channel but who should i ask to have a flag added
14:32
It would be nice for Québec people to find each other if we had our flag
Avatar
Isnt quebec a city?
14:44
I think the idea is to only support countries. So you would search for people with a canadian flag
Avatar
yeah exactly lets docs ourselfs to random people on the internet
Avatar
@NeXus Quebec is a province in canada, the main point is that quebec is a french province so it would help identify french speakers
Avatar
From Discord: >[3:32 PM] M Emile: Sorry if this isnt the proper channel but who should i ask to have a flag added >[3:32 PM] M Emile: It would be nice for Québec people to find each other if we had our flag >[3:40 PM] NeXus: Isnt quebec a city? >[3:44 PM] NeXus: I think the idea is to only support countries. So you would search for people with a canadian flag >[4:02 PM] Ama: yeah exactly lets docs ou...
Avatar
@Learath2 let's deploy now? ๐Ÿ™‚
Avatar
Can you also commit or pr a bump in the version cutoff for the new messages so we can deploy master?
Avatar
add Tatarstan flag too xdd
Avatar
comment on github ๐Ÿ˜‰
16:02
@Learath2 bump to which version?
Avatar
99999 I guess, we can bump it down when releasing 15.4 with the new messages
Avatar
hm
Avatar
Or 15040 if you want to make sure we donโ€™t forget as itโ€™ll break
Avatar

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--u...
Avatar
Taking one last look over the mysql pr
16:09
Huh, why did you cancel that? Doesnโ€™t fix the issue? ๐Ÿ˜›
Avatar
@Learath2 forgot that I had <= instead of <
16:10
fixed it now
Avatar
Um, <= sounds correct to me
Avatar
depends on whether VERSION_DDNET_MSG_LEGACY is on the right or the left side ๐Ÿ˜›
Avatar
Oh yeah ๐Ÿ˜„
Avatar
@heinrich5991 I spotted another assert
16:26
m_InUse
Avatar
I guarantee that all my other code also relies on asserts firing ๐Ÿ˜› will fix
Avatar
I mean we will compile this in release mode, which means it wonโ€™t be thread safe really. Thatโ€™s why Iโ€™m concerned
Avatar
there's only one thread (I do crash on a failed assert after all)
16:28
(I assumed a crash on a failed assert after all*)
16:33
@Learath2 fixed
16:33
oh, boost
Avatar
794d768 Bump version for the new protocol to DDNet 15.4 - heinrich5991 78041ba Merge #3640 - bors[bot]
Avatar
Whatever itโ€™s only on CI
Avatar
I pushed 7 seconds before your last review, I could have sneaked in code ๐Ÿ˜›
16:36
(removed boost)
Avatar
maybe bors should decline to do its job if the latest push is <1min ago?
16:38
suggest braces around empty if block
16:38
fine..
16:39
I wonder why I forgot the braces there anyway ๐Ÿ˜„
Avatar
That CodeQL step takes some time
Avatar
d7019a2 Get rid of the MySQL C++ connector as a dependency - heinrich5991 d37b62e Get rid of unused IN_USE status for db connections - heinrich5991 9568d10 Remove exceptions from database code - heinrich5991 2fb1c72 Merge #3568 - bors[bot]
Avatar
so, now let's deploy it on ger2, and if not everything catches fire, deploy it everywhere?
16:55
@Learath2 I'll do that, okay?
Avatar
Lets deploy it on ger2, restart a single server and finish a map
16:55
That sounds a good enough test
Avatar
@Learath2 8313
Avatar
@heinrich5991 I'll get back to doing some math, lmk if you need anything
Avatar
ye
17:11
works locally obviously
17:11
wouldn't be fun otherwise
Avatar
Could it be that many servers are connected to the same mysql server and you need some magic flag to get it to work in parallel?
Avatar
I don't htink so
17:12
I had that error in testing as well
17:13
it happened when I wasn't correctly finishing processing the results
Avatar
Maybe you still have a result lying around?
Avatar
oh wait
Avatar
You could try wrapping MYSQL_RES in a smart object aswell to make sure it gets freed even if we don't use all of it when it goes out of scope
Avatar
I reproduced sth locally
Avatar
does master server support 15.3 clients already?
Avatar
@deen should but now master has broken mysql
18:16
not should, it does we checked
Avatar
Trafalgar Law 2021-02-24 18:25:42Z
Can I not bind gfx_fullscreen?
18:25
I did: bind ctrl+f5 gfx_fullscreen 1
18:27
Ok it works
Avatar
what was the cmd for deepfly ?
18:29
the cmd that make that when u shoot ur dummy shoot
Avatar
For standard deepfly you can just use the dummy hammerfly command normally
18:30
If you want to time your shots the deepfly bind is bind x "bind mouse1 \"+fire; +toggle cl_dummy_hammer 1 0\""
18:33
i am very bad bcs dont work lmao
18:34
i mean he doesnt hit me, he hit but deep
Avatar
If you are trying it on the new map it has been disabled
Avatar
@timakro could you at least take a look at the backtrace and guess what could be changed?
Avatar
im quite the guessing type of guy
Avatar
[freenode] timakro[m] BOT 2021-02-24 19:26:03Z
@fokkonaut I'd guess in line 120 of trail.cpp the index HistoryPos is out of bounds?
19:26
but i dont know what a good fix for this is
19:26
and it doesnt happen always xd
Avatar
[freenode] timakro[m] BOT 2021-02-24 19:27:23Z
Looks like floating point inaccuracy
19:28
I don't know the reasoning for having an extra m_TrailHistoryLength variable that needs to be kept in sync with the data in the deque
Avatar
[freenode] timakro[m] BOT 2021-02-24 19:41:08Z
Try saving a little extra history
19:41
Maybe just to be 100% sure break before accessing an invalid indec
19:41
The line you commented was for interpolating between two history points
19:42
Might look fine without
Avatar
For the first one, I'm not sure how this ever worked (the ranks did end up in the DB though). The other one was introduced by a rebase.

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect ex...
Avatar
@Learath2 ^
Avatar
[freenode] timakro[m] BOT 2021-02-24 19:46:39Z
I'd be curious how the code looked before your edit
Avatar
Based on DDraceNetwork by deen & contributors (www.ddnet.tw) which is based on the great game teeworlds (www.teeworlds.com). - DDNetPP/DDNetPP
Avatar
unrelated, @Learath2: you said you worked with swagger before. does one have to design one's API with that tool in mind, or can you describe the API with it later on?
Avatar
83da81e Use ExecuteUpdate for SQL INSERT statements - heinrich5991 44437ee Fix return values for loading saves - heinrich5991 f006eee Merge #3641 - bors[bot]
Avatar
@heinrich5991 I only ever used it to design an api, but I think there are tools that generate it from php code
20:18
(Using annotations)
Avatar
Avatar
heinrich5991
unrelated, @Learath2: you said you worked with swagger before. does one have to design one's API with that tool in mind, or can you describe the API with it later on?
I used swagger and openapi even wrotey own codegen. What I got to say - it's pretty shitty permissive tool without any contracts in mind
21:00
And all codegenerators for it are shitty generating degenerative code that doesn't work / poorly designed
21:00
If you ask me what to use I'd say use gRPC
Avatar
@timakro could you look into it again maybe? i am trying to fix it but i cant reproduce the bug at all, it just happens randomly sometimes
Avatar
[freenode] timakro[m] BOT 2021-02-24 22:15:33Z
If its so seldom just break the loop before accessing an out of bounds value
22:16
@fokkonaut ^
22:17
like this?
22:18
it may look weird if i break at certain places
22:19
this seems to work, but i also dont understand what you did with AdditionalLength, since I am unable to use it because HistoryPos + 1 will instantly crash so i worked around it which seems to work nicely
Avatar
[freenode] timakro[m] BOT 2021-02-24 22:19:21Z
No I mean just check if HistoryPos >= m_TrailHistory.size() before indexing
22:19
And break in that case
Avatar
isnt that what i do now?
22:21
i think i am doing exactly thats
22:22
a break would only break the while loop which would still index at the bottom
22:22
so return is okay since nothing more is happening after the loop anyways
22:22
no?
Avatar
[freenode] timakro[m] BOT 2021-02-24 22:23:31Z
Yes, you're right. Though there's still a possible path to a out of bounds index - maybe?
22:23
Wow the code prior was completely borked
Avatar
[freenode] timakro[m] BOT 2021-02-24 22:24:30Z
So this worked?
Avatar
i dont know
22:25
it does not happen alwayys
22:25
time will tell me whether this works^^
Avatar
[freenode] timakro[m] BOT 2021-02-24 22:25:41Z
If it still happens just add a if directly before the indexing
Avatar
kk, thanks
Avatar
[freenode] timakro[m] BOT 2021-02-24 22:26:00Z
Or rewrite this mess ^^
Avatar

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--u...
Avatar
35dca7e Forgot to actually send Sv_RecordLegacy to old clients - heinrich5991 3d86c76 Merge #3642 - bors[bot]
Exported 146 message(s)