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-04 00:00:00Z and 2021-02-05 00:00:00Z
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 09:51:03Z
wow when did the spec speed changed? I did not notice anything o.O maybe because i prefer to play over spectating :D
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 10:18:43Z
1;3A
10:18
oop
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 10:32:37Z
@heinrich5991 can you explain your motivation for f8277267a0a8a4d2ac296cdf4b22cab00047c5e3 and why it is not in vanilla?
Avatar
now that the percentage thing is shown at the rank. wouldnt it make sense to reform the rankpoints system? so you get rankpoints for every finish and it doesnt need to be in the top10
Avatar
That would mean we have to clean out all duplicate ranks, instead of just in the top 10, way too much work
11:49
(by duplicate I mean same person finishing with multiple names)
Avatar
ah right...
11:51
but still its hard to get in the top10 on many maps and its not a good motivation to do a speedrun
Avatar
Could measure it as % slower than top time, but I'm not that motivated to change it
Avatar
i did the stupid thing of shutting down while updating and it was updating kernel related stuff
justatest 1
13:16
lucky i had a live usb near
13:16
on windows u would be fucked, lucky on linux u have full control
Avatar
Ryozuki too stupid for windows
Avatar
not stupid
13:21
its simply that on windows u wouldnt be able to fix it
Avatar
ChillerDragon: less unused code. that should be enough
13:23
ChillerDragon: I didn't want to engage in discussions whether an obviously unused feature should be removed or not, tw usually seems skeptical of changes like that
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 14:02:58Z
ok thanks
14:03
Ryozuki: i wouldnt be able to fix it on linux either and would have to buy a new linux xd
Avatar
Cuz u nobo
Avatar
[freenode] Ryozuki BOT 2021-02-04 14:31:53Z
ChillerDragon do u have a rpi with raspbian?
14:32
Heads up: In a significant screw-up, the Raspberry PI foundation pushed an update installing Microsoft GPG keys and repo secretly all Raspberry PIs running Raspbian Linux. They are currently silencing everyone on their forum who is pointing out this issue. https://t.co/wF6eUCoaOn
Microsoft repo secretly installed on all Raspberry Pi's Linux OS by Raspberry foundation's official OS, and many Linux/FOSS users are upset.
Avatar
mac book pro 2020 44fps ingame
14:42
is it normal?
Avatar
[quakenet] deen BOT 2021-02-04 14:48:40Z
nope, should be much higher
14:48
maybe it renders at 4x resolution and then gets scaled down?
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 14:50:26Z
wtf Ryozuki yes i use it as router
14:50
that sounds fucked up
Avatar
how 2 fix that btw ?
Avatar
[freenode] Ryozuki BOT 2021-02-04 14:50:55Z
Install arch
Avatar
n1 advice
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 14:52:11Z
it actually is
14:52
but its some work yikes
14:52
14:52
that sounds easier
14:52
but for the furture i might try arch
Avatar
Avatar
Skyrx
how 2 fix that btw ?
what are u graphics settings
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 14:53:30Z
cl_max_fps 44
14:53
xd
14:54
thanks a lot for the info Ryozuki
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 14:55:18Z
my try without opengl3
14:55
but thats just a random guess
Avatar
already tried
14:55
nothin changed
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 14:55:51Z
how does the vanilla teeworlds client perform?
Avatar
lemme test
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 14:58:01Z
hmm sudo apt-mark hold raspberrypi-sys-mods does not look good to me
14:58
also i want my router to not break so i have internet :D and debian based stuff is nice for not breaking
14:58
maybe i should run vanilla debian on my pi then
Avatar
I run archlinuxarm on my router pi 😉
14:59
no breaks so far
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 14:59:36Z
arent u even running arch on ur vps
14:59
and u didnt brick ur system in 8 yrs or somthing
14:59
i cant rly compare myself to u
15:03
default client
15:05
300-400 fps default client
15:05
why wtf
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 15:05:20Z
yea i think vanilla does some things different and i also usually have higher fps there
15:05
but ddnet should still be higher im sure there is a fix for u but dont ask me how
Avatar
try high dpi off i heard some ppl had issues with that
Avatar
already tried
15:06
still nothin
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 15:07:41Z
did you try turning ur device off and on again?
15:07
joke ^^dont do it xd
15:08
maybe try linux
15:08
best gaming os
Avatar
"facepalm"
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 15:08:57Z
its actually worth a try
15:09
in the meantime u can use F-Client which is a vanilla based client with ddr features
Avatar
no antpiping i guess?
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 15:09:59Z
well vanilla has some antipingish thingys
15:10
its not that advanced as ddnet tho
15:13
yikes that fucks with my OCD now it alsays says 2 packages can be upgraded. Run 'apt list --upgradable' to see them. and then does not installed them cuz i blocked ms :D
15:14
i guess that is the downside of linux getting more used is that companys like ms want to enter the market
Avatar
companies*
Avatar
U can use any other distro
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 17:38:20Z
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/ddnet
17:38
changing ui_server_address has no affect on the ui?
17:38
is the ui somehow constructed after connect and then stored?
17:40
i leaked my fokin password because i clicked a server in the ingame browser :/ and my pw manager thought i changed server
17:50
Nobo
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 17:51:56Z
@QshaR how to reset pw on kog?
17:52
also why is /login not in /cmdlist
Avatar
@qshar ^
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 18:03:01Z
ty
18:03
omg google
18:03
how does the average user find this?
18:03
i could not find it on qshar.com and as i reported cmdlist was even worse
18:04
18:04
also fuck google
18:05
but thanks for the fast response :) when kog irc or open forum again
Avatar
we have all info on discord now
Avatar
open irc chillerbridge
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 18:18:35Z
oof i forgot the email of my dummy
18:19
oh lol one mail can setup both names? ah nice
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 18:27:23Z
omg failed to login is it possible that you have bad special character support? @qshar
18:27
or did i mess something up
18:29
if some passwords do not work maybe add a filter on the password reset form if the password wont work for login
Avatar
how to get id of player from the
18:41
m_pCient
18:43
oh wait nvm its ClientID
18:45
wait no its not
Avatar
Eh? Are you on the client or on the server? Which class are you coding in?
Avatar
uhh different question
19:01
is there a better way to do this m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientID].m_Predicted.m_ActiveWeapon != WEAPON_GUN
19:01
in players.cpp
19:01
cleint
Avatar
m_Snap.m_pLocalCharacter ?
Avatar
got a 100% crash with 15.2.5 when joining right now ger1:8305 with Back In Time 2
19:28
on win32
19:32
voting the map on empty server also crash
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:34:14Z
win32 oof
19:34
can u reproduce consitantly?
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:34:54Z
thats a good start i guess :D
Avatar
nah its win64 but the client is 32 bits
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:35:06Z
why do u run 32 bit?
Avatar
(it's still a bug)
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:35:22Z
ah ye sure
19:35
just wondering
Avatar
64 bit client does not trigger graphic card switch on laptop
Avatar
im trying to implement some derive macro and my brain is melting
19:36
@heinrich5991 have u ever tried this magic?
Avatar
no
Avatar
im trying to implement a trait Form which outputs a struct as a html form
19:36
monkalaugh
19:37
19:37
im there
19:37
but its hard
19:37
(this is the expanded macro)
19:38
im sure i can even avoid the for loop
19:38
#(#field),*
19:38
or some weird magic
Avatar
can't help you rn, in a lesson
19:38
just wanted to show u
Avatar
in 30min 🙂
Avatar
ehm, gdb on windows doesnt show anything...
19:38
just say it exited with code 3...
Avatar
what does that mean? it doesn't crash when running in gdb?
19:39
ah
Avatar
it crashes, but doesnt give a backtrace or anything
Avatar
maybe it doesn't crash but actually just exits for some reason
19:39
idk how to debug that in a good way though
Avatar
nah, outside gdb i got window saying app has crashed
Avatar
ah
19:39
hm
Avatar
is there a win version with debug symbols?
19:40
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. [Inferior 1 (process 4312) exited with code 03]
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:42:31Z
try building from source with visual studio and run it from there
Avatar
Code de l’exception: 40000015 According to internet this means: STATUS_FATAL_APP_EXIT
Avatar
Avatar
[quakenet] ChillerDragon
try building from source with visual studio and run it from there
no way i install this big factory, my disk is almost full
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:43:09Z
xd
Avatar
i use mingw
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:43:10Z
fair
19:43
im not sure how to debug with mingw
Avatar
long time i haven't build ddnet on my computer
Avatar
i think we dont compile in mingw
19:44
so it may be bugged
19:44
or maybe deen knows
Avatar
releases are compiled with mingw I think
Avatar
trying to compile tag 15.2.5 right now
Avatar
make sure to pull submodules
Avatar
rofl cmake error
Avatar
make sure to pull submodules
Avatar
git submodule update?
Avatar
git submodule update --init --recursive
19:46
fixes all your submodules woes
Avatar
master and 15.2.5 changed ddnet-libs iirc
19:46
due to discord
Avatar
E:\Teeworlds_DDNet\ddnet\src\base\system.c:3392:10: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'? 3392 | return (uintptr_t)ShellExecuteA(NULL, "open", link, NULL, NULL, SW_SHOWDEFAULT) > 32; | ^~~~~~~~~ | intptr_t E:\Teeworlds_DDNet\ddnet\src\base\system.c:3392:10: note: each undeclared identifier is reported only once for each function it appears in E:\Teeworlds_DDNet\ddnet\src\base\system.c:3392:20: error: expected ';' before 'ShellExecuteA' 3392 | return (uintptr_t)ShellExecuteA(NULL, "open", link, NULL, NULL, SW_SHOWDEFAULT) > 32; (edited)
19:49
well, seems like some typedef are missing in mingw
Avatar
#include <stdint.h>
Avatar
only on mingw i guess
19:50
rip iirc
19:50
19:50
19:50
monkalaugh
Avatar
Avatar
heinrich5991
#include <stdint.h>
works 😉
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:54:30Z
omg it took me 10 sec to realize thats a build err not a crashlog xd
Avatar
/src/base/tl/base.h(14): assert!
19:55
wait, i transfer my config for this one
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:56:42Z
assert o.O that should be catched in the log
19:56
no need to debug that
19:57
i mean yea debug helps to see why it breaks tho xd
Avatar
how do i get gdb prompt when it crashes, it doesn't accept any command, seems just like to hang
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 19:59:13Z
u should get one instantly
Avatar
normally it should give you a prompt when it crashes, yes
Avatar
#0 0x77239962 in msvcrt!memcpy () from C:\Windows\syswow64\msvcrt.dll #1 0x005a96e8 in mem_copy (dest=0x0, source=0x4a9d0020, size=8) at E:\Teeworlds_DDNet\ddnet\src\base\system.c:262 #2 0x004633a1 in mem_copy_special (pDest=0x0, pSource=0x4a9d0020, Size=8, Count=14952016, Steps=12) at E:\Teeworlds_DDNet\ddnet\src\game\client\components\maplayers.cpp:397 #3 0x004652ac in CMapLayers::OnMapLoad ( this=0x8d5620 <gs_MapLayersBackGround>) at E:\Teeworlds_DDNet\ddnet\src\game\client\components\maplayers.cpp:843 #4 0x004c63ad in CGameClient::OnConnected (this=0x76cfc0 <g_GameClient>) at E:\Teeworlds_DDNet\ddnet\src\game\client\gameclient.cpp:511 #5 0x00419589 in CClient::ProcessServerPacket (this=0x3bb0020, pPacket=0x28d6f0) at E:\Teeworlds_DDNet\ddnet\src\engine\client\client.cpp:1794 #6 0x0041c63d in CClient::PumpNetwork (this=0x3bb0020) at E:\Teeworlds_DDNet\ddnet\src\engine\client\client.cpp:2591 #7 0x0041d557 in CClient::Update (this=0x3bb0020) at E:\Teeworlds_DDNet\ddnet\src\engine\client\client.cpp:2858 #8 0x0041ea78 in CClient::Run (this=0x3bb0020) at E:\Teeworlds_DDNet\ddnet\src\engine\client\client.cpp:3242 #9 0x0042399f in main (argc=1, argv=0x1c71d78) at E:\Teeworlds_DDNet\ddnet\src\engine\client\client.cpp:4355 (edited)
20:02
Program received signal SIGSEGV, Segmentation fault. 0x77239962 in msvcrt!memcpy () from C:\Windows\syswow64\msvcrt.dll
Avatar
ah, good old backtraces triggering github issue linking, now also on discord
Avatar
Oh the bot got confused :P
Avatar
soryr, wanted to do shift+enter to add a newline, just pressed enter 😦
Avatar
epic bot
20:03
@Learath2 i remember u saying to blacklist the first 10 issues
20:03
irc must be overloaded
20:04
+ 1 edit
Avatar
so can reproduce 100% only on back in time 2 right now
Avatar
mem_copy_special?
Avatar
Sounds like a jank solution I'd indeed come up with :P
Avatar
do we ahve that function? oO
Avatar
with release from ddnet website and debug build from mingw
Avatar
syswow64
20:04
much wow
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:04:36Z
im ded Ryozuki
Avatar
I dont remember a mem_copy_special
Avatar
can someone delete the bot message maybe?
Avatar
[quakenet] Ryozuki BOT 2021-02-04 20:04:52Z
ChillerDragon hi ded im dad
Avatar
is the github up to date
20:05
repo
Avatar
yes, did a pull before building
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:05:47Z
its not a bot issue
20:05
its non format as code issue
20:06
he forgot first time
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:06:15Z
the name mem_copy_special is big meme
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:06:27Z
oh
20:06
nvm
Avatar
[quakenet] Ryozuki BOT 2021-02-04 20:06:33Z
@jao u used 2 backsticks
20:06
try 3
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:06:37Z
then actually bot issue
Avatar
Looks like a very dangerous function :P
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:06:42Z
#2
Avatar
[quakenet] Ryozuki BOT 2021-02-04 20:06:47Z
gg
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:06:49Z
an no its discord issue
20:06
xd
20:06
:D
20:07
how was it
20:07
to get the url of the bot repo
20:07
$about
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:07:10Z
not here i guess
Avatar
Author icon
DDNet#9607
Stats
95 Guilds 1702 Channels 7971 Users
Process
151.31 MiB 0.00% CPU 11 Threads
Bot
10d 23h 20m 9s Uptime 138.14ms Latency
Latest commits
5cc7c6f bump pps thresholds (4 days ago) 78f4216 . (6 days ago) 0ba2183 change expire timestamp format (6 days ago)
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:07:13Z
$help
Avatar
its about
Avatar
Anyway, Count looks way too high
20:08
That would be where I start investigating, the source of that count
Avatar
95 Guilds
20:09
this bot is in lot of places
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:10:47Z
its going places
Avatar
at 100 it will get banned
20:11
why
Avatar
personal ID required by discord or so?
Avatar
does this bot use sharding
Avatar
Spy on the guilds with it
Avatar
after that u need verification
Avatar
ow i guess i can rls mine ^^
20:12
or can you just deactive the invite process?
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:12:41Z
did you try not using discord?
Avatar
you have a discord bot @Patiga?
Avatar
someone invite ddnet to 6 random discords justatest
Avatar
nah i got a server where i invited the bot
Avatar
Therefore, we are making verification a requirement for bots in 100 or more servers. Until your bot is verified, you will not be able to grow past 100 servers. If your bot is already in more than 100 servers, it will not be able to join any more.
20:13
u wont get banned
20:13
ppl will simply be unable to invite it
Avatar
but how to get it verified
20:13
they will decline it like they declined server verification
Avatar
send personal data to discord I think
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:14:14Z
server is not verified?
Avatar
maybe deen can do it
20:14
if he doesnt care
Avatar
[quakenet] ChillerDragon BOT 2021-02-04 20:14:21Z
isnt owning ddnet.tw enought?
Avatar
server can definitely get verified
Avatar
we are not talking about the server
Avatar
server got declined 2 times
Avatar
lol when 2 times
Avatar
that sucks i saw some 500 member server verified
Avatar
half a year ago and 1 month ago
Avatar
member count isnt the only requirement
Avatar
I think they want social media presence and third-party sources
20:16
I could only find one third party src I think
Avatar
python supports lookaheads right
Avatar
yes
Avatar
hmm idk if regex is the best way
Avatar
lookaheads are bad because they make the language non-regular and thus no guarantees about performance anymore
Avatar
r'(?:(?P<owner>\w+)/)?(?P<repo>[\w-]*)#(?P<id>[1-9]\d*)\b'
20:20
this is the current regex
Avatar
Got it 100% on 32 bit release build from ddnet.tw as well as debug build from mingw32 on a win 7 64 bit. Output from gdb: ```shell Program received signal SIGSEGV, Segmentation fault. 0x77239962 in msvcrt!memcpy () from C:\Windows\syswow64\msvcrt.dll #0 0x77239962 in msvcrt!memcpy () from C:\Windows\syswow64\msvcrt.dll #1 0x005a96e8 in mem_copy (dest=0x0, source=0x4a9d0020, size=8) at E:\Teeworlds_DDNet\ddnet\src\base\system.c:262 #2 0x004633a1 in mem_copy_special (pDest=0x0,...
Avatar
32bit monkalaugh
Avatar
64 bit client doesn't use graphic card even if i force it into nvidia control panel (edited)
20:24
so i have to use the 32 bits one
20:24
I'm programming a DirectX game, and when I run it on an Optimus laptop the Intel GPU is used, resulting in horrible performance. If I force the NVIDIA GPU using the context menu or by renaming my
Avatar
Optimus is awful at deciding when to turn on
20:27
Maybe try opengl3.3 that might get it going
Avatar
nah, nothing got it working
20:27
it starts the GPU then fall backs to intel integrated graphics
20:28
whatever option i set in ddnet, and even if i force it into nvidia control panel
Avatar
client uses too few resources so it falls back to intel?
20:28
is integrated too bad for ddnet?
Avatar
but it works for 32 bits version, so i guess it might be a nvidia bug as well
20:29
64 bits client always use intel graphic whatever i do, 32 bits client does whatever i tell him to do (intel or nvidia)
Avatar
the max allocation i see is 80mb at once
20:29
doesnt sound too horrible
Avatar
should i also open an issue for graphic card selection (it's a minor defect that i work around)?
Avatar
can u even do that in opengl?
Avatar
apparently, you need to export a symbol in the binary
Avatar
on windows?
Avatar
cant u rightclick ddnet.exe and select the GPU at start?
Avatar
it ignores it on the 64bit, not on the 32bit
Avatar
strange
Avatar
We should probably debug the client with an allocator that randomly fails
Avatar
Avatar
Deleted User
strange
that's why i believe its probably non ddnet related
Avatar
well malloc is allowed to return NULL
20:32
i just dont understand why it should for 80mb
Avatar
on 32 bit there might not be enough address space
Avatar
Maybe it's allocating way too much due to a bug?
Avatar
contiguous
Avatar
@Chairn can you add a dbg_msg before the malloc to see what UploadDataSize is?
Avatar
what file?
Avatar
but why shouldnt there, what does the compiler do
Avatar
maplayers.cpp
Avatar
so the heap is soo small
20:34
already did @Learath2
Avatar
80 MB is 1/25 of the address space of a 32bit application (edited)
Avatar
@Deleted User you did, can you even reproduce the issue?
Avatar
no
20:35
for me the allocation doesnt fail
20:35
pdest is null so it must be the allocation
Avatar
Yes, and how can an allocation fail?
Avatar
no heap space
Avatar
or not enough contiguous address space
Avatar
as heinrich said, i just cannot imagine for a rather small allocation like this xd
Avatar
80MB? that's 1/25 of the address space
20:36
that's quite a lot
Avatar
mhh i dunno
20:36
doesnt sound alot
Avatar
So I assumed the first one, I thought to myself how that could happen and one theory I came up with is UB leading to a massive UploadDataSize
Avatar
imagine loading 25 shared libraries at random addresses
20:37
that will give you no remaining space for 80MB on the heap
20:37
idk how ASLR works on 32bit windows
Avatar
we could use LARGEADDRESSAWARE flag
20:37
then its only 2.6% of the address space
Avatar
UploadDataSize is 299040320
20:37
then it crashes
Avatar
that's 280MB
Avatar
previous size are 1006320 and 184160
Avatar
oh then i usedw the wrong map appearently
Avatar
okay, that"s a lot of memory, but should still not crash
20:39
there's enough memory available
Avatar
a single 32bit process can only see 2GB of RAM
Avatar
oh yeah that map is gigantic 😄
20:39
it can use 3GB with largeaddressaware
Avatar
largeaddressaware comes with some drawbacks
Avatar
yeah cannot remember
Avatar
ill print malloc return value
Avatar
but i think i had a patch for a 32bit game that then could use more RAM
Avatar
is there a perror function like on linux you think?
Avatar
Are we even using 2g?
Avatar
well, obviously malloc returns 0 😄
20:41
when it crashes, memory usage is around 180MB
20:42
so it should be able to get 280MB more
Avatar
As @heinrich5991 pointed out it might be just a ridiculous amount of fragmentation
Avatar
btw thats the upload data, so i dont think it can be minimized
20:42
it shouldnt contain any 0 vertices anymore
Avatar
So if we aren't using 2g (which sounds like way too much, we shouldn't be using even close to that) then it's likely we have fragmentation
Avatar
maybe it could be uploaded in chunks 😄
20:43
does it also crash in release mode @Chairn ?
Avatar
Permission denied: Not enough space
Avatar
We can optimize our heap usage, maybe use a different allocator
Avatar
so, weird (edited)
Avatar
Avatar
Deleted User
does it also crash in release mode @Chairn ?
yeah, it crashes as well using the build from ddnet.tw
Avatar
i mean 250mb is already nearly 3 times 80mb so i could understand it more xd
20:44
and still its not too much
20:44
i wonder if the compiler can just sort the heap address better
Avatar
that's the runtime
20:44
and the allocator
20:45
and possibly the kernel
Avatar
ok
Avatar
probably the kernel
Avatar
is there a way to see memory maps of process in windows?
Avatar
You know what else could cause this? a corrupted heap
Avatar
but would sanitizer show it?
20:46
or do u mean inside the kernel?
Avatar
Would have to be quite unlucky but I've overwritten the stack return with a pointer to _start once
20:46
I believe everything is possible
Avatar
maybe an out of bound array?
Avatar
@Deleted User could be that it never happens on linux due to the way malloc lays it out there
Avatar
but yeah @heinrich5991 u might be right, on linux 32bit it works
Avatar
I'm not very familiar with memory debugging on windows, let me read up a bit to see what tools there are to observe allocations
20:48
Actually let me see if it happens for me
Avatar
oh on wine it crashes in 32bit
Avatar
vmmap seems to be the tool
Avatar
i dunno how well wine emulates the win kernel xd
Avatar
seems like a fidel reproduction 😄
Avatar
@Learath2 ^ i dunno if malloc layout wrapped in wine 😄
Avatar
yep consistently crashes, cool
Avatar
we could just use non moved pointers for 32bit as workaround
20:53
i implemented both, uploading small chunks and big chunks
Avatar
non moved pointers?
Avatar
yeah, so you can delete the pointer directly
20:53
instead of keeping it alive for GPU upload
Avatar
Using VMMap from windows, address space is not that fragmented
20:54
white is free
Avatar
@Chairn wanna test quickly if changing int BufferObjectIndex = Graphics()->CreateBufferObject(UploadDataSize, pUploadData, true); to int BufferObjectIndex = Graphics()->CreateBufferObject(UploadDataSize, pUploadData, false); free(pUploadData);
20:54
works
Avatar
what line?
20:55
oh found 850
Avatar
yeah
Avatar
no, still crash
Avatar
ok so its the single allocation
20:56
not the previous ones
20:57
i wonder if the driver wouldnt crash
20:57
since it probs has to allocate the same amount of VRAM
Avatar
What is this even? Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnostic can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined
Avatar
ah
20:58
its probs #pragma pack(...)
20:58
so you can ignore alignment for e.g. 64bit variables
20:59
or increase alignment for variables that dont use such high alignments normally
Avatar
This is what happens if I try to build with msvc btw
20:59
didn't touch anything
Avatar
oh thats strange tho
21:00
we dont use such stuff maybe a broken header?
Avatar
not surprised for even a second that something about building on windows is broken
Avatar
LTO would warn about mismatches in structures (edited)
Avatar
u want to implement a new allocator to fix some 32bit client issues from the 2000s?
Avatar
Here I go diving into the stupidities of MSVC again when I try to debug a small allocation issue
Avatar
@Ryozuki i dont even know if thats fixable, since it has to be a single buffer on the GPU anyway
21:02
so even if its fixable on the software side we'd need to see if it works on GPU side
Avatar
There is absolutely no way we can't fit a 280M buffer in the ram
Avatar
^^
Avatar
actually, this is what i got with VMmap when it segfaults without crashing vmmap as well
Avatar
It being un-fixable is absurd
Avatar
@Learath2 i'd say the same, but windows proofes me wrong
Avatar
DX Calls: Any 3D game engine or DirectX application will trigger these calls
21:03
directx
21:03
windows at its best
Avatar
so it definetely use way more data than process manager shows
Avatar
There was a tool for high frequency sampling like perf on linux I remember that guy from chromium project with the nice blog was using it
21:04
Having trouble remembering the guys name
Avatar
Learath2
21:04
trollet
Avatar
@Chairn if u want to play that map u have to use opengl 1.x for now ^^
Avatar
not using opengl 3.3 justatest
Avatar
using 32bits in 2021 is just ridiculous
Avatar
not using graphic card for a game is ridiculous as well
Avatar
@Ryozuki believe me in south america everyone uses 32bit xD
Avatar
Us not being able to fit a game that should work on a gameboy into the 32bit address space is what's ridiculous
Avatar
Avatar
Chairn
not using graphic card for a game is ridiculous as well
i wonder if > DX Calls: Any 3D game engine or DirectX application will trigger these calls
21:06
means that it doesnt recognize opengl
Avatar
intel graphics are not as stable, sometimes fps goes down and game is not really fluid
Avatar
to trigger that
Avatar
@Chairn can u just disable intel completly?
Avatar
now the real question is why does it work for the 32 bit and not the 64 bit?
21:06
how i do that?
Avatar
in device manager
21:06
u can disable components
Avatar
well, intel graphics is used all the time except when i launch a game
Avatar
i think i did that too some day
21:07
i just know that i could set opengl configs in the nvidia control panel
21:07
back then
Avatar
memory view from vmmap when it crashes
21:08
like this
21:08
but dunno if that still exists
21:08
havent had nvidia since a longer time ^^
Avatar
Avatar
Chairn
memory view from vmmap when it crashes
See that looks more reasonable
21:10
I swear this thing requires more upkeep than a bleeding edge linux system
21:10
I don't touch it for a week and compilation breaks
Avatar
but for some reason i never have problems with MSVC XD
21:11
its only ur setup
Avatar
I literally have no setup
21:11
I downloaded VS, I cloned ddnet
21:12
I wouldn't want to set anything up on this sad excuse for a "stable" "ecosystem" atleast apple supports their single ecosystem perfectly
Avatar
Avatar
Deleted User
@Chairn can u just disable intel completly?
just had to reboot after this 😄
21:12
it turned off the screen with no way to turn it back on
Avatar
ah too bad
Avatar
Use Metal and develop apps like they want you to and you will never have a single issue. You can compile for x86_64 and it runs perfectly under M1, you can do fat binaries, you can compile for ios and run it under macOS
Avatar
Avatar
Deleted User
Click to see attachment 🖼️
yeah, that's what i do, but no change on 64 bit client
21:13
only works on the 32 bit one
Avatar
its really strange
21:13
did u install intel drivers manually?
Avatar
@Chairn you sure it's not using the gpu?
Avatar
Avatar
Learath2
Use Metal and develop apps like they want you to and you will never have a single issue. You can compile for x86_64 and it runs perfectly under M1, you can do fat binaries, you can compile for ios and run it under macOS
i better say nothing about MacOS ^^
Avatar
yes, power led changes color when using GPU
21:14
blue for intel, orange for Nvidia. 64 bit client start, led goes to orange then fall back to blue
21:14
when looking at the log, it says intel graphic
21:14
32 bit client, says nvidia
Avatar
btw i think newer clients also output the version of the driver capabilities [opengl]: Version string
21:14
then u should see if its nvidia
Avatar
I'll probably be able to take a look after the 2gb update to my 20gb installation of visual studio downloads
Avatar
[2021-02-04 22:15:47][client]: starting... [2021-02-04 22:15:47][sdl]: SDL version 2.0.8 (compiled = 2.0.8) [2021-02-04 22:15:47][gfx]: Created OpenGL zu.zu context. [2021-02-04 22:15:48][opengl]: Vendor string: NVIDIA Corporation [2021-02-04 22:15:48][opengl]: Version string: 4.6.0 NVIDIA 425.31
Avatar
Vendor string being NVIDIA strongly suggests it's running on the gpu
21:17
Though optimus does weird things, who knows maybe there is a shim reporting the version?
21:17
Ah yes, I need to restart my computer to finish installing software updates that are completely unrelated to the OS
21:17
brb
Avatar
xDDDDD
21:19
created opengl zu.zu context
21:19
is that mingw?
21:19
maybe we should use mingw stdio instead of mSvc broken c98 thing
Avatar
nah, release build from ddnet.tw
Avatar
yeah that should be mingw
Avatar
That should never happen
21:20
smells very much like UB
Avatar
[2021-02-04 22:20:14][sdl]: SDL version 2.0.8 (compiled = 2.0.8) [2021-02-04 22:20:14][gfx]: Created OpenGL zu.zu context. [2021-02-04 22:20:15][opengl]: Vendor string: Intel [2021-02-04 22:20:15][opengl]: Version string: 3.0.0 - Build 10.18.14.5162
Avatar
its bcs c98 didnt had it, and MSVC doesnt care about C
Avatar
mingw build because i did not configure nvidia to turn on for this one
Avatar
atleast not C std
Avatar
Ah true we need to compile to ancientC
21:21
and ofc an update to vs completely broke the project in which I just cloned ddnet so I need to clone again
Avatar
Avatar
Deleted User
maybe we should use mingw stdio instead of mSvc broken c98 thing
there are a lot of warning to fix then ^^
Avatar
we can just use c++ for system.c
21:23
just as we wanted always
21:23
why struggle with C
Avatar
system.rs
Avatar
iirc the idea was to keep compatible with tw
Avatar
yeah but our codebase isnt really compatible anyway
Avatar
deen did convert to C++ but closed his pr
Avatar
we could just copy paste if they ever have smth useful 😄
Avatar
don't remember his reason but he said it here
Avatar
yeah i know
21:24
i think its mainly heinrich being against it xd
Avatar
I don't remember this guy's blog name either 😦
Avatar
Forecast for randomascii: programming, tech topics, with a chance of unicycling
21:27
ETW is the name of the tool
21:27
Windows Performance Toolkit (xperf) is the thing it's part of
21:28
It's about as intuitive to use as radare2 though
21:28
Okay ddnet does not compile on MSVC
Avatar
mingw emulates most windows stuff tho
21:29
so msvcrt is compatible
21:29
or does it compile in some instructions?
Avatar
error message?
Avatar
Avatar
Learath2
?
thought it was related to the xperf stuff
21:32
but u just meant i doesnt compile ^^
Avatar
First of all it's not generating the protocol so let me figure that out but the main issue is: WINDOWS_IGNORE_PACKING_MISMATCH this thing
21:36
Okay it is generating just fine
21:36
I guess it's just intellisense failing to find them
21:37
Yeah it's error C2338: Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnostic can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined.
21:37
while compiling backend_sdl.cpp
Avatar
that sounds bad
Avatar
Okay figured it out, how this compiles with anyone else is beyond me, but apparently including SDL_syswm.h messes with the packing
21:40
it's fixed in SDL 2.0.12
Avatar
u should create an issue for that then
21:41
if we dont use 2.0.12
Avatar
including syswm after windows.h "fixes" it
21:41
I'm eager to find what it breaks though
21:43
Let us all come together and invent the ideal OS
21:43
I'm sure between us we can come up with something that's not as shit as every option available right now
Avatar
let's call it systemdos
Avatar
teeworlds-os
Avatar
microkernel?
21:46
lets build it with rust
Avatar
I must say the CRTs heap debugging functions are quite nice
Avatar
link/explanation?
21:49
I can see what kinds of objects are on the heap, I can see where the allocations happened, I can see the call stack leading to each allocation
Avatar
nice 🙂
Avatar
Okay, the heap seems completely fine, so no heap corruptio
21:56
n
Avatar
vmmap really seems like the tool to look at this but ofc it can't do high frequency
Avatar
In other news we seem to leak a bit
Avatar
Press T to enter text mode and place font letters based on keyboard presses Support custom number and letter offsets using json files. self made cursor.svg (CC0 or whatever u need)

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
...
Avatar
Depending on the map size joining and leaving a server leaks some heap
22:14
I don't get it we don't use nearly enough heap for address space to become an issue :/
Avatar
Well the error is ERROR_NOT_ENOUGH_MEMORY so I guess it is an issue
Avatar
I managed to make it crash earlier, amazing
22:51
Preallocating an entire gb of heap memory doesn't seem to help either wtf
Avatar
are the vectors maybe too big?
22:53
i think it allocates width * height, and then prepares the buffers for GPU upload
22:54
tho it "only" uses 700mb on that map
22:54
so in worst case it shouldnt be much higher than 1400MB
22:55
ah yeah it works on 32bit linux anyway
Avatar
The tooling looks pretty but it's quite shit, VS snapshots quickly seems to be well integrated with the crt, but it has no fragmentation view. VMMap has the fragmentation view but it can only snap at 1 second intervals
Avatar
forgot already 😄
Avatar
I don't know why/where we are hitting the boundry because I can't see the whole memory map because there is no way to make vmmap snap when I want
22:56
I guess people just abandoned 32bit
22:56
in 64 bit out of memory is just a joke anyway
22:56
atleast the address space kind
Avatar
thats true, i just wonder what gcc does differently when compiling / or if wine actually simulates windows that accurate xD
22:56
when compiling for windows*
Avatar
My theory is that our shared libs land in a shitty position in the address space so that there is no contiguous block of memory of 290m after the first shared lib
Avatar
possibly
Avatar
then heinrichs first guess would be right already 😄
22:58
i wonder if we can tell gcc to try to maximize heap or smth
Avatar
look at my gigantic heap
22:59
Still didn't save me 😛 fails on a smaller allocation
23:00
There has to be a trick to move the stupid shared libs towards the end
Avatar
32 bit = 4,294,967,296 bytes (4 Gigabytes) 64 bit = 18,446,744,073,709,551,616 (16 Exabytes) the difference is ridiculous
Avatar
I wonder if vmmap is open source, I could modify it to snap sooner
Avatar
my mobile is also 32bit, should test the map there xD
Avatar
does it support opengl
Avatar
im dissapointed in your dev team
Avatar
zwelf doesnt know who nouis is
Avatar
cuz he is not on this discord
Avatar
yh just talked to him about biggernouis and he had no idea about it
23:02
and didnt even know nouis
Avatar
@Ryozuki even OpenGL es 3.0
23:05
tested it few months ago on android
Avatar
You know what could work? Preallocating a large chunk for this kind of stuff at the very beginning
Avatar
but i'd call this map the worst case
23:08
2660x1100 or smth like that
23:09
with many layers
Avatar
LARGEADDRESSAWARE works
23:11
though I'm sure we are breaking something with that so I'll enable top-down allocation to see what breaks 😛
Avatar
@Learath2 you can maybe disable ASLR to map libraries to places you want
23:13
probably not a good idea though
23:13
(but an interesting exploit target)
Avatar
Anyway from 2gb you dont get to use much if at all for your heap
23:17
So keep that in mind next time working on 32bit stuff
Avatar
what's the reason for allocating 250MB btw?
23:17
sounds like a lot
Avatar
That you'll have to ask @Deleted User
23:18
Maybe there is a way to upload it to the gpu in chunks? I honestly wouldn't know
23:19
Or maybe a way to avoid making a copy of it
23:22
Yeah this allocation is just massive I see why it won't fit now that I've turned on LARGEADDRESSAWARE
Avatar
pix
Avatar
Anyway, I think this is a viable(tm) solution. Forcing malloc to return memory top-down didn't break any of our libraries either
Avatar
LARGEADDRESSAWARE you mean?
Avatar
well its allocating the vertices
Avatar
LARGEADDRESSAWARE gets us well large addresses
23:24
forcing the top down allocation lets me make sure the larger addresses that can now be returned by malloc doesn't break any library
Avatar
ah
Avatar
This is the largest snapshot I managed to capture but it gets a little larger than this, no way to get faster than 1s intervals in vmmap
23:25
This is with large addresses, with small addresses the huge orange blocks don't fit above the first purple nor is there enough contiguous memory anywhere after the first purple
Avatar
appereantly one layer is pretty full of tiles, didntr check tho if true
Avatar
if this stupid tool was integrated into VS I could debug it even further
23:29
Anyway, with only small addresses this is the largest heap I could capture
23:29
That white block in the middle is 260M so I guess we are making a huge deallocation that's causing fragmentation
Avatar
freezebg is 2415*1620 tiles each tile consumes 4 vertices each vertex 24 bytes
Avatar
Nah, I just need more resolution, idk why that happens
23:36
There is enough space but that 260M block is just left empty for some reason
Avatar
factorio only renders stuff near the player I think
23:38
(given that the world is unbounded, they have to do that in some way)
Avatar
factorio is in a class of optimization of it's own, us mere mortals can't achieve that
Avatar
I think they had a blog post about that
23:39
they render each layer near the player
Avatar
the things they come up with to cut 1ms from their pipeline really should be inspiration to us all
Avatar
and then just render new stuff as the player moves
Avatar
I guess I can code tooling to figure out why the allocator is skipping that 260m block
23:40
Or maybe a high resolution memory map
23:41
Or maybe dig into some very old blogs to figure out what they did back in Windows XP
Avatar
Avatar
heinrich5991
factorio only renders stuff near the player I think
it has nothing todo with the rendering
23:44
pre creating the buffer is fastest, what else would u do
Avatar
really? I thought you upload information about hte whole map up-front
Avatar
runtime creation is slower
Avatar
factorio doesn't do that, I think
Avatar
only about tiles that exist
23:44
the map has a layer that filles all tiles tho
23:44
yeah but why should that be faster?
Avatar
it would use less memory 🙂
Avatar
preallocating everything is fastest obv, but has disadvantages as RAM usage (edited)
Avatar
probably has a higher up-front cost, too
Avatar
why
Avatar
because you need to look at every tile at the start vs only looking at tiles near the player
Avatar
we also only look to tiles near the player
23:46
the renderer doesnt render anything not visible
Avatar
oh, so we only allocate that buffer for later usage?
Avatar
yes
Avatar
leaving it mostly empty?
Avatar
no
23:47
we have 2 buffers
23:47
one that helps with finding offsets and one on the GPU containing vertices
Avatar
and the one containing vertices contains info about every tile, not only near the player? so it has a higher up-front cost to build?
Avatar
ah thought u mean at runtime
23:48
yeah, should have
23:48
but in tw u alsmost always spec the whole map probably
23:48
or huge chunks
23:49
so wouldnt really be worth optimizing it in chunks for RAM
Avatar
Q: Isn't tmpTiles also on the heap?
Avatar
we just had someone who couldn't run this game on that map ^^
Avatar
he can run it
23:49
with gl 1.x
23:50
@Learath2 yes, but tmp xd
Avatar
did we tell him?
Avatar
@Learath2 in the end it worked on linux 32bit
23:50
so cant be out of address space
23:50
@heinrich5991 yes i did
Avatar
nice
Avatar
ASLR works differently on each platform
Avatar
@Deleted User linux might allocate differently, might even be a different userspace allocator
Avatar
So does malloc and the underlying kernel allocator
Avatar
yes
23:51
thats what learath tries to understand since 2 hours isnt it
23:51
(how we can change it)
Avatar
It quite obviously runs out of address space, the largest remaining free contiguous block in the address space is 260M which is not enough
Avatar
so large address space works or what?
Avatar
Large address space works and didn't break anything in my 10-20 minutes of testing
23:52
Though it's a shit fix, it would work for people running the 32bit binary by mistake or on situations like the one reported
23:53
It wouldn't work so well on an actually memory constrained 32bit computer
Avatar
yeah ok
23:54
dunno the details of that
23:54
anyway i'd prefer to disable GL >= 2.1 on 32bit completly than to fix this
Avatar
Figures
Avatar
for me this is also a pretty worst case
23:55
the editor already warns at 1000x1000 tiles
Avatar
sounds good. maybe we could also display an error message
Avatar
this is like 3 times the size
Avatar
You are okay with it crashing too I guess
Avatar
i am indeed
Avatar
instead of crashing I mean 😉
Avatar
xD
Avatar
an error message to tell people to enable opengl1.1 sounds better to me
Avatar
@heinrich5991 we are using unguarded mallocs everywhere anyway, getting to an error is tough without exceptions as teeworlds code is built for crashing and burning mostly
Avatar
funny how slow pcs get a slow implementation
23:56
almost ironically xD
Avatar
@Learath2 since it's only about address space exhaustion, we can guard that single big allocation
23:57
not about actual out of memory problems
Avatar
Well I'd feel warmer about that
Avatar
i think its better to not allow gl >= 2.x at all
23:58
completly disable it
23:58
most ppl with 32bit system have a old pc anyway
23:59
or maybe only on windows
Avatar
That I don't quite like
Avatar
i'll test with my mobile now, but since android is basiucally linux kernel, probs will work
Avatar
Dooming people to worse performance because some very edge case massive maps crash sounds silly
Exported 737 message(s)