Post AzEdJ13ctDbf0lzv5U by splinux@mastodon.uno
(DIR) More posts by splinux@mastodon.uno
(DIR) Post #AzECQPEAj7AFEqEIj2 by Suiseiseki@freesoftwareextremist.com
2025-10-15T08:46:06.559892Z
0 likes, 0 repeats
Wow I hate C++ vectors - they make debugging a crash impossible./usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_vector.h:1263: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::unique_ptr; _Alloc = std::allocator >; reference = std::unique_ptr&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.???
(DIR) Post #AzETyeKmlVXf9pEmrA by splinux@mastodon.uno
2025-10-15T11:59:03Z
0 likes, 0 repeats
@Suiseiseki good PTSD. To get into C++ one needs to hate oneself. Then once you and the compiler team up to hurt yourself it gets easier as you side with gcc.
(DIR) Post #AzETyfGZIflM32GvvE by Suiseiseki@freesoftwareextremist.com
2025-10-15T12:02:45.799363Z
0 likes, 0 repeats
@splinux I didn't write the C++ - I would have written it in C.
(DIR) Post #AzEVbJ61lH1uXLKcoy by splinux@mastodon.uno
2025-10-15T12:15:59Z
0 likes, 0 repeats
@Suiseiseki i didn't say you did. I said if one gets into it, it is because one hates oneself. C is just the pathology. C++ is the degenerative phase of liking C.
(DIR) Post #AzEVbKITIUZuGEA4rA by Suiseiseki@freesoftwareextremist.com
2025-10-15T12:20:57.320192Z
0 likes, 0 repeats
@splinux I tried to learn C++ before, but I realized how degenerate it was, so I learned GNU C and it was great.
(DIR) Post #AzEW1q4plKVOM0QOqO by splinux@mastodon.uno
2025-10-15T12:14:06Z
0 likes, 0 repeats
@Suiseiseki btw the error is telling you something is accessing an element outside the boundaries of the vector.
(DIR) Post #AzEW1rRuf0YobsELSK by Suiseiseki@freesoftwareextremist.com
2025-10-15T12:25:45.179586Z
0 likes, 0 repeats
@splinux Great - that's half of what I need to work out where the bug is - I would need to know what vector - but of course it doesn't print that, or a memory address or anything...
(DIR) Post #AzEcCYxsKDIOBwfOuO by splinux@mastodon.uno
2025-10-15T13:31:05Z
0 likes, 0 repeats
@Suiseiseki I stopped at gcc standard 12 or maybe was 14 ... don't remember. But the output disagrees using a random online gcc, with all versions.'At()' accessing out of bound elements throw a std::exception meanwhile the [ ] what in your line is called "operator[ ]" is safe and for some reason returns a default value... (??) I would investigate further but I am on mobile and my child unplugged my desktop half way setting up a machine with GCC. (it's a message from karma).
(DIR) Post #AzEcCZrB0bX0xSXZ6e by Suiseiseki@freesoftwareextremist.com
2025-10-15T13:34:55.297780Z
0 likes, 0 repeats
@splinux The software only compiles with GCC 15.Yes; there is also; `vector::_M_range_checkI __n (which is 9) >= this->size() (which is 9)` which doesn't really make sense, as last time I checked 9 >=9
(DIR) Post #AzEcfXim1lxgjUQDM8 by splinux@mastodon.uno
2025-10-15T13:36:55Z
0 likes, 0 repeats
@Suiseiseki about where to look in the code w.r.t. to the stack trace:this one line you posted (it's one single line, yeah) has this 'stl_vector.h:1263'this is where in the std:: library is. The library is *never* where the problem is.You should have the previous line in the stack trace be something like something.cc:123 with a lot of incomprensible shit before or afteror maybe something.h:123telling you the line number.
(DIR) Post #AzEcfZ0tDu2yjxuCES by Suiseiseki@freesoftwareextremist.com
2025-10-15T13:40:09.433181Z
0 likes, 0 repeats
@splinux Yes, I'm well aware the library isn't where the problem is even though the crappy library is crashing.I don't get a stack trace, even if I compile in debug mode.
(DIR) Post #AzEdJ13ctDbf0lzv5U by splinux@mastodon.uno
2025-10-15T13:43:53Z
0 likes, 0 repeats
@Suiseiseki feck
(DIR) Post #AzEdJ2Kg9IqCxwz3J2 by Suiseiseki@freesoftwareextremist.com
2025-10-15T13:47:17.472052Z
0 likes, 0 repeats
@splinux valgrind can't run it either due to some missing instruction or something.With gdb, it gets stuck in fullscreen on the crash and the only way I can access the desktop is to kill gdb.