Guild icon
DDraceNetwork
Development / bugs
Report client & server bugs, especially but not limited to release candidates.
Between 2023-12-04 00:00:00Z and 2023-12-05 00:00:00Z
Avatar
Avatar
archimede67
Are you on latest master
yep
Avatar
same problem while building clear game
Avatar
This does not look like latest master
01:25
@-StormAx looking at the commit hash (c91aa8807c79e7808ea81ce18ecdc259d80bf3be) this version is behind ddnet:master by 2 days
01:25
sync your repo with ddnet:master and see if you still have the error
Avatar
Avatar
archimede67
I had this bug which got fixed by #7575
Interesting, I didn't know it would already fix an issue. Invalid UTF-8 should never appear anywhere, so it being uninitialized memory makes sense.
Avatar
Avatar
-StormAx
fair, but i have no idea what u gonna do with it @furo
There should have been a .RTP file (the crash dump) in the same folder, which would tell you where the call to the function with invalid UTF-8 happened
09:15
If no .RTP files appear on crashes for you (on Windows), then crash reporting is broken for you
Avatar
Avatar
Robyt3
Interesting, I didn't know it would already fix an issue. Invalid UTF-8 should never appear anywhere, so it being uninitialized memory makes sense.
Yeah, for me it was the uninitialized m_aCmdPlayDemo that contained random characters that were indeed invalid UTF-8
Avatar
🤓 👆 this wouldn't have happened in rust, as you can't have uninit values or invalid utf8 in a string
Avatar
this wouldn't have happenend in c++, as there is something called RAII
Avatar
This wouldn't have happened in c, as reason
Avatar
Avatar
Fussel
this wouldn't have happenend in c++, as there is something called RAII
unrelated to the issue
13:49
also its in c++ the code kek
Avatar
@Ryozuki there is a difference between c++ code and c++ compatible c/c++ mix
Avatar
unrelated to the issue
Avatar
btw, one could enable the compiler warning about uninitialized variables and explicitly disable it where it's intended, but warnings are "unrelated to the issue", i guess
Avatar
did u ever check the ddnet code
13:53
anyway c++ doesnt ensure utf8 correctness anyway
13:54
in Rust, a &str is a valid utf8 always, the only way to contruct one would be using unsafe wrongly, and it would be UB to have invalid utf8 in itself
13:54
as for uninint, maybe if u follow RAII faithfully u may avoid uninit values, but c++ is made in a way it allows them quite easily (too easily) and they are bound to happen
Avatar
it never silently happens if you enable compiler warnings and write destructors in a way leaving the objects in a valid state, that's exactly what i mean with the difference between c++ code and syntactically correct c/c++ mix
Avatar
/usr/lib/ccache/bin/clang++ -DCONF_DEBUG -DCONF_INFORM_UPDATE -DCONF_OPENSSL -DCONF_VIDEORECORDER -DGAME_RELEASE_VERSION=\\\"17.4\\\" -DGLEW_STATIC -I/data2/edgar/ddnet/build/src -I/data2/edgar/ddnet/src -I/data2/edgar/ddnet/src/rust-bridge -g -std=c++17 -fdiagnostics-color=always -fcolor-diagnostics -fstack-protector-strong -fno-exceptions -Wall -Wextra -Wno-psabi -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wno-nullability-completeness -Wshadow-all -Wthread-safety -Wthread-safety-negative -Wsuggest-override -Wdynamic-class-memaccess -o CMakeFiles/engine-gfx.dir/src/engine/gfx/image_loader.cpp.o -c /data2/edgar/ddnet/src/engine/gfx/image_loader.cpp", "file": "/data2/edgar/ddnet/src/engine/gfx/image_loader.cpp", "output": "CMakeFiles/engine-gfx.dir/src/engine/gfx/image_loader.cpp.o this is the warns we use rn
13:58
anyway c++ doesnt make it hard to do bad stuff, rust does
13:58
and people will always use a c++ mix
13:59
even more on a old game like this
Avatar
people use kitchen knives to kill people, ban the kitchen knives ^^
Avatar
bad analogy
13:59
i see ur a c++ maximalist
13:59
open ur mind! rust is better
Avatar
»i see you are an atheist, open your mind to god«
Avatar
im open to meet him anytime, its him who choses not to come owo
14:01
its sad, u should rly check rust, coming from c++ is where its most obvious how good it is
14:01
c++ place is only for legacy projects
Avatar
Should have picked a cool 1 letter name for your language if you wanted people to think it's cool
Avatar
rust name is cool, altho it atracts gamers, but its a shroom
14:02
i also think null terminated strings should die
Avatar
Avatar
Learath2
Should have picked a cool 1 letter name for your language if you wanted people to think it's cool
R
Avatar
which is why my nasm no libc only syscall programs use strings with defined lengths
Avatar
Avatar
Ryozuki
i also think null terminated strings should die
I'm a null terminated string enjoyer
Avatar
luckily the kernel doesnt enforce null terminated strings so far
14:03
syscalls*
Avatar
ahh gg this isn't developer justatest
Avatar
Avatar
Learath2
I'm a null terminated string enjoyer
imagine needed to walk through the data to find its length when u can do it in o(1) (edited)
14:04
@Devinci type anyway
Avatar
Imagine having to keep track of your strings legnth hypervomit
Avatar
but u do XD
14:04
u do lots of STRLEN
Avatar
Jupstar ✪ 2023-12-04 14:04:46Z
Hello guyz this is bugs channel. To make it short @Ryozuki is right, was right and will always be right
Avatar
Avatar
Ryozuki
imagine needed to walk through the data to find its length when u can do it in o(1) (edited)
saving the lenght takes potentially not used space ig?
Avatar
there are lot of optimization opportunities with having a known length beforehand
Avatar
Avatar
Ryozuki
imagine needed to walk through the data to find its length when u can do it in o(1) (edited)
For 99.999% of strings this is no issue, because they are short ^^
Avatar
Avatar
Devinci
saving the lenght takes potentially not used space ig?
not rly, its just u avoid needless work
Avatar
Avatar
Ryozuki
u do lots of STRLEN
Ackshully, I rarely use strlen, it's only ever needed when you need an algorithm that walks backwards or from both sides
Avatar
null terminated strings make introducing bugs easy anyway
14:06
look all the string methods, we had problems with them
14:06
u need to ensure the null char
14:06
and that puts extra work to sometimes
Avatar
Avatar
Ryozuki
u need to ensure the null char
And for length prefixed strings you need to ensure the length is correct
Avatar
u also put dev burden on to think about off by one errors
14:06
because they forgot
14:06
to consider the null char in length
14:06
etc
14:06
etc
14:06
yada yada
Avatar
Jupstar ✪ 2023-12-04 14:06:55Z
Null terminated strings suck. Utf8 sucks too btw
Avatar
Avatar
Jupstar ✪
Null terminated strings suck. Utf8 sucks too btw
utf8 is the most sane encoding so far
14:07
imagine utf8
14:07
utf16
14:07
*
Avatar
Jupstar ✪ 2023-12-04 14:07:12Z
But it is still encoding
Avatar
Avatar
Ryozuki
utf8 is the most sane encoding so far
Jupstar is RAM maximalist. He only likes utf32
14:07
Raw
Avatar
the good thing about utf8 in rust is u dont need to care about weird glyphs
14:07
its more inclusive kek
Avatar
Jupstar ✪ 2023-12-04 14:07:33Z
Static sized characters would be much better
Avatar
ascii is american propaganda!
Avatar
Avatar
Learath2
Jupstar is RAM maximalist. He only likes utf32
Jupstar ✪ 2023-12-04 14:07:49Z
I prefer not having encoding
14:08
So learn English
Avatar
not having encoding would add convertion burden between FFI
14:08
ur encoding needs to be converted to my personal encoding
14:08
Avatar
let's switch from encodings to vector graphics, problem solved
Avatar
Avatar
Ryozuki
not having encoding would add convertion burden between FFI
Not if all string encoding and languages that encode their strings are banned
Avatar
We can force everyone to use utf32 for everything
Avatar
Jupstar ✪ 2023-12-04 14:09:11Z
@Ryozuki bcs of utf8 even rust has to calc the strlen at run-time
14:09
Doesn't that suck
Avatar
put chars in a linked list, each with their own heap allocation so they can be dynamic sized
14:09
waste ram
14:09
ez
Avatar
Avatar
Learath2
We can force everyone to use utf32 for everything
Jupstar ✪ 2023-12-04 14:09:42Z
We already did the calculation honey
14:09
If we aren't coding a text editor it's nothing
14:10
Truth hits hard
14:10
Ram isn't limited to 5kb anymore
Avatar
Avatar
Ryozuki
put chars in a linked list, each with their own heap allocation so they can be dynamic sized
You still haven't grasped jupsti's genius. It also has to give a billion fps so no linked lists
Avatar
utf128
Avatar
Utf256. Have each character in a simd register
Avatar
Avatar
Learath2
You still haven't grasped jupsti's genius. It also has to give a billion fps so no linked lists
Jupstar ✪ 2023-12-04 14:13:24Z
Btw I'm less of a hater of linked lists than you think
Avatar
Avatar
Jupstar ✪
Btw I'm less of a hater of linked lists than you think
B-b-bbut, they are bad for cache locality. How could you?
Avatar
Jupstar ✪ 2023-12-04 14:14:04Z
I'd just always use them in combination with hashmaps
14:14
And then it's clear what my use case is
Avatar
Avatar
Learath2
B-b-bbut, they are bad for cache locality. How could you?
Jupstar ✪ 2023-12-04 14:14:44Z
Depends. U can create linked lists from static sized memory
14:15
U think of traditional heap allocated ones
Avatar
Avatar
Jupstar ✪
Depends. U can create linked lists from static sized memory
But you still get O(n) indexing. I think you should just use hashmaps for everything
Avatar
Jupstar ✪ 2023-12-04 14:16:17Z
Look in Dev channel
14:16
For my epic benchmark
14:16
Let me search it
Avatar
Omg, I have an idea. A string where every letter is inserted into an ordered hashmap
Avatar
we should use ropes
14:18
In computer programming, a rope, or cord, is a data structure composed of smaller strings that is used to efficiently store and manipulate a very long string. For example, a text editing program may use a rope to represent the text being edited, so that operations such as insertion, deletion, and random access can be done efficiently.
Avatar
alr i fixed problem with crash, but now i have problem while building game on windows(eww) C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\objidl.h(10694,14): error C2011: 'IStorage': 'class' type redefinition (compiling source file C:\Users\storm\CLionProjects\StA\src\engine\client\discord.cpp) [C:\Users\storm\CLionProjects\StA\cmake-build-debug-visual-studio\game-client.vcxproj] C:\Users\storm\CLionProjects\StA\src\engine/storage.h(18,7): message : see declaration of 'IStorage' (compiling source file C:\Users\storm\CLionProjects\StA\src\engine\client\discord.cpp) [C:\Users\storm\CLionProjects\StA\cmake-build-debug-visual-studio\game-client.vcxproj]
22:30
exactly problem is discord
Exported 115 message(s)