3077: UI Elements r=def- a=Jupeyy
Build will fail bcs of clang-format,
i'll update this comment to explain.
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3107: Log close error to console r=Jupeyy a=def-
3155: Add memcheck/asan/ubsan to readme r=Jupeyy a=def-
To be linked from https://github.com/ddnet/ddnet/pull/3133
Co-authored-by: def <dennis@felsin9.de>
3161: Fix texture create with multi units r=def- a=Jupeyy
~Possibly `fixes` #3104~
Ravie can you test?
Does not fix the issue.
[only affects gl 3.3]
Still is required, bcs that looks wrong
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3157: Show option to disable system messages in settings r=Jupeyy a=def-
## Summary
Makes it a bit easier to find, prefer it on a busy server. Also clarified the friend message toggle is for highlighting only.
![screenshot-20201020@182835](https://user-images.githubusercontent.com/2335377/96615964-41d0d700-1302-11eb-910e-4c56f0c8451c.png)
## Checklist
- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options [does not apply]
- [x] Written a unit test if it works standalone, system.c especially [does not apply]
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: def <dennis@felsin9.de>
3160: Make gfx_quad_as_triangle 0 default r=def- a=Jupeyy
fixes#3097
I added a TrianglesBeing/End() instead for ingame quads
Let me quickly explain why #177 failed.
In the screenshots of #177 you already see the problem
the driver can built a quad like:
![image](https://user-images.githubusercontent.com/6654924/96621122-86f80780-1308-11eb-881a-eb51bdbe558c.png)
or like:
![image](https://user-images.githubusercontent.com/6654924/96621195-a131e580-1308-11eb-91c4-cc4cab96bdfd.png)
or somehow it wants, but it will always do them as triangles
And thats why the ingame quads were basically flipped in the screenshots of #177
But this almost never matters.
Tiles are single colored, text is single colored, ui elements are single colored.
So it only matters for ingame quads probably, which specify the color of each edge
Also even if it would matter, we can simply change the quads to triangles now.
Pro:
- Generally less vertices upload
- Less vertices building on CPU side
Cons:
- nothing
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3122: Fix arithmentic problems r=def- a=Jupeyy
The first three commits are safe
The ones i'll add later will be inside the gamecore, so might alter behaviour.
I'll see which ones are critical, but takes me some time
i fixed most in #3081
3137: Add gfx debug r=def- a=Jupeyy
If someone wants to try, you have to execute the client with a config that contains dbg_gfx 1
If opengl debug is supported it will show "Enabled OpenGL debug mode" in the console
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3149: Fix memory leak on team finish and read of uninitialized data r=def- a=Zwelf
Fixes#2522, fixes#3144 and fixes second leak from #3134.
Co-authored-by: Zwelf <zwelf@strct.cc>
3139: Use NUM_DUMMYS for dummy array length r=def- a=ChillerDragon
Should make code more readable by explaining that the array is used for dummy. Also makes modders life easier if there is a need to scale up dummy count.
I left out two places that do not include client.h
3be8a592e5/src/game/client/prediction/gameworld.h (L92)3be8a592e5/src/game/gamecore.h (L212)
Moving the enum to protocol.h for example is probably not nice.
Co-authored-by: ChillerDrgon <ChillerDragon@gmail.com>
3129: Editor: Fix selection of None value in auto rules (fixes#3013) r=Jupeyy a=def-
by starting the indexing at 0
3138: Fix out of bounds access in GetSolo r=Jupeyy a=def-
As discovered in #3135
3143: Ignore ddnet-info.json dl failure again r=Jupeyy a=def-
too aggressive, might just be bad internet at the moment
Co-authored-by: def <dennis@felsin9.de>
Direct leak of 768 byte(s) in 2 object(s) allocated from:
#0 0x4e91ad in operator new(unsigned long)
#1 0x7f0c54a3bf63 in sql::mysql::MySQL_Prepared_ResultSet::getBlob(unsigned int) const (/usr/lib/x86_64-linux-gnu/libmysqlcppconn.so.7+0x77f63)
Direct leak of 8 byte(s) in 2 object(s) allocated from:
#0 0x4f08e3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f08e3)
#1 0x68c9d1 in CDataFileWriter::AddItem(int, int, int, void*) /home/teeworlds/src/master/src/engine/shared/datafile.cpp:666:33
#2 0x5e4a3e in CGameContext::OnMapChange(char*, int) /home/teeworlds/src/master/src/game/server/gamecontext.cpp:3398:10
#3 0x553473 in CServer::LoadMap(char const*) /home/teeworlds/src/master/src/engine/server/server.cpp:2235:16
#4 0x55509e in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2440:8
#5 0x561a56 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3537:21
#6 0x7f2349f3809a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
Found in https://github.com/ddnet/ddnet/issues/3134
Direct leak of 360712 byte(s) in 11 object(s) allocated from:
#0 0x51fb22 in operator new(unsigned long) (/home/teeworlds/servers/DDNet-Server-asan+0x51fb22)
#1 0x561d77 in CServer::GetAnnouncementLine(char const*) /home/teeworlds/src/master/src/engine/server/server.cpp:3563:20
#2 0x5c00a7 in CGameContext::OnTick() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:971:32
#3 0x556073 in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2544:19
#4 0x561a56 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3537:21
#5 0x7f2349f3809a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
3108: Make GL 1.5 default r=def- a=Jupeyy
If ppl see white textures its related to
#2125
and you need to revert it, bcs thats not fixable, there is no extension for GL_GENERATE_MIPMAP or smth
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
To be friendly to other implementors of the format, the CRC field is now
zeroed out instead of completely gone.
Drop support for v2 and v3 of the ghost format, the ghost files should
have been automatically converted by the client already.
/media/ddnet/src/engine/shared/dilate.cpp:32:22: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
/media/ddnet/src/game/editor/auto_map.cpp:94:17: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage]
int RunID = pCurrentConf->m_aRuns.add(NewRun);
^
/media/ddnet/src/engine/server/sql_string_helpers.cpp:74:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
and mark some false positives
/media/ddnet/src/engine/client/backend_sdl.cpp:329:30: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-optin.portability.UnixAPI]
The actual work will be fixing those or at least
NOLINT(clang-analyzer-optin.cplusplus.VirtualCall) them so we can enable
this. Disable checks that we don't want.
Exclude external directory from clang-tidy.
3089: Fix out of bounds access in snapshot delta handling r=heinrich5991 a=axblk
Same as 293209e722 + c87a7b438f in 0.7
Co-authored-by: Redix <redix@hotmail.de>
3086: Fix 2 leaks in CServerBrowser r=def- a=Learath2
The only leaks reported by ASan that are allocated by us. There is one other by SDL and one by X11.
Co-authored-by: Learath2 <learath2@gmail.com>
3078: Make initial borderless work again r=heinrich5991 a=def-
Mistakenly disabled in https://github.com/ddnet/ddnet/pull/1418
Co-authored-by: def <dennis@felsin9.de>
3068: Fix alignment issues in CCommandBuffer r=def- a=Learath2
Though I prefer this version I also made one keeping the old ugly pointer arithmetic cb61356105
Feel free to take whichever. Supersedes #3061
Co-authored-by: Learath2 <learath2@gmail.com>
src/engine/client/serverbrowser.cpp:295:88: runtime error: index 64 out of bounds for type 'CServerInfo::CClient [64]'
#0 0x565020e035bd in CServerBrowser::Filter() /media/ddnet/src/engine/client/serverbrowser.cpp:295:128
#1 0x565020e053b3 in CServerBrowser::Sort() /media/ddnet/src/engine/client/serverbrowser.cpp:352:2
#2 0x565020e0c364 in CServerBrowser::Set(NETADDR const&, int, int, CServerInfo const*) /media/ddnet/src/engine/client/serverbrowser.cpp:620:2
#3 0x565020cf9854 in CClient::ProcessServerInfo(int, NETADDR*, void const*, int) /media/ddnet/src/engine/client/client.cpp:1524:20
#4 0x565020cf8132 in CClient::ProcessConnlessPacket(CNetChunk*) /media/ddnet/src/engine/client/client.cpp:1357:4
#5 0x565020d11656 in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2575:5
#6 0x565020d1ba21 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
#7 0x565020d26efe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
#8 0x565020d48b2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#9 0x7f4311524151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#10 0x565020a95e0d in _start (/media/ddnet/DDNet+0x705e0d)
src/engine/shared/snapshot.cpp:72:8: runtime error: signed integer overflow: -1297193910 + -1824658838 cannot be represented in type 'int'
#0 0x565165b0687d in CSnapshot::Crc() /media/ddnet/src/engine/shared/snapshot.cpp:72:8
#1 0x565165c4d20b in CClient::ProcessServerPacket(CNetChunk*) /media/ddnet/src/engine/client/client.cpp:1981:49
#2 0x565165c5d960 in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2589:6
#3 0x565165c67a71 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
#4 0x565165c72f4e in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
#5 0x565165c94b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#6 0x7fba5af2c151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#7 0x5651659e1e0d in _start (/media/ddnet/DDNet+0x705e0d)
src/base/system.c:261:15: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
#0 0x565165b348dc in mem_copy /media/ddnet/src/base/system.c:261:2
#1 0x565165aeb27d in CNetBase::SendControlMsg(NETSOCKET, NETADDR*, int, int, void const*, int, int, bool) /media/ddnet/src/engine/shared/network.cpp:313:2
#2 0x565165aeeb4e in CNetConnection::SendControl(int, void const*, int) /media/ddnet/src/engine/shared/network_conn.cpp:169:2
#3 0x565165af08c5 in CNetConnection::Feed(CNetPacketConstruct*, NETADDR*, int) /media/ddnet/src/engine/shared/network_conn.cpp:367:6
#4 0x565165aec7d2 in CNetClient::Recv(CNetChunk*) /media/ddnet/src/engine/shared/network_client.cpp:94:174
#5 0x565165c5d5ea in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2571:24
#6 0x565165c67a71 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
#7 0x565165c72f4e in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
#8 0x565165c94b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#9 0x7fba5af2c151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#10 0x5651659e1e0d in _start (/media/ddnet/DDNet+0x705e0d)
src/base/system.c:261:15: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
#0 0x5651235308dc in mem_copy /media/ddnet/src/base/system.c:261:2
#1 0x56512375218d in CServerBrowser::Add(NETADDR const&) /media/ddnet/src/engine/client/serverbrowser.cpp:503:3
#2 0x565123752f6a in CServerBrowser::Set(NETADDR const&, int, int, CServerInfo const*) /media/ddnet/src/engine/client/serverbrowser.cpp:548:13
#3 0x5651237564cb in CServerBrowser::Refresh(int) /media/ddnet/src/engine/client/serverbrowser.cpp:705:6
#4 0x5651239a32f8 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1164:21
#5 0x5651239bd331 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
#6 0x565123b878f6 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
#7 0x56512363b5ee in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
#8 0x56512367095f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
#9 0x565123690b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#10 0x7fa8487e8151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#11 0x5651233dde0d in _start (/media/ddnet/DDNet+0x705e0d)
3053: Optimize uuid lookup r=heinrich5991 a=Jupeyy
Already wrote that patch when i noticed its not about this, maybe we can use it, else nvm
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3048: Add GUI & Game sound volume sliders r=heinrich5991 a=def-
As requested by Pipou
3063: increase buffer size for name_ban messages r=heinrich5991 a=12pm
otherwise reason can be cut off
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2987: Modulize skins, particles, emoticons and game r=def- a=Jupeyy
fixes#2203
Puh, something i always wanted todo.
Need to error read, bcs alot of copy paste.
Modulizes all images, so that all images are mipmap indepedent, without texeloffset problems
I also added the ninja bar analyzer for #2921
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3022: Text alignment r=def- a=Jupeyy
i think the round borders create a bit of optical illusion, e.g. the "V" in edtior is only 1 pixel of, but looks like its completly left xd
i checked at few resolutions with gimp and only saw around 1 pixel margin of error, but go ahead and test yourself :D
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3033: Reset m_ServerCapabilities on Disconnect r=Jupeyy a=def-
Reported by builder17 that on Vanilla server timeout code can get sent
Co-authored-by: def <dennis@felsin9.de>
3020: Fix all Multiplication type alerts by CodeQL r=heinrich5991 a=def-
> Multiplication result converted to larger type
> A multiplication result that is converted to a larger type can be a
> sign that the result can overflow the type converted from.
Example: https://github.com/ddnet/ddnet/security/code-scanning/17?query=ref%3Arefs%2Fheads%2Fmaster
Co-authored-by: def <dennis@felsin9.de>
3005: Use rest instead of string in some commands r=heinrich5991 a=def-
where it makes sense, means you don't need to quote strings for those
Co-authored-by: def <dennis@felsin9.de>
2893: Determine binary dir independently of data dir (fixes#2891) r=heinrich5991 a=def-
@Learath2 Could you check if this can be extended to also find the DDNet-Server executable on Mac?
2972: Add explicit button for current map as BG r=heinrich5991 a=def-
2974: Fix autoformatting wrt. generated files r=def- a=heinrich5991
Fix#2962.
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2948: Show File button in demo player r=heinrich5991 a=def-
to easily get the file instead of having to search for it in the file browser again. Complements #2946
2956: Add Background music volume slider r=heinrich5991 a=def-
as requested by hussainx3
2965: Clean up some data r=heinrich5991 a=def-
Co-authored-by: def <dennis@felsin9.de>
2958: AntiPing limit is unintuitive, remove from settings r=heinrich5991 a=def-
2961: Fix hash in formatting-revs.txt r=heinrich5991 a=def-
2963: Handle PNG read errors (fixes#2959) r=heinrich5991 a=def-
and print a more telling error message
I'll check all our existing maps for failures now:
```
$ find . -iname '*.map' | while read i; do echo $i; map_extract $i > /dev/null; find . -iname '*.png' | while read j; do dilate $j; rm -- $j; done; done
```
For skins Soreu and the skin DB team is already taking care. (but I checked and the ones in Skin DB now can all be loaded without error)
Co-authored-by: def <dennis@felsin9.de>