02:24 <+bridge> [ddnet] does anyone here still use RSS feeds? 02:27 <+bridge> [ddnet] seems like in the last year Chrome for Android now has support 02:27 <+bridge> [ddnet] seems like in the last year Chrome for Android now has support (again) 02:27 <+bridge> [ddnet] i never used them but i kinda wanna make one for my stream for fun 04:55 <+bridge> [ddnet] ah 04:55 <+bridge> [ddnet] copilot has pricing now 06:23 <+bridge> [ddnet] Sadge 07:43 <+bridge> [ddnet] isn't Ninecloud on this server? i want to kindly yell at them for not using the standard library JSON implementation in Python 09:49 <+bridge> [ddnet] lol in C it is still the same 09:51 <+bridge> [ddnet] https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/security/rust-toolchain.md 09:51 <+bridge> [ddnet] but it's not being shipped to users yet 10:01 <+bridge> [ddnet] m? what is still the same? 10:02 <+bridge> [ddnet] I mean, int or const int, it's still somewhere in the stack 10:04 <+bridge> [ddnet] so "a variable is an address in which you can find the value" 10:04 <+bridge> [ddnet] well its true what ryozuki said, compilers might optimize things by using direct constants 10:04 <+bridge> [ddnet] that are not in RAM 10:04 <+bridge> [ddnet] ye unless its a const or a constified variable 10:04 <+bridge> [ddnet] i agreed with ryuzuki xd 10:05 <+bridge> [ddnet] @f. a variable might be in a register or even never in memory at all 10:05 <+bridge> [ddnet] it's definitely not "always an address" 10:05 <+bridge> [ddnet] well i dont agree with that 10:05 <+bridge> [ddnet] you knew two things for a value contained somewhere 10:05 <+bridge> [ddnet] an address and the value inside that location 10:06 <+bridge> [ddnet] it is a dynamic memory such as ram or a static memory such a flip flop registry? 10:06 <+bridge> [ddnet] well, that's wrong 10:06 <+bridge> [ddnet] thats irrelevant 10:06 <+bridge> [ddnet] not all variables have main memory addresses, and not even all variables are stored somewhere 10:06 <+bridge> [ddnet] some are optimized out entirely 10:07 <+bridge> [ddnet] how to change the value of something 10:07 <+bridge> [ddnet] if its not contained anywhere? 10:07 <+bridge> [ddnet] where to store it after you change it? 10:07 <+bridge> [ddnet] the C compiler only has to produce code that works as-if it was executed 10:07 <+bridge> [ddnet] it doesn't actually have to perform the computation 10:08 <+bridge> [ddnet] (this isn't a theoretical concern, this is what actually happens) 10:08 <+bridge> [ddnet] even if you want to go deep down cpu architeture i dont agree with that 10:08 <+bridge> [ddnet] registries are memory locations that have addresses and you reference those in machine code 10:09 <+bridge> [ddnet] address is an information like another 10:09 <+bridge> [ddnet] variable = address + value (unless excpetions) 10:09 <+bridge> [ddnet] i see you like focussing on the expetions 10:09 <+bridge> [ddnet] but the general rule is this 10:09 <+bridge> [ddnet] okay, so you call registers a memory location as well 10:09 <+bridge> [ddnet] fine 10:09 <+bridge> [ddnet] and then call everything that doesn't work with your rule an exception 10:09 <+bridge> [ddnet] i mean im not talking about something i made up 10:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989079769289224282/l-values-and-r-values-2-l.jpg 10:09 <+bridge> [ddnet] okay, I can make any rule work with that 10:10 <+bridge> [ddnet] nah, the only expection i see 10:10 <+bridge> [ddnet] is an actual constant 10:10 <+bridge> [ddnet] written in machine code, inside the code 10:10 <+bridge> [ddnet] that has no memory location 10:11 <+bridge> [ddnet] but when you do var x = 4; now x must have a location somehwere 10:11 <+bridge> [ddnet] or it will be forgotten, like doing 5 + 5 without assignments 10:11 <+bridge> [ddnet] no, that's false 10:11 <+bridge> [ddnet] ```c++ 10:11 <+bridge> [ddnet] int abc() { 10:11 <+bridge> [ddnet] int i = 5; 10:11 <+bridge> [ddnet] i += 10; 10:11 <+bridge> [ddnet] if (i == 15) { 10:11 <+bridge> [ddnet] return 0; 10:11 <+bridge> [ddnet] } else { 10:12 <+bridge> [ddnet] return 1; 10:12 <+bridge> [ddnet] } 10:12 <+bridge> [ddnet] } 10:12 <+bridge> [ddnet] ``` 10:12 <+bridge> [ddnet] compile this with your favorite C compiler with optimizations 10:12 <+bridge> [ddnet] `i` will never have a memory location 10:12 <+bridge> [ddnet] there is a conceptual problem maybe thats why we are not understanding each others 10:13 <+bridge> [ddnet] i mean, cpu operates on local registry, if its not enough on local caches, if its not enough on main ram, if its not enough it swappes to hard drive 10:13 <+bridge> [ddnet] its the memory pyramid 10:13 <+bridge> [ddnet] I do know all that 10:13 <+bridge> [ddnet] so you say that something has an address only if it is in main memory?? 10:13 <+bridge> [ddnet] why 10:13 <+bridge> [ddnet] I'm not arguing that right now 10:13 <+bridge> [ddnet] your code is so simple it can be run instantly on local registries 10:13 <+bridge> [ddnet] no need to use main memory 10:13 <+bridge> [ddnet] I'm saying in the above example, `i` is never in any kind of memory 10:13 <+bridge> [ddnet] so... that means your var i has no address? 10:13 <+bridge> [ddnet] it's not even in register 10:13 <+bridge> [ddnet] it's not even in registers 10:13 <+bridge> [ddnet] His code is so simple it won't ever run 10:14 <+bridge> [ddnet] xD 10:14 <+bridge> [ddnet] It'll be completely optimized out 10:14 <+bridge> [ddnet] i is in a static memory based on flip flops 10:14 <+bridge> [ddnet] the variable `i` will never be in main memory and it will never be in a register 10:14 <+bridge> [ddnet] that is a cpu registry 10:14 <+bridge> [ddnet] no 10:14 <+bridge> [ddnet] oooh 10:14 <+bridge> [ddnet] i will never be in any register 10:14 <+bridge> [ddnet] https://godbolt.org/z/sehnMzo3r 10:14 <+bridge> [ddnet] so thats what im not getting 10:14 <+bridge> [ddnet] check this 10:14 <+bridge> [ddnet] i go 10:15 <+bridge> [ddnet] the assembly listing only has `xor eax, eax` 10:15 <+bridge> [ddnet] which is similar to `return 0` 10:15 <+bridge> [ddnet] so the assembly definitely doesn't contain anything about the variable `i` 10:15 <+bridge> [ddnet] xDDDD 10:15 <+bridge> [ddnet] i understand what you are saying 10:16 <+bridge> [ddnet] its because your code is so simple ye 10:16 <+bridge> [ddnet] this also happens in more complicated code 10:16 <+bridge> [ddnet] I chose a simple example to make it very clear 10:16 <+bridge> [ddnet] don't forget the ret overwise it's not similar to return 0 10:16 <+bridge> [ddnet] the rule "all variables are manifested in memory or registers somewhen" is false 10:16 <+bridge> [ddnet] i understand compiler optimization things ye 10:16 <+bridge> [ddnet] but afaik xor eax, eax is better than mov eax, 0 10:17 <+bridge> [ddnet] in my view its because the compiler understood that's not a "real variable" sort to say 10:17 <+bridge> [ddnet] you just need it on the fly for local working then forget it 10:17 <+bridge> [ddnet] It's a performance thing about how the pipeline is organized iirc. I think I read something about it once but can't seem to dig it back up 10:17 <+bridge> [ddnet] but yeye i agree with you now thanks for clarification 😛 10:17 <+bridge> [ddnet] @Learath2 for me if I remember 10:17 <+bridge> [ddnet] for one, its encoding is shorter 10:17 <+bridge> [ddnet] the instruction set is smaller 10:17 <+bridge> [ddnet] `31 ed xor ebp,ebp` 10:17 <+bridge> [ddnet] only 2 bytes 10:18 <+bridge> [ddnet] while mov eax, 0 would be of size 3 10:18 <+bridge> [ddnet] also, it's hardcoded into the CPU 10:18 <+bridge> [ddnet] not 3 sry 10:18 <+bridge> [ddnet] more 10:18 <+bridge> [ddnet] zeroing a register takes 0 cycles IIRC 10:18 <+bridge> [ddnet] but you see what I mean 10:18 <+bridge> [ddnet] because it's just a register renaming 10:19 <+bridge> [ddnet] @f. btw saying registers have an address is a little out there. On most architectures you can't refer to them with a memory address for they wouldn't be even mapped into the memory 10:19 <+bridge> [ddnet] yes i meant the registry address 10:19 <+bridge> [ddnet] (registers are different from cache and main memory btw) 10:19 <+bridge> [ddnet] they are ye 10:20 <+bridge> [ddnet] referencing them its different ofc, they are organized differently 10:20 <+bridge> [ddnet] cache is supposed to be a invisible abstraction 10:20 <+bridge> [ddnet] whereas you have to use registers explicitly 10:20 <+bridge> [ddnet] I've seen some toy architectures messing around with address tags letting users address registers. But even then as far as C is concerned if you so much as suggest a compiler to store a variable in a register you are just not allowed to take the address of it, even if the compiler doesnt end up putting it in a register 10:21 <+bridge> [ddnet] thats interesting 10:21 <+bridge> [ddnet] The standard rarely makes such a restriction, but in this case it's sort of justified since well there really are no real architectures that allow this 10:22 <+bridge> [ddnet] Anyway, too semantic of a discussion before breakfast. Need food 10:23 <+bridge> [ddnet] hahah true 10:24 <+bridge> [ddnet] thats because you like to go in deep details to find exceptions to a general picture that, even if its a semplification, cannot be stated as fundamentally wrong 10:24 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989083441880514560/1V9jXXG_CqnjGuJXQyRr_lQ.png 10:24 <+bridge> [ddnet] i mean this is how you represent variables, its like a pointer to an address that contains the value 10:24 <+bridge> [ddnet] it is always true? nope 10:25 <+bridge> [ddnet] but this picture is useful and its not wrong under an accpetable generalization 10:25 <+bridge> [ddnet] its like to say newton laws are wrong because it doesn't concieve relativity xd 10:26 <+bridge> [ddnet] I can't prove newton's laws wrong in my backyard 10:26 <+bridge> [ddnet] (maybe I can, but I don't know how) 10:26 <+bridge> [ddnet] I know how to prove this wrong 10:27 <+bridge> [ddnet] then prove me that also this is wrong xD 10:27 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989084075899908166/1000_F_52607201_81Vn0Qm1yfFo25zqRRxN9NZcRa2D60c4.jpg 10:27 <+bridge> [ddnet] that has nothing to do with newton's mechanics? ^^ 10:27 <+bridge> [ddnet] you said you could prove that 10:27 <+bridge> [ddnet] so i took something harder maybe? xd 10:27 <+bridge> [ddnet] I said I can't prove newton's laws wrong 10:28 <+bridge> [ddnet] ooh sorry misread 10:28 <+bridge> [ddnet] Depends on your goal I guess. Is programming a means to an end goal or your goal. If you are interested in learning a language well, it's imho in your best interest to keep your terminology and concepts as accurate as possible without going overly deep 10:28 <+bridge> [ddnet] its true it depends on the level of abstraction you are positioning 10:28 <+bridge> [ddnet] and thats important 10:29 <+bridge> [ddnet] you can talk about variables in the abstract machine I guess 10:29 <+bridge> [ddnet] because i could comment: dont talk about structured loops, they dont exist, only gotos 10:29 <+bridge> [ddnet] well they exist in a certain level of abstraction xd 10:29 <+bridge> [ddnet] but you sounded like you were talking about stuff that happens on the silicon 10:29 <+bridge> [ddnet] peole answered me talking about compiling optimizations 10:30 <+bridge> [ddnet] i followed that line of discussion cause im curious too about how the compile could change the abstraction in which the programmer is working on 10:30 <+bridge> [ddnet] and i learned something today thanks to you 10:30 <+bridge> [ddnet] but i still think thats correct 10:30 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989085028833185852/unknown.png 10:30 <+bridge> [ddnet] on a certain level of abastraction 10:30 <+bridge> [ddnet] its not conceptual wrong 10:31 <+bridge> [ddnet] what would go wrong if you replaced the last person pointing to 69 with 69 itself? 10:31 <+bridge> [ddnet] well i'd say if the compiler technically doesn't optimize anything it'd work, even for the example of @heinrich5991 10:32 <+bridge> [ddnet] Chillerdragon: are u there? 10:32 <+bridge> [ddnet] This is what I'd think would be useful 10:32 <+bridge> [ddnet] not complete in my view, cause the int has an l-value and r-value (unless expetions) 10:32 <+bridge> [ddnet] the last picture say that int is the address that contains the actual number 69 10:32 <+bridge> [ddnet] No fair, you accuse us of being pedantic but you bring up l and r values 😀 10:32 <+bridge> [ddnet] actually if you do the same than the int -> 69 to the others you have to add like 2 values each being the address of 10:33 <+bridge> [ddnet] i use jargon cause i know we understand eachothers XD i just meant address + value 10:33 <+bridge> [ddnet] might it be that you identify `int` with the location of the int instead of where its value is stored? 10:33 <+bridge> [ddnet] yes 10:33 <+bridge> [ddnet] so you always add one level of indirection over my model? 10:33 <+bridge> [ddnet] cause if i do a = &b; 10:34 <+bridge> [ddnet] im assigning the address not the value 10:34 <+bridge> [ddnet] i like to keep that information in the meme 10:34 <+bridge> [ddnet] yes, but I'm doing `a = &b` and not `a = b` 10:34 <+bridge> [ddnet] yes exactly 10:34 <+bridge> [ddnet] I'd associate `int` with the location where 69 is stored 10:34 <+bridge> [ddnet] the first you assign l-value, the second r-value 10:34 <+bridge> [ddnet] when doing &, I'd look where this location is 10:35 <+bridge> [ddnet] yes cause b its two things not just one 10:35 <+bridge> [ddnet] the address and the value 10:35 <+bridge> [ddnet] you can decide what to consider in expressions thanks to & 10:35 <+bridge> [ddnet] but `int`s can exist without being able to get their address taken 10:35 <+bridge> [ddnet] Assigning an l-value doesnt really make much sense. You can assign TO an l-value 10:36 <+bridge> [ddnet] you do that for pointers xd 10:36 <+bridge> [ddnet] (& refers to memory address exclusively, in all architectures that I know of) 10:36 <+bridge> [ddnet] if you are gonna talk about how the compiler will change your logic 10:36 <+bridge> [ddnet] i agree with you 100% now 10:36 <+bridge> [ddnet] [chillerdragon](https://matrix.to/#/@chillerdragon:matrix.org)\: 10:36 <+bridge> [ddnet] you got me understand that better than i did before 10:36 <+bridge> [ddnet] you can type `register int x` in C 10:36 <+bridge> [ddnet] you cannot take an address of this variable 10:37 <+bridge> [ddnet] even though the compiler might put this into main memory 10:37 <+bridge> [ddnet] it's still an l-value 10:37 <+bridge> [ddnet] interesting, i have to admit i never use register and im n ot an expert but 10:37 <+bridge> [ddnet] as i knew it is just a restriction to enforce safety somehow 10:37 <+bridge> [ddnet] You take the address of something it immediately becomes an r-value if we are talking C 10:37 <+bridge> [ddnet] like visiblity modificators in classes 10:38 <+bridge> [ddnet] You are using an abstract machine concept but trying to apply it to silicon, which is what is causing your problems imo 10:38 <+bridge> [ddnet] thus it has its l-value but the compiler will stop building if it detects you are using it 10:38 <+bridge> [ddnet] why you say that 10:38 <+bridge> [ddnet] I can still assign to it 10:38 <+bridge> [ddnet] i use the words l-value and r-value just for rapidity 10:38 <+bridge> [ddnet] that's most of what being an l-value is about 10:38 <+bridge> [ddnet] i intend address and value 10:39 <+bridge> [ddnet] for me, an l-value is something you can assign to 10:39 <+bridge> [ddnet] "Has an l-value" isn't really a thing. An expression can be an lvalue expression or an rvalue expression. There is no silicon equivalent of "expression" 10:39 <+bridge> [ddnet] and an r-value is a value you cannot assign to 10:39 <+bridge> [ddnet] agree 10:40 <+bridge> [ddnet] dude i dont really understand you xD 10:40 <+bridge> [ddnet] there is no operations there are just electrical impulses that changes voltages 10:40 <+bridge> [ddnet] so? xd 10:40 <+bridge> [ddnet] i positioned myself on the abstraction layer that C creates for you 10:40 <+bridge> [ddnet] and i consider that as truth 10:41 <+bridge> [ddnet] as i consider linear time as a truth even if its not like that 10:41 <+bridge> [ddnet] Lvalue is a misnomer for address. Rvalue is a misnomer for value. 10:41 <+bridge> [ddnet] 10:41 <+bridge> [ddnet] They do not correspond 10:41 <+bridge> [ddnet] if you dont like the term address i can use "place in memory" 10:42 <+bridge> [ddnet] i dont see the mistake honestly 10:42 <+bridge> [ddnet] This is why I said terminology is very important if you want to learn a language or programming in general at this level. If you care about very pedantic things you'll need to learn very accurate terms for things 10:42 <+bridge> [ddnet] or at least that might explain why @Learath2 and I had strong opinions on it ^^ 10:43 <+bridge> [ddnet] if we have different definitions, then it explains the misunderstanding 10:43 <+bridge> [ddnet] before trying to teach me how to learn something 10:43 <+bridge> [ddnet] let me understand why l-value and r-value i used wrongly 10:43 <+bridge> [ddnet] `An lvalue (locator value) represents an object that occupies some identifiable location in memory (i.e. has an address). rvalues are defined by exclusion.` 10:43 <+bridge> [ddnet] Aand there he goes on the defensive. I'm out. Food awaits 10:43 <+bridge> [ddnet] that's wikipedia, tell me what im missing 10:43 <+bridge> [ddnet] wtf dude im not going defensive 10:43 <+bridge> [ddnet] hum? 10:43 <+bridge> [ddnet] maybe you went aggressive? xd 10:44 <+bridge> [ddnet] both sides: try to not psychologically analyze the other person 10:44 <+bridge> [ddnet] > [10:43 AM] f.: before trying to teach me how to learn something 10:44 <+bridge> [ddnet] I don't think this is conducive to a discussion and I don't have the energy for a hostile one, if you want to go on feel free. I don't feel like it today 10:45 <+bridge> [ddnet] i just meant to say that it would be more useful to me if you just tell me specifically what is wrong about what i said about l-values and r-values 10:45 <+bridge> [ddnet] that just saying i should learn how to use the technical terms better 10:45 <+bridge> [ddnet] I think l-value means "something that can be assigned to" 10:45 <+bridge> [ddnet] and r-value is the rest 10:46 <+bridge> [ddnet] i.e. an address as it says 10:46 <+bridge> [ddnet] someone calls l-value locator value 10:46 <+bridge> [ddnet] if there is something im missing id like to know more ^^ 10:46 <+bridge> [ddnet] the l in l-value most certainly comes from "left" 10:46 <+bridge> [ddnet] yeye i know xd 10:47 <+bridge> [ddnet] `An lvalue is an expression with object type`. If you want a more layman form of it `something that can be assigned to` also works fine since that was actually how it was initially defined. If something can appear on the left side of an assignment it's an l-value 10:48 <+bridge> [ddnet] `L-value: “l-value” refers to memory location which identifies an object. l-value may appear as either left hand or right hand side of an assignment operator(=).` 10:48 <+bridge> [ddnet] whats wrong with this statement 10:49 <+bridge> [ddnet] `int array[10];`, `array` is an lvalue as it's an expression with object type, however it's not a modifiable l-value, so it can't appear on the LHS of an assignment 10:50 <+bridge> [ddnet] for now there is no "silicon" stuff involved 10:50 <+bridge> [ddnet] so i still dont understand 10:50 <+bridge> [ddnet] its something conceptual 10:50 <+bridge> [ddnet] l-value is the location, r-value is the value 10:50 <+bridge> [ddnet] i still dont understand whats wrong with this statement 10:51 <+bridge> [ddnet] An lvalue is a type of expression. It's not the address. It refers to an object, it doesn't say anything about whether it's in memory or in a register or whatever physical location it might be 10:51 <+bridge> [ddnet] i dont agree that its a type of expression 10:51 <+bridge> [ddnet] it can be used in an expression 10:51 <+bridge> [ddnet] its an operand 10:52 <+bridge> [ddnet] The standard is fairly clear on what an lvalue is 10:52 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989090381876592680/Screenshot_2022-06-22_at_10.51.46.png 10:52 <+bridge> [ddnet] operands xD 10:52 <+bridge> [ddnet] `*(int *)123` is an l-value 10:52 <+bridge> [ddnet] yes! 10:52 <+bridge> [ddnet] that is an expression 10:52 <+bridge> [ddnet] ... 10:53 <+bridge> [ddnet] &a; is an expression 10:53 <+bridge> [ddnet] 5; is an expression 10:53 <+bridge> [ddnet] what are we talking about here? 10:53 <+bridge> [ddnet] without the semicolon, yes 10:53 <+bridge> [ddnet] 5; is a statement 10:53 <+bridge> [ddnet] 5 is an expression 10:53 <+bridge> [ddnet] 5 is an r-value 10:53 <+bridge> [ddnet] ok i see we are playing with words here 10:53 <+bridge> [ddnet] &a is an r-value 10:53 <+bridge> [ddnet] ok an expression without operators and just operands are still expressions 10:53 <+bridge> [ddnet] i can agree, so l-value even without operands is an expression 10:54 <+bridge> [ddnet] This one is the one I think is causing confusion here 10:54 <+bridge> [ddnet] still doesnt make me understand what is wrong about my l-value r-value interpretations 10:54 <+bridge> [ddnet] `*((int *)x + 5)` is still an l-value 10:54 <+bridge> [ddnet] even though it contains "operands" 10:54 <+bridge> [ddnet] yes 10:54 <+bridge> [ddnet] explain me this pls 10:55 <+bridge> [ddnet] maybe this is the thing 😛 10:55 <+bridge> [ddnet] `&a` is an address, but it's an r-value. if you define l-value as address, then you get misled 10:55 <+bridge> [ddnet] why &a is r-value? 10:55 <+bridge> [ddnet] because I cannot assign to it 10:55 <+bridge> [ddnet] ooooooooooooooh w8 maybe im getting it 10:55 <+bridge> [ddnet] I cannot say `&a = &b` 10:55 <+bridge> [ddnet] By heinrich's easy definition, it can't appear on the left side, so it's not an l-value 10:55 <+bridge> [ddnet] okok maybe im understang better 10:56 <+bridge> [ddnet] it just depends on the position because ofc everything is just a number 10:56 <+bridge> [ddnet] so you say &a even if its the address it can be considered r-value inside an expression 10:57 <+bridge> [ddnet] `&a` is always an r-value, in every context 10:58 <+bridge> [ddnet] no w8 i still have a doubt 10:58 <+bridge> [ddnet] When you write `&a` you mean `address of a` which is just a normal value 10:58 <+bridge> [ddnet] &a is the r-value 10:58 <+bridge> [ddnet] but a is the l-value? 10:58 <+bridge> [ddnet] `The unary & (address-of) operator requires an l-value as its operand. That is, &n is a valid expression only if n is an l-value. Thus, an expression such as &12 is an error. Again, 12 does not refer to an object, so it’s not addressable. For instance, ` 10:59 <+bridge> [ddnet] `a` is an lvalue, `&a` is an rvalue. Yep 10:59 <+bridge> [ddnet] okok ... but this brings me at the start xD 10:59 <+bridge> [ddnet] a has l-value and r-value 10:59 <+bridge> [ddnet] made a shit error just for u 10:59 <+bridge> [ddnet] ``` 10:59 <+bridge> [ddnet] test.cpp:11:11: error: cannot bind non-const lvalue reference of type ‘int*&’ to an rvalue of type ‘int*’ 10:59 <+bridge> [ddnet] 11 | PrintInt(&a); 10:59 <+bridge> [ddnet] ``` 11:00 <+bridge> [ddnet] ye xD 11:00 <+bridge> [ddnet] `&a = p; // error: &a is an r-value` 11:00 <+bridge> [ddnet] yes that would have been easier to do 11:02 <+bridge> [ddnet] @Learath2 ok maybe i understand 11:03 <+bridge> [ddnet] `int a = 0;`. `a` is an object. `a` is also an l-value. `a` has a value it's `0` 11:03 <+bridge> [ddnet] &a : a is the r-value of this subexpression 11:03 <+bridge> [ddnet] &a : a is the l-value of this subexpression 11:03 <+bridge> [ddnet] and &a is the l-value of the entire expression 11:04 <+bridge> [ddnet] &a is the address, &a is an r-value 11:04 <+bridge> [ddnet] but a is an l-value 11:04 <+bridge> [ddnet] yes 11:04 <+bridge> [ddnet] the expression `a` is an l-value 11:04 <+bridge> [ddnet] yes yes i think i get it 11:05 <+bridge> [ddnet] its a composed expression so you have to treat l-values and r-values differently in every sub-expression 11:06 <+bridge> [ddnet] As you apply operators and functions, you can go from an l-value to an r-value. `a` is an l-value, we apply the `&` operator, we get `&a` an r-value, we apply the `*` operator, we get `*a` an l-value 11:07 <+bridge> [ddnet] Isn't that you by any chance?) 11:07 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989094240082599976/unknown.png 11:07 <+bridge> [ddnet] or we apply the `sizeof` operator, `sizeof a` and we get a r-value 11:07 <+bridge> [ddnet] yes i think im starting to get that this terminology is very related to expressions 11:07 <+bridge> [ddnet] its not a general thing about variables 11:08 <+bridge> [ddnet] Yes, that's all I ever wanted to say 11:08 <+bridge> [ddnet] doubt 11:08 <+bridge> [ddnet] so i should say that l-values are typically addresses and r-values are typically just values inside an expression 11:08 <+bridge> [ddnet] @Learath2 is this more correct? 11:08 <+bridge> [ddnet] nope xd but i probably stole the icon from him 11:08 <+bridge> [ddnet] i remembered changing the color 11:09 <+bridge> [ddnet] l-values refer to objects, r-values don't. That's how I'd think about it 11:09 <+bridge> [ddnet] you should always add "inside expressions" 11:09 <+bridge> [ddnet] right? 11:09 <+bridge> [ddnet] Because when you say l-values are addresses, you get the issue of `&a` which is an r-value but is the address of a 11:09 <+bridge> [ddnet] yes thats what enlightned me 11:09 <+bridge> [ddnet] heinrich gets to the point quickly xd 11:10 <+bridge> [ddnet] Well normally it's implied. When you talk about something being an lvalue or an rvalue, you are always talking about an expression 11:10 <+bridge> [ddnet] yeye was just to be sure 11:10 <+bridge> [ddnet] i think im getting this better now 11:10 <+bridge> [ddnet] @Learath2 but do you agree with me that this is not silicon related stuff? 11:10 <+bridge> [ddnet] its an higher level concept as i see it 11:11 <+bridge> [ddnet] Well obviously, this is a concept of the abstract machine. That's why I was not sure why you were talking about silicon and lvalues 11:11 <+bridge> [ddnet] okok now i think thats clear 11:11 <+bridge> [ddnet] thank you^^ 11:12 <+bridge> [ddnet] About the original meme, I'm not sure if you don't take anya pointing as meaning this is a pointer, then there is some truth to it 11:12 <+bridge> [ddnet] i still think the meme is right xD 11:12 <+bridge> [ddnet] at a certain level of abstraction 11:12 <+bridge> [ddnet] we were talking about the misuse of l-value and r-value terminology now 11:12 <+bridge> [ddnet] But I think anya should probably just not be pointing in the last frame and instead have a 69 on her forehead 11:12 <+bridge> [ddnet] i agree i should use address and values not a synonyms of that 11:13 <+bridge> [ddnet] yes thats probably a better representation 11:13 <+bridge> [ddnet] maybe she could "puke" the number xd 11:13 <+bridge> [ddnet] Or that 11:13 <+bridge> [ddnet] i dont like the second one pointing to "int" 11:13 <+bridge> [ddnet] thats not right for me 11:13 <+bridge> [ddnet] where is the value? 11:14 <+bridge> [ddnet] but ye, she should "contain" it, not poiting at it 11:14 <+bridge> [ddnet] what i didnt like most that int had no anya on it 11:14 <+bridge> [ddnet] why? its a variable like int* 11:15 <+bridge> [ddnet] `int anya1 = 69; int *anya2 = &anya1; int **anya3 = &anya2` This is sort of the mental picture I'd have about the meme 11:15 <+bridge> [ddnet] anya? 11:15 <+bridge> [ddnet] exactly 11:15 <+bridge> [ddnet] https://tenor.com/view/anya-anya-forger-anya-spy-x-family-anime-anya-spy-x-family-spy-x-family-gif-25682632 11:17 <+bridge> [ddnet] a sad turd, thanks discord 11:17 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989096782715838484/unknown.png 11:18 <+bridge> [ddnet] 💩 @murpi for you 11:18 <+bridge> [ddnet] 💩 11:18 <+bridge> [ddnet] 💩 12:00 <+bridge> [ddnet] Damn i missed s interesting convo 12:01 <+bridge> [ddnet] I love how that meme sparked this tho 12:01 <+bridge> [ddnet] :TOOBASED: 12:14 <+bridge> [ddnet] You wouldn't like it, it was about C, very pedantic C at that 12:15 <+bridge> [ddnet] Yeah 12:15 <+bridge> [ddnet] Im still interested thi 12:15 <+bridge> [ddnet] Tho 12:16 <+bridge> [ddnet] All the l,r,pr values i alwsys gotta check up their definitions again and again 12:16 <+bridge> [ddnet] Its not something i actively think of when coding in c++ honestly xD 12:17 <+bridge> [ddnet] https://tenor.com/view/anime-spy-x-family-anya-forger-blinking-eyes-blink-gif-25561803 12:20 <+bridge> [ddnet] The face i make when i see another memory unsafety or race due to c++ usage 12:21 <+bridge> [ddnet] :TOOBASED: 12:23 <+bridge> [ddnet] @Ryozuki afaik C only has rvalues and lvalues 12:23 <+bridge> [ddnet] it's C++ that goes overboard 😛 12:24 <+bridge> [ddnet] Me neither, except when thinking about rvalue references and perfect forwarding. These concepts are more used when talking about C/C++ rather than coding 12:25 <+bridge> [ddnet] perfect forwarding? 12:25 <+bridge> [ddnet] `std::forward` 12:25 <+bridge> [ddnet] For when you do template magic 12:26 <+bridge> [ddnet] hmm, I guess I'm going to learn some C++ today 12:26 <+bridge> [ddnet] do you happen to know whether the thing `std::forward` does is automatic in rust? 12:27 <+bridge> [ddnet] https://eli.thegreenplace.net/2014/perfect-forwarding-and-universal-references-in-c this was one of the readings that made it click for me 12:28 <+bridge> [ddnet] I dont know rust remotely well enough to know if that applies 12:28 <+bridge> [ddnet] I think you get sane code in rust in similar situations without the need of something like std::forward 12:29 <+bridge> [ddnet] okay 12:31 <+bridge> [ddnet] okay, I think it's automatic in rust due to the way how moves are the default 12:31 <+bridge> [ddnet] ```c++ 12:31 <+bridge> [ddnet] template 12:31 <+bridge> [ddnet] void wrapper(T1 e1, T2 e2) { 12:31 <+bridge> [ddnet] func(e1, e2); 12:31 <+bridge> [ddnet] } 12:31 <+bridge> [ddnet] ``` 12:31 <+bridge> [ddnet] this is the example that the article is saying 'obviously' doesn't work, but I think it's the correct way to write it in rust 12:32 <+bridge> [ddnet] I think so too but I can't say it with any certainty 12:34 <+bridge> [ddnet] [murpi](https://matrix.to/#/@murpi:matrix.org)\: bra 12:34 <+bridge> [ddnet] > The result is the reference collapsing rule. The rule is very simple. `&` always wins. So `& &` is `&`, and so are `&& &` and `& &&`. The only case where `&&` emerges from collapsing is `&& &&`. You can think of it as a logical-OR, with `&` being 1 and `&&` being 0. 12:34 <+bridge> [ddnet] oh, TIL these reference collapsing rules 12:34 <+bridge> [ddnet] quite simple, even 🙂 12:35 <+bridge> [ddnet] thats for rust right? 12:35 <+bridge> [ddnet] no 12:35 <+bridge> [ddnet] ah 12:36 <+bridge> [ddnet] thanks, that article was quite clear 12:37 <+bridge> [ddnet] @Learath2 do you also have an article about move references? 12:37 <+bridge> [ddnet] rust auto derefs multple & to a single & iirc 12:37 <+bridge> [ddnet] if you use it in a place where & is acceptable but not &&&&… 12:37 <+bridge> [ddnet] yeah 12:38 <+bridge> [ddnet] I don't have a good model of move references 12:39 <+bridge> [ddnet] Move references as in rvalue references? 12:39 <+bridge> [ddnet] I mean && references, not & references 12:39 <+bridge> [ddnet] probably rvalue 12:39 <+bridge> [ddnet] do they behave as the actual value type inside the function? 12:39 <+bridge> [ddnet] Hm, I do remember I read a really nice blog on them but I can't seem to remember who wrote it 12:39 <+bridge> [ddnet] and only parameter passing is different? 12:41 <+bridge> [ddnet] https://www.cambus.net/clang-static-analyzer-and-the-z3-constraint-solver/ 12:41 <+bridge> [ddnet] helps filter false positives 12:48 <+bridge> [ddnet] Z3 is fun, I'm impressed if they only get a 15x slowdown for larger programs. I co-wrote a paper a while ago using constraint solvers to find regressions: http://felsin9.de/nnis/pubs/ase2014.pdf 12:51 <+bridge> [ddnet] Couldn't find the blog post :/ 12:52 <+bridge> [ddnet] @heinrich5991 rvalue references are lvalue expressions inside functions confusingly enough 12:52 <+bridge> [ddnet] so they behave like a bare parameter? 12:52 <+bridge> [ddnet] inside the function 12:52 <+bridge> [ddnet] (Or anywhere else, but you mostly use them in functions) 12:53 <+bridge> [ddnet] they also don't reference memory outside the function, do they? 12:53 <+bridge> [ddnet] Bare? Idk what that'd imply but yes they do act like any other parameter 12:53 <+bridge> [ddnet] well, a & reference parameter changes the variable that was passed if I change it inside the function 12:54 <+bridge> [ddnet] Newer C version that runs online: https://formal.kastel.kit.edu/projects/improve/reve/ 12:55 <+bridge> [ddnet] AIUI, the && reference behaves the same as no reference at all inside the function; the difference is that you cannot pass lvalues to it directly 12:56 <+bridge> [ddnet] ChillerDragon: I got dmed by someone on Discord with ur name, that wasn't you, right? 13:01 <+bridge> [ddnet] ChillerDragon: I got dmed by someone with ur name on Discord, that wasn't you, right? 13:25 <+bridge> [ddnet] I don't think that's quite correct, an rvalue reference can reference outside the function afaik 14:11 <+bridge> [ddnet] @Learath2 so it's more like a reference, but you're allowed to move out of it? 14:14 <+bridge> [ddnet] hm no, I think I have to think about it some more 14:31 <+bridge> [ddnet] Can someone tell me if the like `(void)pMsg;` can be omitted or does it do anything? 14:31 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989145494552989746/unknown.png 14:31 <+bridge> [ddnet] Can someone tell me if the line `(void)pMsg;` can be omitted or does it do anything? 14:32 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989145494552989746/unknown.png 14:32 <+bridge> [ddnet] I'm only wondering what it does or if it was there because of the old C age. 14:32 <+bridge> [ddnet] i think it does nothing 14:33 <+bridge> [ddnet] Casting to void is used to suppress compiler warnings. The Standard says in §5.2.9/4 says, 14:33 <+bridge> [ddnet] 14:33 <+bridge> [ddnet] Any expression can be explicitly converted to type “cv void.” The expression value is discarded. 14:33 <+bridge> [ddnet] maybe if pmsg was unused at some point in history this was added 14:34 <+bridge> [ddnet] Ah makes sense 14:34 <+bridge> [ddnet] Like this: 14:34 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989146333849997372/unknown.png 14:34 <+bridge> [ddnet] ye 14:34 <+bridge> [ddnet] thank you 😄 15:49 <+bridge> [ddnet] https://blog.cloudflare.com/cloudflare-outage-on-june-21-2022/ @Ryozuki 16:15 <+bridge> [ddnet] good read 16:15 <+bridge> [ddnet] it also led me to read something else about their Quicksilver DB 16:16 <+bridge> [ddnet] Ye i read it yesterfay 16:16 <+bridge> [ddnet] Cloudflare is always on point with their blogposts 16:16 <+bridge> [ddnet] they posted it just some hours after it happens 16:16 <+bridge> [ddnet] they are also fast af 16:16 <+bridge> [ddnet] they posted it just some hours after it happened 16:17 <+bridge> [ddnet] fast to serve, fast to fail, fast to tell the world about how they failed 16:17 <+bridge> [ddnet] honorable 16:17 <+bridge> [ddnet] i wonder 16:18 <+bridge> [ddnet] they are the reason half internet dies when they go down 16:18 <+bridge> [ddnet] centralization bad 16:18 <+bridge> [ddnet] agree 16:18 <+bridge> [ddnet] its like facebook 16:18 <+bridge> [ddnet] their engineers 16:18 <+bridge> [ddnet] but matrix sucks 16:18 <+bridge> [ddnet] are top top notch 16:18 <+bridge> [ddnet] have u seen their blog posts? 16:18 <+bridge> [ddnet] but the corporation sucks 16:18 <+bridge> [ddnet] i haven't no 16:19 <+bridge> [ddnet] the protocol is super convoluted and not a great base for open communication 16:19 <+bridge> [ddnet] my friend probably has more details about it 16:20 <+bridge> [ddnet] it's a functional implementation of decentralized chatting but apparently not ideal 16:20 <+bridge> [ddnet] https://engineering.fb.com/2022/06/20/data-infrastructure/transparent-memory-offloading-more-memory-at-a-fraction-of-the-cost-and-power/ 16:20 <+bridge> [ddnet] centralization necessary to prevent ddos 16:20 <+bridge> [ddnet] rip 16:20 <+bridge> [ddnet] =[ 16:21 <+bridge> [ddnet] i wonder 16:21 <+bridge> [ddnet] wait 16:21 <+bridge> [ddnet] Vali: Write that down, write that down 16:21 <+bridge> [ddnet] why does the tsin smile look wrong as a frown 16:21 <+bridge> [ddnet] but good as a smile 16:21 <+bridge> [ddnet] is this just psychology 16:21 <+bridge> [ddnet] vali should ddos cloudflare, they are a big company maybe they can get him into a jail cell 16:21 <+bridge> [ddnet] LMAO 16:22 <+bridge> [ddnet] vali would feel like someone poking to them 16:22 <+bridge> [ddnet] He can't because he does not have any power that could take down even 0.001% of their services 16:22 <+bridge> [ddnet] nice nick u got btw 16:22 <+bridge> [ddnet] same message different words 16:24 <+bridge> [ddnet] he also lacks cuz of knowledge 16:27 <+bridge> [ddnet] @lynn could you give me some links to read up on criticism on the matrix protocol? 16:27 <+bridge> [ddnet] ill try to find some 16:27 <+bridge> [ddnet] afaik he tried to but failed, from someone that told me 16:28 <+bridge> [ddnet] we should donate, so he can afford bigger ddos 16:30 <+bridge> [ddnet] mlao 16:30 <+bridge> [ddnet] lmao 16:30 <+bridge> [ddnet] day 14 of remembering Learath is not 30 16:30 <+bridge> [ddnet] let's keep the streak going 16:30 <+bridge> [ddnet] i think learath is 24 16:31 <+bridge> [ddnet] im 22 btw 16:31 <+bridge> [ddnet] correct 16:31 <+bridge> [ddnet] @Patiga how old are you? 16:31 <+bridge> [ddnet] what we gonna do to this fat guys 16:31 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989175891328376842/unknown.png 16:32 <+bridge> [ddnet] wrong channel bro 16:32 <+bridge> [ddnet] #reports 16:32 <+bridge> [ddnet] also did you know that Patiga has a nice voice 16:32 <+bridge> [ddnet] uwu 16:32 <+bridge> [ddnet] I do not know if we changed something for building related to ASAN, but when I build using 16:32 <+bridge> [ddnet] `CC=clang CXX=clang++ CXXFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" CFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" cmake -DCMAKE_BUILD_TYPE=Debug ..` 16:32 <+bridge> [ddnet] `make -j$(nproc)` 16:32 <+bridge> [ddnet] I get a lot of the following warnings: 16:32 <+bridge> [ddnet] `/usr/bin/ld.gold: warning: Cannot export local symbol '__asan_extra_spill_area'` 16:33 <+bridge> [ddnet] @lynn I keep that information kinda private, sorry 16:33 <+bridge> [ddnet] LAME 16:33 <+bridge> [ddnet] :p 16:33 <+bridge> [ddnet] that's fair 16:33 <+bridge> [ddnet] asking someone ages 16:33 <+bridge> [ddnet] rude smh 16:33 <+bridge> [ddnet] you still have a nice voice sorry 16:33 <+bridge> [ddnet] doxxed i guess 16:33 <+bridge> [ddnet] thanks ^^ 16:33 <+bridge> [ddnet] i used to care alot about that, when i was 15 that is 16:35 <+bridge> [ddnet] At least I think I did not have these warnings before 16:39 <+bridge> [ddnet] Has someone in the last time also compiled with ASAN? 17:02 <+bridge> [ddnet] same 17:13 <+bridge> [ddnet] ``` 17:13 <+bridge> [ddnet] ================================================================= 17:13 <+bridge> [ddnet] ==14741==ERROR: LeakSanitizer: detected memory leaks 17:13 <+bridge> [ddnet] 17:13 <+bridge> [ddnet] Direct leak of 216320 byte(s) in 3 object(s) allocated from: 17:13 <+bridge> [ddnet] #0 0x4e11df (/home/arda/ddnet/build/DDNet+0x4e11df) 17:14 <+bridge> [ddnet] #1 0x56b9d5 (/home/arda/ddnet/build/DDNet+0x56b9d5) 17:14 <+bridge> [ddnet] #2 0x54ab3a (/home/arda/ddnet/build/DDNet+0x54ab3a) 17:14 <+bridge> [ddnet] #3 0x9b63fb (/home/arda/ddnet/build/DDNet+0x9b63fb) 17:14 <+bridge> [ddnet] #4 0x9b2308 (/home/arda/ddnet/build/DDNet+0x9b2308) 17:14 <+bridge> [ddnet] #5 0x1d9cb53 (/home/arda/ddnet/build/DDNet+0x1d9cb53) 17:14 <+bridge> [ddnet] #6 0x7fa3b5532ead (/usr/lib/libpthread.so.0+0x8ead) 17:14 <+bridge> [ddnet] 17:14 <+bridge> [ddnet] Direct leak of 6240 byte(s) in 3 object(s) allocated from: 17:14 <+bridge> [ddnet] #0 0x4e1387 (/home/arda/ddnet/build/DDNet+0x4e1387) 17:14 <+bridge> [ddnet] #1 0x7fa3aaad1251 (/usr/lib64/dri/radeonsi_dri.so+0xbb5251) 17:14 <+bridge> [ddnet] 17:14 <+bridge> [ddnet] Direct leak of 104 byte(s) in 1 object(s) allocated from: 17:14 <+bridge> [ddnet] #0 0x4e1548 (/home/arda/ddnet/build/DDNet+0x4e1548) 17:14 <+bridge> [ddnet] #1 0x7fa3b7af7a11 (/usr/lib/libSDL2-2.0.so.0+0x9da11) 17:14 <+bridge> [ddnet] 17:14 <+bridge> [ddnet] SUMMARY: AddressSanitizer: 222664 byte(s) leaked in 7 allocation(s). 17:14 <+bridge> [ddnet] ``` 17:14 <+bridge> [ddnet] 17:14 <+bridge> [ddnet] Hmm, i get this message when i close the game 17:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1 17:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/2 17:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/3 17:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/4 17:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/5 17:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/6 17:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1 17:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1 17:14 <+bridge> [ddnet] uh 17:14 <+bridge> [ddnet] looks normal... we did not fix these for a while 17:15 <+bridge> [ddnet] LMAO 17:15 <+bridge> [ddnet] tho the debug symbols are missing... but I guess these are the normal leaks 17:15 <+bridge> [ddnet] ddnet bot just SHIT itself hard 17:16 <+bridge> [ddnet] why is it missing? i add -DCMAKE_BUILD_TYPE=Debug 17:16 <+bridge> [ddnet] did you build in a clean diretory 17:17 <+bridge> [ddnet] yes 17:17 <+bridge> [ddnet] also -- Build type: Debug 17:20 <+bridge> [ddnet] I do not even get these leaks currently, but for me the log normaly contains code lines, and function names 17:23 <+bridge> [ddnet] like this 17:23 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989188909089034240/message.txt 17:26 <+bridge> [ddnet] memory is so hard to make right in C++ xD 17:27 <+bridge> [ddnet] thats why rustexists 17:27 <+bridge> [ddnet] :BASED: 17:27 <+bridge> [ddnet] thats why rust exists 17:27 <+bridge> [ddnet] bruh 17:27 <+bridge> [ddnet] https://tenor.com/view/anya-anya-forger-anya-spy-x-family-anime-anya-spy-x-family-spy-x-family-gif-25682632 17:28 <+bridge> [ddnet] true. I only wished Rust is more easily readable ^^ 17:28 <+bridge> [ddnet] @c0d3d3v try with ld instead of gold 17:29 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989190480459886592/Screenshot_2022-06-22-17-29-14-942_com.discord.jpg 17:29 <+bridge> [ddnet] I hate that code in mobile looks white on dark mode 17:30 <+bridge> [ddnet] Unreadable 17:30 <+bridge> [ddnet] is there an option to use ld? 17:32 <+bridge> [ddnet] -DFUSE_LD=ld 17:33 <+bridge> [ddnet] btw. I'm nearly finished with the requests heinrich had for ... (I hope) I only have to fix this heap-buffer-overflow xD 17:33 <+bridge> [ddnet] Then we can finaly move DDNetCharacterDisplayInfo in DDNetCharacter 17:36 <+bridge> [ddnet] Took me way longer then I expected. My first idea hadn't worked out, and I needed to find out a lot more about our snap system.... But the solution I have now should be quite acceptable, if it works 😄 17:39 <+bridge> [ddnet] worked 17:40 <+bridge> [ddnet] does it fix the asan issues too or just compiler warnings? 17:40 <+bridge> [ddnet] Took me way longer then I expected. My first idea hadn't worked out, and I needed to find out a lot more about our snap system.... But the solution I have now should be quite acceptable, if it works 😄 But at least I have now a very good understanding of our snap-system 17:40 <+bridge> [ddnet] I'm wondering if we should use ld again 😄 17:40 <+bridge> [ddnet] all this LTO and ld stuff caused more problems than it solved 17:41 <+bridge> [ddnet] for me asan also worked with the warning (at least it detected the heap-buffer-overflow and an other mem_copy error from me). But with ld there are no warnings. 17:43 <+bridge> [ddnet] and the output is the same 😄 as before 17:43 <+bridge> [ddnet] only @nori had no debug symbols in the asan output, but I guess that is an other problem 17:47 <+bridge> [ddnet] btw https://github.com/ddnet/ddnet/blob/f8810aeef88fa907c4d035c198d3c50055acbaaf/ubsan.supp#L1, we don't use pnglite anymore right? 17:49 <+bridge> [ddnet] ``` CCharacter *pLocalChar = m_pClient->m_GameWorld.GetCharacterByID(m_pClient->m_Snap.m_LocalClientID); ``` 17:50 <+bridge> [ddnet] return null when use spec. but you need to get a variable for the local player, is it possible to do this during spec? 17:50 <+bridge> [ddnet] ``` CCharacter *pLocalChar = m_pClient->m_GameWorld.GetCharacterByID(m_pClient->m_Snap.m_LocalClientID); ``` 17:50 <+bridge> [ddnet] return null when use spec. but i need to get a variable for the local player, is it possible to do this during spec? 17:53 <+bridge> [ddnet] for this 17:53 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989196514008109197/unknown.png 17:56 <+bridge> [ddnet] @nori install llvm-symbolizer 17:56 <+bridge> [ddnet] if it's in $PATH, then the symbols should be automagically resolved 17:56 <+bridge> [ddnet] yes, you can make a PR to remove this 17:59 <+bridge> [ddnet] woırked :) 17:59 <+bridge> [ddnet] worked :) 18:00 <+bridge> [ddnet] ``` 18:00 <+bridge> [ddnet] ================================================================= 18:00 <+bridge> [ddnet] ==4866==ERROR: LeakSanitizer: detected memory leaks 18:00 <+bridge> [ddnet] 18:00 <+bridge> [ddnet] Direct leak of 216320 byte(s) in 3 object(s) allocated from: 18:00 <+bridge> [ddnet] #0 0x4e11df in malloc (/home/arda/ddnet/build/DDNet+0x4e11df) 18:00 <+bridge> [ddnet] #1 0x56b9d5 in CCommandProcessorFragment_OpenGL2::Cmd_CreateBufferObject(CCommandBuffer::SCommand_CreateBufferObject const*) /home/arda/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1901:25 18:00 <+bridge> [ddnet] #2 0x54ab3a in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/arda/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1107:49 18:00 <+bridge> [ddnet] #3 0x9b63fb in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/arda/ddnet/src/engine/client/backend_sdl.cpp:248:20 18:00 <+bridge> [ddnet] #4 0x9b2308 in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/arda/ddnet/src/engine/client/backend_sdl.cpp:77:25 18:00 <+bridge> [ddnet] #5 0x1d9cb53 in thread_run(void*) /home/arda/ddnet/src/base/system.cpp:721:2 18:00 <+bridge> [ddnet] #6 0x7ffaf5e76ead in start_thread /builddir/glibc-2.32/nptl/pthread_create.c:463:8 18:00 <+bridge> [ddnet] 18:00 <+bridge> [ddnet] Direct leak of 6240 byte(s) in 3 object(s) allocated from: 18:00 <+bridge> [ddnet] #0 0x4e1387 in calloc (/home/arda/ddnet/build/DDNet+0x4e1387) 18:01 <+bridge> [ddnet] #1 0x7ffaeb3f8251 (/usr/lib64/dri/radeonsi_dri.so+0xbb5251) 18:01 <+bridge> [ddnet] 18:01 <+bridge> [ddnet] Direct leak of 104 byte(s) in 1 object(s) allocated from: 18:01 <+bridge> [ddnet] #0 0x4e1548 in realloc (/home/arda/ddnet/build/DDNet+0x4e1548) 18:01 <+bridge> [ddnet] #1 0x7ffaf843ba11 (/usr/lib/libSDL2-2.0.so.0+0x9da11) 18:01 <+bridge> [ddnet] 18:01 <+bridge> [ddnet] SUMMARY: AddressSanitizer: 222664 byte(s) leaked in 7 allocation(s). 18:01 <+bridge> [ddnet] ``` 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/2 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/3 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/4 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/5 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/6 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1 18:01 <+bridge> [ddnet] this bot :d 18:02 <+bridge> [ddnet] I don't know who made this bot, but I think we don't need linking github issues with # . @Learath2 can you remove that from the bot? 18:02 <+bridge> [ddnet] It's the DDNet#9607 bot 18:13 <+bridge> [ddnet] #6 18:13 <+bridge> [ddnet] I made it ;( 18:15 <+bridge> [ddnet] don't delete it 😄 it's learn material for me 18:21 <+bridge> [ddnet] Then maybe don't detect # numbers inside of monospace blocks? 18:35 <+bridge> [ddnet] this is only the predicted character. There is no prediction done when you spectate... so you have to use the real data. 18:37 <+bridge> [ddnet] You could use `CCharacterCore *pCharacter = &m_pClient->m_aClients[ClientID].m_Predicted` if you really nead a CCharacterCore and want the predicted data if available. Thats what I have done in the new hud. But if you do not need predicted data you should use the snap data in m_pClient->m_Snap 18:38 <+bridge> [ddnet] You could use `CCharacterCore *pCharacter = &m_pClient->m_aClients[ClientID].m_Predicted` if you really nead a CCharacterCore and want the predicted data if available. Thats what I have done in the new hud. But if you do not need predicted data you should use the snap data in `m_pClient->m_Snap`, that contains most of data the client got from the server. 18:39 <+bridge> [ddnet] @BloodWod-513 ^ 18:45 <+bridge> [ddnet] i need m_StrongWeakID in CCharacter. Is it not possible to update this for someone who is even in spec? m_StrongWeakID update here 18:45 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989209468283781150/unknown.png 18:46 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989209893460398100/unknown.png 19:00 <+bridge> [ddnet] why would you want it in spec? 19:00 <+bridge> [ddnet] you can not hook anyone in spec 19:00 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989213333896962078/unknown.png 19:00 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989213396224327700/unknown.png 19:00 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989213396496961556/unknown.png 19:01 <+bridge> [ddnet] diff without spec and in spec 19:01 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989213396224327700/unknown.png 19:01 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989213396496961556/unknown.png 19:01 <+bridge> [ddnet] on ddnet server, you can get the m_StrongWeakID from the snap... in extended data. On other servers it is not possible 19:02 <+ChillerDragon> @murpi nah i did not dm you o.O 19:03 <+bridge> [ddnet] m_pClient->m_Snap->m_aCharacters[ClientID]->m_ExtendedData.m_StrongWeakID 19:03 <+bridge> [ddnet] its availibe if m_pClient->m_Snap->m_aCharacters[ClientID]->m_HasExtendedData is true 19:03 <+bridge> [ddnet] ye 19:03 <+bridge> [ddnet] ty 19:03 <+bridge> [ddnet] i try it 19:03 <+bridge> [ddnet] You've got a faker then ^^ 19:03 <+bridge> [ddnet] I would not show m_StrongWeakID when you spectate... it is strange and since it is invalid if you are able to pause... its unnecessary 19:04 <+bridge> [ddnet] I would not show m_StrongWeakID when you spectate... it is strange because you can not hook anyone and since it is invalid if you are able to pause... its unnecessary 19:05 <+bridge> [ddnet] I would not show m_StrongWeakID when you spectate... it is strange because you can not hook anyone and since it is invalid if you are able to pause... its unnecessary. But that is only my opinion 19:06 <+bridge> [ddnet] okay, anyway m_pClient->m_Snap.m_aCharacters[pPlayerInfo->m_ClientID].m_Strong update after exiting spec 19:07 <+bridge> [ddnet] yes 19:07 <+bridge> [ddnet] it's probably better to leave it like this already 19:09 <+bridge> [ddnet] I also wondered why it was done using the predicted data... but that is so, because on other servers you do not have extended data. You could try to implement it, and make a video so that we get a feeling for it if it is good. 19:11 <+bridge> [ddnet] I can try to do this, but I do not know how to update this variable during spec 20:14 <+bridge> [ddnet] it is updated automaticly 20:15 <+bridge> [ddnet] @nori are you ardadem on github? 20:15 <+bridge> [ddnet] yes 20:16 <+bridge> [ddnet] are you really sure you are on latest master? 20:16 <+bridge> [ddnet] yes i am pretty sure :D 20:16 <+bridge> [ddnet] what does `git log` tell as last commit? 20:16 <+bridge> [ddnet] 83479c8f51bb8031aec5efd9b0ac8c428f66bbaa 20:16 <+bridge> [ddnet] which is latest commit 20:18 <+bridge> [ddnet] mh did you build in a clean directory? 20:19 <+bridge> [ddnet] yes 20:19 <+bridge> [ddnet] i know how to build, it is still happening 20:19 <+bridge> [ddnet] just i can't get backtrace :\ 20:24 <+bridge> [ddnet] I will try to reproduce it 😄 20:24 <+bridge> [ddnet] it happens me almost all the time :d easy to reproduce 20:25 <+bridge> [ddnet] probably a driver problem as in the issues Robyt3 linked 20:26 <+bridge> [ddnet] After exit spec 20:26 <+bridge> [ddnet] yes you do not get a new id while in spec 20:27 <+bridge> [ddnet] Then others press kill -> indicator dont display 20:28 <+bridge> [ddnet] @nori are you on wayland? 20:29 <+bridge> [ddnet] yes i am 20:30 <+bridge> [ddnet] I guess it is a wayland driver problem. I can join Back in Time 3 without problem 20:30 <+bridge> [ddnet] If I try it with your enviroment variables ... 20:30 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989235972170477603/message.txt 20:30 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989235972409557062/message.txt 20:30 <+bridge> [ddnet] If I try it with your enviroment variables ... 20:30 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989235972170477603/message.txt 20:30 <+bridge> [ddnet] try only DDNET_DRIVER=GLES 20:30 <+bridge> [ddnet] I can not start the client 20:32 <+bridge> [ddnet] works for me 20:32 <+bridge> [ddnet] no problem 20:33 <+bridge> [ddnet] no idea 20:33 <+bridge> [ddnet] @Not Keks you had wayland installed too right? 20:33 <+bridge> [ddnet] if you have X11 you could try that... For me wayland does not work... 20:34 <+bridge> [ddnet] but i don't think it is driver related, it happens only in back in time 3 20:34 <+bridge> [ddnet] i can join too but with few tries 20:35 <+bridge> [ddnet] It is probably only on that map because a lot of players where there and since it is a big map, some have huge numbers. 20:35 <+bridge> [ddnet] Does it also happen on a empty server with that map? 20:35 <+bridge> [ddnet] It is probably only on that map because a lot of players where there and since it is a big map, some have huge numbers. -> so a lot of potential for overflows 20:35 <+bridge> [ddnet] Does it also happen on a empty server with that map? 20:35 <+bridge> [ddnet] yes it happens on server with no players too 20:38 <+bridge> [ddnet] its a very big map, there is also a hill climb map, try that too. If the driver overflows some buffer it could overflow into the heap area used by our entites... so it could be the driver 20:38 <+bridge> [ddnet] its a very big map, there is also a hill climb map, try that too. If the driver overflows some buffer it could overflow into the heap area used by our entites... so it could be the driver I think 20:38 <+bridge> [ddnet] its a very big map, there is also a big hill climb map, try that too. If the driver overflows some buffer it could overflow into the heap area used by our entites... so it could be the driver I think 20:40 <+bridge> [ddnet] I think it is Chill+Let's+Climb 20:41 <+bridge> [ddnet] it opened in a seconf without problem 20:41 <+bridge> [ddnet] it opened in a second without problem 20:42 <+bridge> [ddnet] I think it is Chill+Let's+Climb (2/3) 20:51 <+bridge> [ddnet] yes but wayland also was the only thing that made problems with SDL2's surface detection for vulkan 20:51 <+bridge> [ddnet] but that was like half a year ago 20:51 <+bridge> [ddnet] i assume its fixed already 20:53 <+bridge> [ddnet] is it same commit as in the issue? or a different? 20:56 <+bridge> [ddnet] u simply didnt use a wayland session 20:56 <+bridge> [ddnet] "unable to init SDL video: wayland not available" 20:56 <+bridge> [ddnet] it fails before it can even start 21:06 <+bridge> [ddnet] I have the commit you said, yes 21:07 <+bridge> [ddnet] it is here 21:07 <+bridge> [ddnet] -,- 21:11 <+bridge> [ddnet] is it can be related to wayland @Not Keks? but it fails on prediction code 21:11 <+bridge> [ddnet] how did u start ddnet? 21:11 <+bridge> [ddnet] yes the code is defs not from latest master 21:11 <+bridge> [ddnet] u somehow use an old client 21:12 <+bridge> [ddnet] do i need to take a video to proof it is from ddnet github :D 21:12 <+bridge> [ddnet] ok, but did you also run asan? 21:12 <+bridge> [ddnet] yes 21:12 <+bridge> [ddnet] but why would it not detect a memory corruption 21:12 <+bridge> [ddnet] the* 21:13 <+bridge> [ddnet] i mean i compiled with it 21:13 <+bridge> [ddnet] export CC=clang 21:13 <+bridge> [ddnet] export CXX=clang++ 21:13 <+bridge> [ddnet] export CXXFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" 21:13 <+bridge> [ddnet] export CFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" 21:13 <+bridge> [ddnet] make -DCMAKE_BUILD_TYPE=Debug ../ 21:14 <+bridge> [ddnet] ok really weird then, i mean could be caused by a different thread maybe 21:14 <+bridge> [ddnet] so yeah maybe wayland somehow writes into ddnet ram 21:14 <+bridge> [ddnet] it is happening to me for a long time, i just didn't report it :D 21:15 <+bridge> [ddnet] could try valgrind 21:15 <+bridge> [ddnet] maybe it finds out more 21:15 <+bridge> [ddnet] valgrind --show-reachable=yes --show-possibly-lost=yes --error-limit=no --log-fd=2 --track-fds=yes --trace-children=yes --redzone-size=256 --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt --fair-sched=yes ./DDNet 21:15 <+bridge> [ddnet] @Not Keks did you also see it? i get it when i close the ddnet 21:16 <+bridge> [ddnet] that means u run opengl 2 21:16 <+bridge> [ddnet] or 3 21:16 <+bridge> [ddnet] it is opengl es 21:16 <+bridge> [ddnet] 3 es 21:16 <+bridge> [ddnet] afaik 21:16 <+bridge> [ddnet] doubt 21:16 <+bridge> [ddnet] GLES 3 uses opengl 3.3 code 21:16 <+bridge> [ddnet] that shouldnt leak any memory™️ 21:16 <+bridge> [ddnet] [2022-06-22 21:44:43][gfx]: GPU vendor: AMD 21:16 <+bridge> [ddnet] [2022-06-22 21:44:43][gfx]: GPU renderer: AMD RENOIR (LLVM 12.0.1, DRM 3.42, 5.15.47_1) 21:16 <+bridge> [ddnet] [2022-06-22 21:44:43][gfx]: GPU version: OpenGL ES 3.2 Mesa 22.1.1 21:16 <+bridge> [ddnet] :q 21:17 <+bridge> [ddnet] wrong window:p 21:17 <+bridge> [ddnet] xd 21:17 <+bridge> [ddnet] and it leaks with that? 21:17 <+bridge> [ddnet] i get it yeah 21:18 <+bridge> [ddnet] nori: is this the line of code it crashed at? "pEnt->m_pParent->m_DestroyTick = GameTick();" 21:19 <+bridge> [ddnet] what does gl_major print in f1? 21:20 <+bridge> [ddnet] i honestly dont see how this is possible 21:20 <+bridge> [ddnet] all gles code is called CCommandProcessorFragment_OpenGL2ES 21:20 <+bridge> [ddnet] why do i have all the weirdest bugs xd 21:20 <+bridge> [ddnet] not CCommandProcessorFragment_OpenGL2 21:21 <+bridge> [ddnet] CCommandProcessorFragment_OpenGLES2 21:23 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989249231124566136/unknown.png 21:23 <+bridge> [ddnet] for me the code doesnt get called 21:23 <+bridge> [ddnet] i dont see how this should be different for u 21:23 <+bridge> [ddnet] @Not Keks i'll try again, maybe i didn't export the gles backend when i get this 21:24 <+bridge> [ddnet] u dont need to export it anymore btw 21:24 <+bridge> [ddnet] u can now just select GLES ingame 21:26 <+bridge> [ddnet] probably i didn't export it before, it was normal opengl 21:26 <+bridge> [ddnet] i get this now 21:26 <+bridge> [ddnet] ``` 21:26 <+bridge> [ddnet] ================================================================= 21:26 <+bridge> [ddnet] ==27217==ERROR: LeakSanitizer: detected memory leaks 21:26 <+bridge> [ddnet] 21:26 <+bridge> [ddnet] Direct leak of 6240 byte(s) in 3 object(s) allocated from: 21:26 <+bridge> [ddnet] #0 0x4e1387 in calloc (/home/arda/ddnet/build/DDNet+0x4e1387) 21:26 <+bridge> [ddnet] #1 0x7eff73a46251 (/usr/lib64/dri/radeonsi_dri.so+0xbb5251) 21:26 <+bridge> [ddnet] 21:26 <+bridge> [ddnet] Direct leak of 104 byte(s) in 1 object(s) allocated from: 21:26 <+bridge> [ddnet] #0 0x4e1548 in realloc (/home/arda/ddnet/build/DDNet+0x4e1548) 21:26 <+bridge> [ddnet] #1 0x7eff80a97a11 (/usr/lib/libSDL2-2.0.so.0+0x9da11) 21:26 <+bridge> [ddnet] 21:26 <+bridge> [ddnet] SUMMARY: AddressSanitizer: 6344 byte(s) leaked in 4 allocation(s). 21:26 <+bridge> [ddnet] ``` 21:26 <+bridge> [ddnet] with gles 21:27 <+bridge> [ddnet] ok 21:27 <+bridge> [ddnet] the other bug, really weird, i really wonder what corrupts the memory 21:27 <+bridge> [ddnet] must be smth asan cant detect i assume 21:27 <+bridge> [ddnet] have u tried the valgrind? 21:28 <+bridge> [ddnet] how can i try it? by putting break here? 21:28 <+bridge> [ddnet] not yet 21:28 <+bridge> [ddnet] I meant the line of code in gameworld.cpp:147 21:31 <+bridge> [ddnet] i put breakpoint there 21:31 <+bridge> [ddnet] client closed again 21:32 <+bridge> [ddnet] trying this now 21:35 <+bridge> [ddnet] it didn't launch ddnet and print bunch of library and hex stuff, is it normal? :D 21:37 <+bridge> [ddnet] not really 21:37 <+bridge> [ddnet] it should start it normally(but very slow) 21:38 <+bridge> [ddnet] and then put everything in the file valgrind-output.txt 21:38 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989252985941028895/valgrind-out.txt 21:38 <+bridge> [ddnet] another year 21:38 <+bridge> [ddnet] https://www.reddit.com/r/rust/comments/vi7pre/rust_tops_stackoverflow_survey_2022_as_the_most/ 21:39 <+bridge> [ddnet] ah arch and dbg symbols suck i guess? xd 21:39 <+bridge> [ddnet] dunno what it wants 21:40 <+bridge> [ddnet] ah but did u disable asan? 21:40 <+bridge> [ddnet] i think asan + valgrind wont work 21:40 <+bridge> [ddnet] no 21:40 <+bridge> [ddnet] same build 21:40 <+bridge> [ddnet] okay i just build it as debug release right? 21:41 <+bridge> [ddnet] can also use debug if its reproducable 21:41 <+bridge> [ddnet] but dunno, since u the only one its probs wayland anyway 21:41 <+bridge> [ddnet] ok it is starting 21:41 <+bridge> [ddnet] very slow 21:41 <+bridge> [ddnet] :D 21:41 <+bridge> [ddnet] but i have rdna2 now too, maybe i can see if it crashes for me too on wayland in the weekend 21:42 <+bridge> [ddnet] ye valgrind is rly slow 21:43 <+bridge> [ddnet] hardly moving the cursor 21:45 <+bridge> [ddnet] yeah its slow, but it works without compile dependencies 21:45 <+bridge> [ddnet] and finds all kind of stuff 21:45 <+bridge> [ddnet] even uninitialized stuff 21:52 <+bridge> [ddnet] takes eternity 21:55 <+bridge> [ddnet] cant u like connect ip 21:56 <+bridge> [ddnet] no i mean joining the server 21:56 <+bridge> [ddnet] ok it is happened i guess 21:56 <+bridge> [ddnet] ==31109== LEAK SUMMARY: 21:56 <+bridge> [ddnet] ==31109== definitely lost: 11,772 bytes in 260 blocks 21:56 <+bridge> [ddnet] ==31109== indirectly lost: 0 bytes in 0 blocks 21:56 <+bridge> [ddnet] ==31109== possibly lost: 3,130,503 bytes in 47,191 blocks 21:56 <+bridge> [ddnet] ==31109== still reachable: 11,516,001 bytes in 3,660 blocks 21:56 <+bridge> [ddnet] ==31109== suppressed: 0 bytes in 0 blocks 21:56 <+bridge> [ddnet] ==31109== 21:56 <+bridge> [ddnet] ==31109== ERROR SUMMARY: 237 errors from 231 contexts (suppressed: 2 from 2) 21:56 <+bridge> [ddnet] is it catch it 21:56 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989257681858596925/valgrind-out.txt 21:58 <+bridge> [ddnet] 3mb leak 21:58 <+bridge> [ddnet] how do you even read it xd 21:58 <+bridge> [ddnet] possibly lost: 3,130,503 bytes in 47,191 blocks 21:58 <+bridge> [ddnet] xd 21:58 <+bridge> [ddnet] how long did u run it? 21:59 <+bridge> [ddnet] i think leaks add up so the more u run it with valgrind the more u find 21:59 <+bridge> [ddnet] dunno 5-10 mins 21:59 <+bridge> [ddnet] @nori does it also crash with vulkan btw? 21:59 <+bridge> [ddnet] oh thats reasonable 21:59 <+bridge> [ddnet] ``` 21:59 <+bridge> [ddnet] Conditional jump or move depends on uninitialised value(s) 21:59 <+bridge> [ddnet] ==31109== at 0xEA773E8: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xE286FBE: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xDEFD5E1: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xDEFD92A: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xE289067: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xE2891A4: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xE28C08D: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xE377511: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xE377B87: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xE3381F4: ??? 21:59 <+bridge> [ddnet] ==31109== by 0xE50F6E4: ??? 21:59 <+bridge> [ddnet] ==31109== by 0x165867: CCommandProcessorFragment_OpenGLES3::Cmd_Clear(CCommandBuffer::SCommand_Clear const*) (backend_opengl3.cpp:816) 22:00 <+bridge> [ddnet] ==31109== Uninitialised value was created by a heap allocation 22:00 <+bridge> [ddnet] ``` 22:00 <+bridge> [ddnet] But that's probably deep inside the driver 22:00 <+bridge> [ddnet] ``` 22:00 <+bridge> [ddnet] Conditional jump or move depends on uninitialised value(s) 22:00 <+bridge> [ddnet] ==31109== at 0xEA773E8: ??? 22:00 <+bridge> [ddnet] ==31109== by 0xE286FBE: ??? 22:00 <+bridge> [ddnet] ==31109== by 0xDEFD5E1: ??? 22:00 <+bridge> [ddnet] ==31109== by 0xDEFEF1F: ??? 22:00 <+bridge> [ddnet] ==31109== by 0xDEF3C1D: ??? 22:00 <+bridge> [ddnet] ==31109== by 0xDEE6FFC: ??? 22:00 <+bridge> [ddnet] ==31109== by 0x4FF6A8D: ??? (in /usr/lib/libSDL2-2.0.so.0.22.0) 22:00 <+bridge> [ddnet] ==31109== by 0x212CF4: CCommandProcessorFragment_SDL::Cmd_Swap(CCommandBuffer::SCommand_Swap const*) (backend_sdl.cpp:188) 22:00 <+bridge> [ddnet] ``` 22:00 <+bridge> [ddnet] same with this 22:00 <+bridge> [ddnet] radeonsi 22:00 <+bridge> [ddnet] i'll try 22:00 <+bridge> [ddnet] and the uninitialized value way created by wayland 22:00 <+bridge> [ddnet] was* 22:00 <+bridge> [ddnet] How did yo ufigure that? From the call? 22:00 <+bridge> [ddnet] you* 22:01 <+bridge> [ddnet] yeah, at least that's what I assume from the callstack 22:02 <+bridge> [ddnet] but is this really related to all the crashes in RemoveEntity? 22:03 <+bridge> [ddnet] i can't choose vulkan, it is not saving after restart 22:03 <+bridge> [ddnet] can i launch it with env variable? 22:03 <+bridge> [ddnet] ./DDNet "gfx_backend Vulkan" 22:05 <+bridge> [ddnet] [2022-06-22 23:04:31][sdl]: SDL version 2.0.22 (compiled = 2.0.22) 22:05 <+bridge> [ddnet] [2022-06-22 23:04:31][gfx]: Created Vulkan 1.0 context. 22:05 <+bridge> [ddnet] [2022-06-22 23:04:31][gfx]: unable to create window: Installed Vulkan doesn't implement the VK_KHR_surface extension 22:05 <+bridge> [ddnet] [2022-06-22 23:04:31][sdl]: SDL version 2.0.22 (compiled = 2.0.22) 22:05 <+bridge> [ddnet] [2022-06-22 23:04:31][gfx]: Created OpenGL 3.0 context. 22:05 <+bridge> [ddnet] it is switching to opengl? 22:05 <+bridge> [ddnet] lmao 22:06 <+bridge> [ddnet] i really hope this is a SDL limitation 22:06 <+bridge> [ddnet] bcs else wayland drivers are really hard behind xD 22:06 <+bridge> [ddnet] but i also had bugs with wayland vulkan last time i tried :/ 22:06 <+bridge> [ddnet] oh ok solved 22:07 <+bridge> [ddnet] i haven't installed vulkan driver before :D 22:07 <+bridge> [ddnet] ah ok 😄 22:07 <+bridge> [ddnet] weird that it even loads some other vulkan driver 😄 22:07 <+bridge> [ddnet] but probably its just the stub of the vulkan loader 22:08 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989260591912874004/IMG_20220622_230810.jpg 22:08 <+bridge> [ddnet] works great 22:08 <+bridge> [ddnet] :D 22:08 <+bridge> [ddnet] xd 22:08 <+bridge> [ddnet] at least half a screen works 22:08 <+bridge> [ddnet] happened on vulkan too 22:08 <+bridge> [ddnet] xD 22:09 <+bridge> [ddnet] [2022-06-22 23:08:35][vulkan]: warning: requested presentation mode was not available. falling back to mailbox / fifo relaxed. 22:09 <+bridge> [ddnet] [2022-06-22 23:08:35][vulkan]: vulkan error: The device surface format fetching failed. 22:09 <+bridge> [ddnet] [2022-06-22 23:08:35][assert]: /home/arda/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp(1129): The device surface format fetching failed. 22:09 <+bridge> [ddnet] [1] 32221 illegal hardware instruction SDL_VIDEODRIVER=wayland ./DDNet 22:09 <+bridge> [ddnet] print this 22:09 <+bridge> [ddnet] i can join others severs 22:09 <+bridge> [ddnet] but not bit3 22:09 <+bridge> [ddnet] mhh ok 22:10 <+bridge> [ddnet] but i think i had the exact same issue on vulkan on wayland 22:10 <+bridge> [ddnet] tabbing in and out killed it 22:10 <+bridge> [ddnet] but not related to joining any map xD 22:10 <+bridge> [ddnet] wayland kek 22:11 <+bridge> [ddnet] i got backtrace on vulkan 22:13 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989261801088774255/gdb.txt 22:14 <+bridge> [ddnet] but is that really related to joining the map? 22:14 <+bridge> [ddnet] looks to me like u tabbed out and in 22:14 <+bridge> [ddnet] i can join others 22:14 <+bridge> [ddnet] InitVulkanSwapChain 22:14 <+bridge> [ddnet] it somehow recreates the swapchain 22:15 <+bridge> [ddnet] could try ./DDNet "dbg_gfx 4" 22:15 <+bridge> [ddnet] ah and wait 22:15 <+bridge> [ddnet] https://archlinux.org/packages/extra/x86_64/vulkan-validation-layers/ 22:15 <+bridge> [ddnet] install these 22:15 <+bridge> [ddnet] ok i tried and it joined, next try crashed again 22:15 <+bridge> [ddnet] without tab out 22:16 <+bridge> [ddnet] Vulkan-ValidationLayers-1.3.204.1_1 22:16 <+bridge> [ddnet] these i guess 22:16 <+bridge> [ddnet] yeah 22:16 <+bridge> [ddnet] i did 22:16 <+bridge> [ddnet] now what 22:17 <+bridge> [ddnet] /DDNet "dbg_gfx 4" "gfx_backend Vulkan" 22:17 <+bridge> [ddnet] and dont show crashlog, just the terminal output should be enough 22:18 <+bridge> [ddnet] i had crash while opening the game too now xd 22:19 <+bridge> [ddnet] ok lets see 22:19 <+bridge> [ddnet] im on wayland now too 22:19 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989263496900395038/message.txt 22:20 <+bridge> [ddnet] ``` 22:20 <+bridge> [ddnet] [2022-06-22 23:20:19][vulkan]: allocated chunk of memory with size: 129601200 for frame 2 (staging buffer) 22:20 <+bridge> [ddnet] [2022-06-22 23:20:19][vulkan]: allocated chunk of memory with size: 129601200 for frame 2 (buffer) 22:20 <+bridge> [ddnet] [2022-06-22 23:20:19][vulkan]: allocated chunk of memory with size: 14862640 for frame 2 (staging buffer) 22:20 <+bridge> [ddnet] [2022-06-22 23:20:19][vulkan]: allocated chunk of memory with size: 14862640 for frame 2 (buffer) 22:20 <+bridge> [ddnet] [2022-06-22 23:20:19][vulkan]: allocated chunk of memory with size: 9778080 for frame 2 (staging buffer) 22:20 <+bridge> [ddnet] [2022-06-22 23:20:19][vulkan]: allocated chunk of memory with size: 9778080 for frame 2 (buffer) 22:20 <+bridge> [ddnet] [2022-06-22 23:20:19][vulkan]: recreating swap chain requested by acquire next image (prepare frame). 22:20 <+bridge> [ddnet] [2022-06-22 23:20:20][vulkan]: recreating swap chain. 22:20 <+bridge> [ddnet] [2022-06-22 23:20:20][vulkan]: warning: requested presentation mode was not available. falling back to mailbox / fifo relaxed. 22:21 <+bridge> [ddnet] [2022-06-22 23:20:20][vulkan]: minimal swap image count 4 22:21 <+bridge> [ddnet] [2022-06-22 23:20:20][vulkan_debug]: Validation Warning: [ UNASSIGNED-BestPractices-Error-Result ] Object 0: handle = 0x55bc2e50ff80, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x5f379b89 | vkGetPhysicalDeviceSurfaceFormatsKHR(): Returned error VK_ERROR_SURFACE_LOST_KHR. 22:21 <+bridge> [ddnet] [2022-06-22 23:20:20][vulkan]: vulkan error: The device surface format fetching failed. 22:21 <+bridge> [ddnet] [2022-06-22 23:20:20][assert]: /home/arda/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp(1129): The device surface format fetching failed. 22:21 <+bridge> [ddnet] [1] 757 illegal hardware instruction ./DDNet "dbg_gfx 4" 22:21 <+bridge> [ddnet] ``` 22:21 <+bridge> [ddnet] it is after crash 22:21 <+bridge> [ddnet] yeah i assume this is SDL2 or driver limitation, tho its weird the swapchain change is triggered for no sense 22:21 <+bridge> [ddnet] "recreating swap chain requested by acquire next image (prepare frame)." 22:21 <+bridge> [ddnet] VK_ERROR_SURFACE_LOST_KHR is usually GPU crash 22:21 <+bridge> [ddnet] ah nice 22:21 <+bridge> [ddnet] for me it works 22:22 <+bridge> [ddnet] SDL_VIDEODRIVER=wayland used this right? 22:22 <+bridge> [ddnet] otherwise it is x11 22:22 <+bridge> [ddnet] SDL_VIDEODRIVER=wayland ./DDNet "dbg_gfx 4" 22:22 <+bridge> [ddnet] i hope its wayland, can i somehow check ingame? 22:23 <+bridge> [ddnet] don't think so :D 22:23 <+bridge> [ddnet] maybe if you see this xD 22:23 <+bridge> [ddnet] i can compare fps 22:23 <+bridge> [ddnet] wayland is usually a bit faster 22:23 <+bridge> [ddnet] input lag comparable too 22:26 <+bridge> [ddnet] i think xwayland is still on wayland 22:26 <+bridge> [ddnet] so both get input lag 22:26 <+bridge> [ddnet] but it does load x11 library apparently mhh 22:28 <+bridge> [ddnet] xD 22:28 <+bridge> [ddnet] xeyes 22:28 <+bridge> [ddnet] can detect it 22:28 <+bridge> [ddnet] so yes, was native wayland, no crashes for me on mesa (driver: 22.0.5) 22:28 <+bridge> [ddnet] u probs have 22.2 22:28 <+bridge> [ddnet] 22.1.1 22:30 <+bridge> [ddnet] wtf is this resolution wayland reports xD 22:30 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989266205263134720/unknown.png 22:31 <+bridge> [ddnet] 2048 xD, lets add all power of 2 resolutions xd 22:31 <+bridge> [ddnet] when i click on a small resolution it suddenly reports 8k resolutions xD wtf going on 22:31 <+bridge> [ddnet] its really buggy, just not crashing on back in times 3 22:32 <+bridge> [ddnet] it also crashes when i try to select them xD 22:32 <+bridge> [ddnet] i never had bugs with gles on wayland 22:32 <+bridge> [ddnet] only bit2 22:32 <+bridge> [ddnet] bit3* 22:32 <+bridge> [ddnet] but hear me out, im the first person on the planet with 8k 240hz 22:32 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/989266671061581864/unknown.png 22:33 <+bridge> [ddnet] yeah sry cant help, just accept xwayland for now if that runs better 22:33 <+bridge> [ddnet] maybe in 10 years wayland is king, then we all switch and are happy^^ 22:33 <+bridge> [ddnet] lol 22:33 <+bridge> [ddnet] :D 22:33 <+bridge> [ddnet] i am okay with trying yo join 5 times :D 22:34 <+bridge> [ddnet] it eventually joins 22:34 <+bridge> [ddnet] xD 22:35 <+bridge> [ddnet] @Not Keks did you try gles on wayland too? 22:35 <+bridge> [ddnet] vulkan itself already buggy 22:36 <+bridge> [ddnet] maybe it is triggering another thing :d 22:46 <+bridge> [ddnet] But vk worked for me ^^ can try tomorrow if i don't forget 23:56 <+bridge> [ddnet] @deen if we want to have in 16.2 should I rebase it on your 16.2 PR or on latest master? 23:56 <+bridge> [ddnet] master 23:56 <+bridge> [ddnet] make all PRs on master, I cherry-pick them to 16.2 23:56 <+bridge> [ddnet] ok 23:56 <+bridge> [ddnet] It should be extremely rare that we have to make a change on 16.2 but not on master 23:57 <+bridge> [ddnet] for example if we reworked an entire feature in master, but the old version in 16.2 has a small bug, we could make the fix directly on 16.2 23:57 <+bridge> [ddnet] 16.2-devel is basically forked off of master, and will die at some point, never gets merged back into master 23:57 <+bridge> [ddnet] I see... I have mixed things up again 😄 23:58 <+bridge> [ddnet] is there a way to get more verbose log than just ./DDNet?