The Official Status Thread
-
[jinpa said] or
@Gąska said in The Official Status Thread:
@jinpa yes.
That joke was funny the first ten million times I heard it. No, that's not true.
-
@jinpa said in The Official Status Thread:
That joke was funny the first ten million times I heard it.
Casual racism never gets old.
-
Status: What the fuck just happened?
-
@Tsaukpaetra null function pointer. How did it get there? No fucking clue, but call stack might give you a clue (if it exists and hasn't been corrupted).
-
@Gąska said in The Official Status Thread:
@Tsaukpaetra null function pointer. How did it get there? No fucking clue, but call stack might give you a clue (if it exists and hasn't been corrupted).
It happened in a thread. Apparently the variable being referenced was also out of scope somehow. But only this one time. I guess.
-
@Gąska said in The Official Status Thread:
@jinpa said in The Official Status Thread:
That joke was funny the first ten million times I heard it.
Casual racism never gets old.
Just like Anne Frank.
-
@Gąska said in The Official Status Thread:
@Tsaukpaetra null function pointer. How did it get there? No fucking clue, but call stack might give you a clue (if it exists and hasn't been corrupted).
Intriguing that it’s offset by 1. That’s not even aligned.
-
@topspin said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra null function pointer. How did it get there? No fucking clue, but call stack might give you a clue (if it exists and hasn't been corrupted).
Intriguing that it’s offset by 1. That’s not even aligned.
You say intriguing, I say fucking annoying, because it's 100% reproducible and I really would like it to not happen...
-
@Tsaukpaetra said in The Official Status Thread:
@topspin said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra null function pointer. How did it get there? No fucking clue, but call stack might give you a clue (if it exists and hasn't been corrupted).
Intriguing that it’s offset by 1. That’s not even aligned.
You say intriguing, I say fucking annoying, because it's 100% reproducible and I really would like it to not happen...
If it’s reproducible it’s usually easy to fix.
As @Gąska said, if the call stack isn’t trashed, the debugger will point you directly to the part where you’re calling through a dead object’s vtable or whatever is happening here.
-
@topspin said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@topspin said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra null function pointer. How did it get there? No fucking clue, but call stack might give you a clue (if it exists and hasn't been corrupted).
Intriguing that it’s offset by 1. That’s not even aligned.
You say intriguing, I say fucking annoying, because it's 100% reproducible and I really would like it to not happen...
If it’s reproducible it’s usually easy to fix.
As @Gąska said, if the call stack isn’t trashed, the debugger will point you directly to the part where you’re calling through a dead objects vtable or whatever is happening here.Yeah, not so much.
This is where it's suiciding. The debugger says
NumCommands
is 0, andi
is 0 () and I can't get whatCmd
is at this point in execution, norInstanceData
.I blame optimizations the compiler made.
-
@Tsaukpaetra does the problem happen in debug mode? Also, if it's lifetime issue, cppcheck or similar tool might help.
-
@topspin said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra null function pointer. How did it get there? No fucking clue, but call stack might give you a clue (if it exists and hasn't been corrupted).
Intriguing that it’s offset by 1. That’s not even aligned.
Yeah, it's weird. But who knows in what order memory gets accessed during code jump.
-
@Gąska said in The Official Status Thread:
@Tsaukpaetra does the problem happen in debug mode? Also, if it's lifetime issue, cppcheck or similar tool might help.
Not sure. Trying the operation on a different machine (which would be much faster than rebuilding in actual-debug-debug-mode). We'll see in an hour.
-
Update to downtime issues: it's all the fault (sez the company) of everyone's favorite database vendor. You guessed it--Oracle! The solution? They've hired a HPC firm that specializes in Oracle. Good times. Glad the semester's almost over.
-
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra does the problem happen in debug mode? Also, if it's lifetime issue, cppcheck or similar tool might help.
Not sure. Trying the operation on a different machine (which would be much faster than rebuilding in actual-debug-debug-mode). We'll see in an hour.
Nope same crash. Wonderful.
-
@Tsaukpaetra said in The Official Status Thread:
Wonderful.
Ah. It's indexing an array to
-1
.What the fuck.
Whatever. Time to go home I guess.
-
@Tsaukpaetra said in The Official Status Thread:
Ah. It's indexing an array to -1.
No; it's calculating an address (assuming that's a real array and not some C++ override).
&ElementData[InstanceIndex]
is equivalent toElementData + InstanceIndex
. It then adds 0 (why?) and casts the whole lot tovoid *
before doing a pointer comparison. So we get effectively(void *)(ElementData - 1)
and what that means depends utterly on the size of the element type of the array/pointer, specifically it's size for alignment purposes.I wasn't even aware that pointer comparison actually worked on
void *
, and thought one had to use a different type (such aschar *
) for that;void *
really is a “it isn't this type but I'm not telling you the type right now” thing that disables many pointer operations.
-
Status: One of my colleagues had some “fun” code for walking a heap and collecting how much space was left in it. The only problem was that it would merrily wander off the end of the heap and also enumerate a bunch of uninitialised memory too, starting with random stuff at NULL! (The zero page is readable on the target system so this isn't too strange. Embedded targets are strange themselves.) The problem was in this loop: can you spot the error?
while (free_blk != NULL) { // Multiple lines of logging removed... free_blk = free_blk->free_ptr; total_size += (unsigned char*) free_blk->next_ptr - (unsigned char*) free_blk; }
The problem was the calculation of
free_blk
for the next iteration was before a use of it in the current iteration. Since the dereference of it was succeeding — and always would on the target embedded system — the compiler was assuming thatfree_blk
could not be null and the loop condition would never fail after the first iteration. This is because memory access through a NULL pointer is Undefined Behaviour in the C standard, even though our hardware actually defines it just fine (it contains a jump to a routine that makes the system abort so that calling a NULL function pointer will fail).This is a case of optimisation turning a minor bug into a major one, and is a case that I'd read about (in relation to Linux kernel bugs) but not seen in the wild before.
-
@topspin
Pfff that is overrated. I know someone who spend years in the closet and came out as quite a gay fellow
-
@dkf Yeah, this is deep in Engine code and I'm just not prepared to determine what voodoo it's trying to do for this specific data set that's broken. Will probably just revert the data file and redo the two things I did to get it into that state and see if perhaps it works better the next go around....
-
@Luhmann Have we met?
-
@dkf said in The Official Status Thread:
I wasn't even aware that pointer comparison actually worked on
void *
It's technically not allowed unless you're indexing into the same array, but a case where UB doesn't actually give you nasal demons because nobody uses segmented memory anymore.
-
Status:
if ((time_string[0] != '0') && (time_string[1] != '3'))
Does not only perform the conditional if it's not 3am, it should have been:
if (!((time_string[0] == '0') && (time_string[1] == '3')))
Oops...I was wondering why it stopped working after midnight.
-
@Cursorkeys Unless my Boolean logic is failing me, I'm pretty sure you could instead replace
&&
with||
. Fewer parentheses is more better, right?
-
@kazitor said in The Official Status Thread:
@Cursorkeys Unless my Boolean logic is failing me, I'm pretty sure you could instead replace
&&
with||
. Fewer parentheses is more better, right?I can still remember 'break the line and change the sign' from College. For some reason I have a much harder time reading its intention that way round though.
-
@Cursorkeys said in The Official Status Thread:
I have a much harder time reading its intention that way round though.
Yeah, I had to wrap my head around it a bit to make sure I wasn't being stupid.
It won't be three if the first digit isn't 0, and it also won't be three if the second isn't 3. Only one digit has to be different for the whole number to be different.
-
@Cursorkeys said in The Official Status Thread:
For some reason I have a much harder time reading its intention that way round though.
I sometimes intentionally leave it the way you did it because it's easier to read. Sometimes the other way is easier. Logic is hard.
-
status: thinking of porting all of my Sponge plugins to Spigot, releasing them as closed source and paid plugins, and loudly advertising on the plugin page that they're free if you use Sponge, to convince more people to switch.
-
Status: Turns out there's a Steam group. How do you do, fellow kids?
-
@Applied-Mediocrity: E_AMBIGUOUS_SENTENCE. Do you mean a "" Steam group, or " Steam" group?
-
@Zerosquare Yes. I clicked @ben_lubar's Guild Wars or something broadcast and Steam froze.
-
@Applied-Mediocrity
The screenshots where too big for you to handle
-
@Applied-Mediocrity said in The Official Status Thread:
Status: Turns out there's a Steam group. How do you do, fellow kids?
Oh, you talking about this?
It's pretty darn quiet.
-
@Tsaukpaetra most probably this
-
@Applied-Mediocrity said in The Official Status Thread:
@Zerosquare Yes. I clicked @ben_lubar's Guild Wars or something broadcast and Steam froze.
ah, I was wondering who joined my stream multiple times
I've been doing some spoilery stuff, so beware
-
@TimeBandit said in The Official Status Thread:
@Tsaukpaetra most probably this
My statement stands.
-
@ben_lubar said in The Official Status Thread:
I've been doing some spoilery stuff, so beware
There's not much to spoil in Dwarf Fortress
-
@TimeBandit They all die?
-
-
Status: poor dude is washing Windows in the presence of wind and all the debris that comes with it!
-
-
@TimeBandit
He should just install Linux on the walls instead!
-
-
@izzion said in The Official Status Thread:
He should just install Linux on the walls instead!
Even better, remove the walls.
When there is no walls, you don't need Windows
-
@TimeBandit said in The Official Status Thread:
@izzion said in The Official Status Thread:
He should just install Linux on the walls instead!
Even better, remove the walls.
When there is no walls, you don't need Windows
When there are no walls, the world is one big Window.
-
@jinpa said in The Official Status Thread:
When there are no walls, the world is one big
Windowvirtual reality in hi-def 3D.FTFY
-
Status: Confused by 's notifications. Why did I get a notification 12 minutes ago, already marked read, for a reply that was 3 hours old and which I'd already up-voted?
Filed under:
KHAAAAAANNOOOOOODE BAAAAABYYYYY!!!!!!!!.jpg
-
Status: it's just a gourd.
-
@Tsaukpaetra
I'm utterly disgusted at the lack of wooden table
-
@Tsaukpaetra: sure, sure. And that thing is just a tree:
https://cdn-media.rtl.fr/cache/68uLn4B-8mrbWLv7vMs2oQ/880v587-0/online/image/2014/1017/7774866584_000-par8004711.jpg