Commit graph

14192 commits

Author SHA1 Message Date
Tater 70311d5d4f Add option for default eyes when joining server 2022-04-26 19:47:38 -05:00
bors[bot] 69f24254e7
Merge #5024
5024: Allow onfly FSAA change under Vulkan r=def- a=Jupeyy

This allows changing FSAA under Vulkan without restarting the client

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-04-26 21:44:44 +00:00
Jupeyy b23e60c077 Allow onfly FSAA change under Vulkan 2022-04-26 21:09:55 +02:00
bors[bot] d815fdfa03
Merge #5023
5023: fix WalkTime for negativ positions r=def- a=C0D3D3V

I am not sure if there is a more elegant solution, the problem is that fmod in cpp does not return a positive value. maybe we can just use a mod function that always returns positive values.

## 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
- [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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-26 08:49:02 +00:00
c0d3d3v bc80d83ec9
fix WalkTime for negativ positions 2022-04-26 09:58:31 +02:00
bors[bot] 6270b1c11d
Merge #5021
5021: fix clamp of m_ThreadCount r=def- a=Jupeyy

fixes #5020

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-04-25 16:32:28 +00:00
bors[bot] 9e227006c0
Merge #4986
4986: Free some opengl2 pointers r=Jupeyy a=ChillerDragon

Fixes these memory leaks on my system (default opengl 3.0.3 renderer debian 11)

```
Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x537ebc in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1672:21
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x537ff6 in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1673:29
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x53826a in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1675:36
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x538130 in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1674:28
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8
```

## 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
- [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: ChillerDrgon <ChillerDragon@gmail.com>
2022-04-25 16:07:05 +00:00
ChillerDrgon d364c63b69 Free some opengl2 pointers 2022-04-25 18:06:21 +02:00
Jupeyy 428c1ca4a8 fix clamp of m_ThreadCount 2022-04-25 17:37:15 +02:00
bors[bot] 1dea02d456
Merge #5018
5018: fix dummy hammer interval, this became incorrect after a few days r=def- a=C0D3D3V

Reported by Konsti here: https://discord.com/channels/252358080522747904/293493549758939136/967073772836376586
I have tested the change on Justfly with my dummy :D since it is exactly the same interval as before it should not change any Physics. 

## 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
- [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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-25 13:17:01 +00:00
c0d3d3v 2f4ccb94de
fix dummy hammer interval, this became incorrect after a few days 2022-04-25 14:10:32 +02:00
bors[bot] 9be59a990b
Merge #4678
4678: Ignore F5 key press when ingame menu is open r=heinrich5991 a=def-

Since ghost menu and browser use F5 already to refresh, and having a
bind on it, would cause both actions at once.

I believe it makes sense to have this special handling only for F5,
other F-keys don't have this problem since we don't use them in any
menus.

<!-- What is the motivation for the changes of this pull request -->

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-04-24 23:04:58 +00:00
bors[bot] 0be35fb7c1
Merge #5016
5016: Remove cl_show_quads standard bind r=Jupeyy a=def-

Leads to confusion why parts of map are not shown, no good reason to use
it on hardware of the last 15 years. If someone has a use case for it
please say so now.

<!-- What is the motivation for the changes of this pull request -->

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-04-24 15:36:05 +00:00
Dennis Felsing 394b2a02e0 Remove cl_show_quads bind 2022-04-24 12:28:04 +02:00
bors[bot] b14c916dd5
Merge #5012
5012: Rename `Act` → `Cur`, some "actual" → "current" r=def- a=heinrich5991

Seems like it got introduced by means of the false friend "actual" ≠
"aktuell" = "current".

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-04-22 22:47:01 +00:00
heinrich5991 103b663662 Rename ActCur, some "actual" → "current"
Seems like it got introduced by means of the false friend "actual" ≠
"aktuell" = "current".
2022-04-23 00:42:37 +02:00
bors[bot] 3cf8048608
Merge #5011
5011: Update Korean translations by CHaBek r=def- a=cwh7435

<!-- What is the motivation for the changes of this pull request -->

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: CHaBek <44938972+cwh7435@users.noreply.github.com>
2022-04-20 15:18:43 +00:00
CHaBek 886b6514b0
Update Korean translations by CHaBek 2022-04-21 00:11:33 +09:00
bors[bot] 001ccca493
Merge #5009
5009: Fix wrongly used viewport parameters r=def- a=Jupeyy

wrong from
50f9aa88d3

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-04-19 15:29:28 +00:00
Jupeyy 0b5122d751 Fix wrongly used viewport parameters 2022-04-19 17:26:05 +02:00
bors[bot] e06b3d9579
Merge #5007
5007: Get rid of optional, not available on Debian9 build r=edg-l a=def-

Since we don't have full C++17 support with the GCC version there.

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-04-19 07:57:40 +00:00
Dennis Felsing 4e3d5c5626 Get rid of optional, not available on Debian9 build 2022-04-19 09:56:28 +02:00
bors[bot] 08f856d741
Merge #5004
5004: add livefreeze commands to rcon r=def- a=edg-l

<!-- What is the motivation for the changes of this pull request -->

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Edgar Luque <git@edgarluque.com>
Co-authored-by: Edgar <git@edgarluque.com>
2022-04-19 07:35:42 +00:00
Edgar 6b15abeeae
put it above left up down 2022-04-19 08:58:26 +02:00
bors[bot] b84a347817
Merge #5002
5002: make super ignore livefreeze, fix #4973 r=def- a=edg-l

<!-- What is the motivation for the changes of this pull request -->

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Edgar Luque <git@edgarluque.com>
2022-04-18 16:56:27 +00:00
bors[bot] 585b95d219
Merge #5005
5005: Fix asan CI r=def- a=ChillerDragon



Co-authored-by: Chiller Dragon <chillerdragon@gmail.com>
2022-04-18 16:43:03 +00:00
Chiller Dragon d45448fab6
Fix asan CI 2022-04-18 17:32:06 +02:00
Edgar 50e6744d91
fix typo 2022-04-18 16:38:17 +02:00
Edgar b9fc6bc8a4
add livefreeze commands to rcon 2022-04-18 16:37:35 +02:00
Edgar 646162eb09
make super ignore livefreeze, fix #4973 2022-04-18 15:40:39 +02:00
bors[bot] c39448ca53
Merge #5000
5000: Inform about client restart when changing GPU r=Jupeyy a=def-

<!-- What is the motivation for the changes of this pull request -->

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2022-04-18 08:22:18 +00:00
def 87b7550a4a Inform about client restart when changing GPU 2022-04-18 10:16:24 +02:00
bors[bot] fdcb1576bd
Merge #4946 #4993 #4998 #4999
4946: Better forced viewport handling r=def- a=Jupeyy

For #4939

For the performance warnings refering `vkCmdClearAttachments` ignore them, because this function is only called when:
- clear color is changed(open/close editor, switch between entities) to directly flush a clear with the new color
- ~~a viewport is used that is "worse" than 5:4 (I don't really want to switch to non renderpass clear completly, since it *can* improve performance -- https://community.arm.com/arm-community-blogs/b/graphics-gaming-and-vr-blog/posts/vulkan-samples "Therefore, avoid using LOAD_OP_LOAD and vkCmdClearAttachments and use LOAD_OP_CLEAR or LOAD_OP_DONT_CARE whenever possible.")~~
thinking about it, maybe i can also drop this call now, since its dynamic viewport anyway

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4993: Unselect text after ctrl-u r=Jupeyy a=def-

<!-- What is the motivation for the changes of this pull request -->

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4998: Refactor tooltips and add some more r=def- a=edg-l

Refactored tooltips so they render last, otherwise stuff rendered after the call is overlapped.

Also renamed "Alpha" to "Opacity" which is more clear to non-devs.

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4999: Respect GPU type better r=def- a=Jupeyy

fixes #4994

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Edgar Luque <git@edgarluque.com>
2022-04-18 08:06:49 +00:00
Edgar eba7a14cb4
add missing end new lines 2022-04-18 09:55:50 +02:00
Jupeyy d770913c11 Don't force clear anymore for forced viewports 2022-04-18 09:50:26 +02:00
Jupeyy 0312346d1a Use a forced dynamic viewport for unsupported resolutions instead 2022-04-18 09:50:26 +02:00
Jupeyy 50f9aa88d3 Prepare graphics for dynamic viewport changes 2022-04-18 09:50:19 +02:00
bors[bot] ad56578bde
Merge #4992
4992: Add sanitizer runs to bors too, ignore pnglite shift ubsan issue r=Jupeyy a=def-

`@ChillerDragon` 

## 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--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2022-04-18 07:46:45 +00:00
Edgar fbbcbb6d2f
remove designated initializers because we live in 2017 2022-04-18 09:44:13 +02:00
Jupeyy 2a71e381ea Respect GPU type better 2022-04-18 09:44:11 +02:00
def af610c2bbf Add ubsan.supp to README, add runtime suppression for json.c 2022-04-18 09:42:20 +02:00
Edgar 74286d1dd4
format code 2022-04-18 09:34:21 +02:00
Edgar faab2ded74
Refactor tooltips to render last, add some tooltips 2022-04-18 09:34:05 +02:00
def 7973713257 Ignore pnglite shift ubsan
/home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:68:16: runtime error: left shift of 170 by 24 places cannot be represented in type 'int'
    #0 0x1b85f2f in file_read_ul /home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:68:16
    #1 0x1b7e129 in png_read_ihdr /home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:171:2
    #2 0x1b7d867 in png_open_read /home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:275:11
    #3 0xb59f78 in CGraphics_Threaded::LoadPNG(CImageInfo*, char const*, int) /home/runner/work/ddnet/ddnet/src/engine/client/graphics_threaded.cpp:642:14
    #4 0xb54e78 in CGraphics_Threaded::LoadTexture(char const*, int, int, int) /home/runner/work/ddnet/ddnet/src/engine/client/graphics_threaded.cpp:517:5
    #5 0x18e24f7 in CEditor::Init() /home/runner/work/ddnet/ddnet/src/game/editor/editor.cpp:6354:32
    #6 0xa8732e in CClient::Run() /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:2917:13
    #7 0xaef796 in main /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:4462:11
    #8 0x7ff6950d80b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)
    #9 0x43ce7d in _start (/home/runner/work/ddnet/ddnet/san/DDNet+0x43ce7d)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/runner/work/ddnet/ddnet/src/engine/external/pnglite/pnglite.c:68:16 in
2022-04-18 00:42:44 +02:00
def 041c565534 Unselect text after ctrl-u 2022-04-18 00:22:11 +02:00
Dennis Felsing 96710aa255
Merge pull request #4991 from Zwelf/pr-initialize-num-input
Initialize CCharacter::m_NumInputs of game server
2022-04-17 23:37:19 +02:00
def 0bef280fc1 Add sanitizers run to bors too 2022-04-17 23:22:28 +02:00
Zwelf 887e6673fe Initialize CCharacter::m_NumInputs of game server 2022-04-17 23:06:35 +02:00
bors[bot] c5e59db533
Merge #4970
4970: Add UBSan and ASan to CI r=def- a=ChillerDragon

Start server and headless client once and see if it gets some ubsan or asan hits.
The headless client might have less or different violations of the holy c++ standard but its the best way to get some client code runtime in the CI.

Related issue https://github.com/ddnet/ddnet/issues/3050

Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2022-04-17 20:54:54 +00:00
bors[bot] d4dcaa2471
Merge #4989
4989: Add null backend r=def- a=ChillerDragon

Thanks to `@Jupeyy` for the idea.

Replacing graphics_threaded_null.h with a null backend
makes code maintenance and memory cleanup easier.

Fixes these memory leaks in headless client (https://github.com/ddnet/ddnet/pull/4970)

```
Direct leak of 1048576 byte(s) in 1 object(s) allocated from:
    #0 0x4b6f6d in malloc (/home/runner/work/ddnet/ddnet/san/DDNet+0x4b6f6d)
    #1 0xd92ffb in CTextRender::InitTextures(int, int, IGraphics::CTextureHandle (&) [2], unsigned char* (&) [2]) /home/runner/work/ddnet/ddnet/src/engine/client/text.cpp:325:24
    #2 0xd53795 in CTextRender::LoadFont(char const*, unsigned char const*, unsigned long) /home/runner/work/ddnet/ddnet/src/engine/client/text.cpp:729:3
    #3 0xade5cd in CClient::LoadFont() /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:4070:32
    #4 0x155b3de in CGameClient::OnInit() /home/runner/work/ddnet/ddnet/src/game/client/gameclient.cpp:246:12
    #5 0xa8ecfe in CClient::Run() /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:2933:16
    #6 0xaf6726 in main /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:4458:11
    #7 0x7fadd9e610b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)
```

## 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
- [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: ChillerDrgon <ChillerDragon@gmail.com>
2022-04-16 20:15:13 +00:00