WTF Bites


  • Considered Harmful

    @carnage said in WTF Bites:

    Doing stupid stuff for stupid reasons kills the joy of programming though.

    Find the old version of the codebase, apply the changes that have happened since then, spend the rest of the allotted man-hours doing some form of programming that you actually take joy in.



  • @pie_flavor said in WTF Bites:

    @carnage said in WTF Bites:

    Doing stupid stuff for stupid reasons kills the joy of programming though.

    Find the old version of the codebase, apply the changes that have happened since then, spend the rest of the allotted man-hours doing some form of programming that you actually take joy in.

    Like I said, not my project so I dont really care.
    This is a new project that has not been released yet, so there is no old codebase to apply changes on. Everything needs to be redesigned to not be microservices. Of course, we all know everything will just be mashed into the same code repo with a heavy hand and beaten with the ugly stick until it compiles and kindof works, like it always is with these things.
    Damn, it feels good I'm leaving this place today. 🍺



  • @blakeyrat Honestly one of the first things any business should do with a new proposal that involves paying other people money is sit down for half a day and think really hard about all the ways somebody sneaky and unethical could game it.

    If you just come up with a model and assume everyone will operate it in the intended way, you're asking for this sort of thing to happen.

    In this case I suppose you could band-aid around it by having the scooters not become eligible for the charging fee unless they've actually fallen below a certain charge threshold. Or scale the charging fee according to the charge actually used. Those could still be interesting if it's possible for the charger person to easily discharge the scooters (i.e. more easily than actually riding them for whatever distance).

    (ETA)
    After reading the full article, I see they are indeed attempting to apply a band-aid:

    it will now require that a Charger “capture” a Bird before moving it. If Chargers move the Birds first, they may be blocked from capturing them.

    This should help with the "truck full of uncaptured scooters" issue, but doesn't block the variant of the attack noted in the article where a rogue charger pays the ride fee and rides it home, then leaves it there until evening when it's eligible to be charged. May be good enough.



  • @pie_flavor said in WTF Bites:

    @carnage You're not getting paid any less

    Reminds me of a conversation I once had with a manager at a former job.

    "The spec [another department] wants us to implement is a joke. It's not just full of unspecified cases, it actually manages to contradict itself."
    "Yeah, they do that every time. Don't worry about it and implement it anyways ; we'll bill them extra for fixes once they realize they shot themselves in the foot again."

    I tried to make him understand that being paid isn't everything ; working on a project when you're painfully aware that it will never work, and most likely be scrapped completely, is a good way to kill morale. But I never managed to convince him.

    The worst part is that he was actually an excellent manager otherwise. Now, try explaining that to your average mediocre manager.



  • @scarlet_manuka said in WTF Bites:

    Honestly one of the first things any business should do with a new proposal that involves paying other people money is sit down for half a day and think really hard about all the ways somebody sneaky and unethical could game it.

    Ah, but see? That is up-front planning, which is not at all open source-y. You gotta move fast and break things, release early and often or whatever dumb slogan startups use now.



  • @blakeyrat To play devil's advocate: it might actually be cheaper to let people find ways to abuse your system and just fix them as they happen. However that's only true as long as you're not locked into a contract with the customer that prevents that.



  • @anonymous234 Read the article. He tried to report cheats, the report button only worked a third of the time and when it did they mostly ignored his reports. (He did say one person at the company seemed interested.)



  • We have some object that contains a bunch queues. One colleague was hunting down some memory leaks and put code like this in destructor:

    ClassContainingBunchOfQueues::~ClassContainingBunchOfQueues()
    {
        std::queue<std::string> emptyString;
        m_something.swap(emptyString);
    
        std::queue<HandleStatus> emptyHandleStatus;
        m_handleStati.swap(emptyHandleStatus);
    
        std::queue<Handle> emptyHandle;
        m_someHandli.swap(emptyHandle);
        m_otherHandli.swap(emptyHandle);
        m_moreHandli.swap(emptyHandle);
        m_andYetSomeHandli.swap(emptyHandle);
    }
    

    Note especially the part where multiple members of the same type are handled together…



  • @bulb said in WTF Bites:

    We have some object that contains a bunch queues. One colleague was hunting down some memory leaks and put code like this in destructor:

    ClassContainingBunchOfQueues::~ClassContainingBunchOfQueues()
    {
        std::queue<std::string> emptyString;
        m_something.swap(emptyString);
    
        std::queue<HandleStatus> emptyHandleStatus;
        m_handleStati.swap(emptyHandleStatus);
    
        std::queue<Handle> emptyHandle;
        m_someHandli.swap(emptyHandle);
        m_otherHandli.swap(emptyHandle);
        m_moreHandli.swap(emptyHandle);
        m_andYetSomeHandli.swap(emptyHandle);
    }
    

    Note especially the part where multiple members of the same type are handled together…

    :cluebat:🔨🔫💣



  • @blakeyrat said in WTF Bites:

    Read the article.

    :doing_it_wrong: :kneeling_warthog:


  • Fake News

    @pie_flavor said in WTF Bites:

    @carnage I assume an actual job will beat this out of me at some point, but the way I view it, you're not there to write an app, you're there to write code. If manglement decides right after you've moved the chair from the southeast corner to the northwest corner that the chair really did fit better in the southeast, then you're not getting paid any less and they know damn well why you haven't gotten around to the table yet.
    Side note: I blue screened while writing this post.

    You're right that the boss always has the last word.

    The only thing you're missing is that there are bad bosses out there who will try to find a scapegoat when the job isn't done yet. Try getting paid when you're fired, or try having morale when you're ostracized as a dissenter.

    A good boss would obviously never try such a thing but they're not all good.


  • BINNED

    @bulb WTF is that supposed to do?!


  • Notification Spam Recipient

    @topspin said in WTF Bites:

    @bulb WTF is that supposed to do?!

    I think it's trying to cause destruction in sub-objects by losing references. Because trusting the language compiler to do it is bad.



  • Not entirely sure which thread it should go to, or maybe to a thread of its own...

    Anyway, if you liked the IOCCC (obfuscated C code contest), here is the Underhanded C code contest, where the goal is to intentionally put some rogue code into innocent-looking one, in such a way that it looks as involuntary as possible (i.e. plausible deniability).

    Not sure whether it's awesome or awful.


  • Banned

    Some fuckhead has actually registered log4j.properties domain, which fucked up my google search through address bar. With each passing day, I hate those new TLDs more and more.



  • @gÄ…ska It's not even a real person, just some domain squatter.


  • Java Dev

    @gÄ…ska I think the unified search/address bar is a horrible thing, though I usually run into it in the other direction where bare hostnames on the internal network are interpreted as search terms instead.


  • Banned

    @pleegwat do you still do it? I've used to do that too occasionally, but when the new TLDs went live, I've never had this problem ever again, but the opposite became quite common.

    Unified bar is a huge productivity boost for me. Just like tabs - I was fine when I never heard of them, but after I got used to them, I'd never go back. This is actually the main reason why I never buy expensive headphones or keyboards - I'm afraid that they will be such a huge improvement that I'll start noticing how awful regular stuff is.



  • @hungrier said in WTF Bites:

    It's not even a real person, just some domain squatter.

    A domain squatter is a real person too 🍹



  • @pleegwat said in WTF Bites:

    I usually run into it in the other direction where bare hostnames on the internal network are interpreted as search terms instead.

    In case you didn't know (inb4 blakeyrant that you didn't ask for help), usually appending a / to the hostname does the trick. At least on Opera, it might depend on the browsers...

    It's still a PITA as you've got to remember it, but I guess you can't have it both ways.


  • Java Dev

    @gÄ…ska It happens on occasion that I either hit enter without verifying the right kind of entry is selected, or only the wrong kind pops up.

    And it doesn't make sense to me since when I start typing I always know whether I want to enter a URL, search my history, or search google.


  • Banned

    @pleegwat said in WTF Bites:

    And it doesn't make sense to me since when I start typing I always know whether I want to enter a URL, search my history, or search google.

    Me too. But if the actions to do either are the same, it's easier to do and makes for nicer UX. It's kinda like type inference - you just call a method and don't care which type it came from.



  • Windows 10 finally added screen recording some time ago, but they kept it so hidden almost no one knows about it.


  • Notification Spam Recipient

    @anonymous234 said in WTF Bites:

    Windows 10 finally added screen recording some time ago, but they kept it so hidden almost no one knows about it.

    The Xbox Dvr thing?


  • Fake News

    @tsaukpaetra They call it the "Game Bar".


  • Notification Spam Recipient

    @jbert said in WTF Bites:

    @tsaukpaetra They call it the "Game Bar".

    And since only gamers want to screen record, the average pleb never discovers it?



  • @tsaukpaetra said in WTF Bites:

    And since only gamers want to screen record

    Precisely, assuming you wrote that ironically.


  • Notification Spam Recipient

    @anonymous234 said in WTF Bites:

    wrote that ironically.

    I don't understand ironic.



  • @jbert said in WTF Bites:

    @tsaukpaetra They call it the "Game Bar".

    Is that somewhere you go to get drunk while paying games? 🍹



  • @tsaukpaetra said in WTF Bites:

    @anonymous234 said in WTF Bites:

    wrote that ironically.

    I don't understand ironic.

    It's like rain on your wedding day: A non-gamer will be disappointed, but a gamer will go inside and record his screen.


  • Considered Harmful

    @gÄ…ska said in WTF Bites:

    Some fuckhead has actually registered log4j.properties domain, which fucked up my google search through address bar. With each passing day, I hate those new TLDs more and more.

    Speak for yourself. It was a happy surprise when server.properties turned out to be a website, because then I didn't have to deal with the wiki.


  • Banned

    @pie_flavor I've actually laughed out loud. đź‘Ť Good stuff in there!


  • I survived the hour long Uno hand

    @pie_flavor
    Among the SANs on the cert for that URL:
    DNS Name=*.enableporn.review

    For the adult Minecraft player!


  • Considered Harmful

    @izzion I see gabizou's name there too. I don't know if that signifies anything.


  • Notification Spam Recipient

    @izzion said in WTF Bites:

    @pie_flavor
    Among the SANs on the cert for that URL:
    DNS Name=*.enableporn.review

    For the adult Minecraft player!

    Don't forget nspermswapvideos.gq!


  • I survived the hour long Uno hand

    @pie_flavor
    Well, no, it's obviously a CloudFlare CDN service certificate, and there's gonna be all kinds of fun sites "co-existing" on any given CDN node, so it's not like the admins of this Minecraft server chose to be along side a site of such an entertaining name. But why let that :barrier: my joke?


  • Considered Harmful

    @izzion A lot of those do seem to be Minecraft-related, so I dunno.


  • Discourse touched me in a no-no place

    @gÄ…ska said in WTF Bites:

    Unified bar is a huge productivity boost for me. Just like tabs

    Watch out for when it becomes a unified bar tab… 🍺 💸



  • @tsaukpaetra said in WTF Bites:

    @topspin said in WTF Bites:

    @bulb WTF is that supposed to do?!

    I think it's trying to cause destruction in sub-objects by losing references. Because trusting the language compiler to do it is bad.

    It is still kinda trusting the compiler to do it, just shifting the responsibility from destructors of the members to the destructors of the temporaries.

    The changeset had comment saying it was fixing memory leaks (found by a leak detector, specifically Dr. Memory (which is similar to Valgrind, but works on Windows)) and was associated to task requesting the same.

    So my guess is that the guy had some leak reports he didn't really understand and was doing some cargo cult until they went away. And then left it in whatever state the leaks went away.


  • Notification Spam Recipient

    @bulb said in WTF Bites:

    Dr. Memory

    Tried that, I must have been doing something wrong because it always crashed itself...



  • @tsaukpaetra It mostly works for us. At the beginning it had a false positive for invalid access somewhere in openssl initialization, but that was openssl really doing something fishy and went away once we upgraded to the latest patch level (we are sticking to the 1.0.2 LTE branch).

    Now we only have a problem that it can't detect some issue that we are sure we have. The test binaries randomly crash during global shutdown (after main() returns). That reeks of memory corruption somewhere earlier, but Dr.Memory is not showing anything when run from command-line and showing one invalid pointer somewhere inside standard library that we can't make any sense of when run from Visual Studio. But it did find plenty of real errors, so we can't complain.


  • Notification Spam Recipient

    @bulb said in WTF Bites:

    It mostly works for us

    Yeah, I can't get it to even make the log window show up. It just fucks right off immediately upon trying to start the target program.

    .\drmemory.exe D:\Shared\ReleaseCandidate\WindowsServer\Hypatia\Binaries\Win64\HypatiaServer-Win64-Shipping.exe -log
    ~~Dr.M~~ Dr. Memory version 1.11.0
    ~~Dr.M~~ (Uninitialized read checking is not yet supported for 64-bit)
    ~~Dr.M~~ Running "D:\Shared\ReleaseCandidate\WindowsServer\Hypatia\Binaries\Win64\HypatiaServer-Win64-Shipping.exe -log"
    ~~Dr.M~~
    ~~Dr.M~~ Error #1: UNADDRESSABLE ACCESS: reading 0x0000000000000000-0x0000000000000008 8 byte(s)
    ~~Dr.M~~ # 0 FOutputDevice::Logf__VA                                                 [d:\rel\engine\source\runtime\core\private\misc\outputdevice.cpp:70]
    ~~Dr.M~~ # 1 TCString<>::Sprintf__VA                                                 [d:\rel\engine\source\runtime\core\public\misc\cstring.h:775]
    ~~Dr.M~~ # 2 FDebug::AssertFailed                                                    [d:\rel\engine\source\runtime\core\private\misc\assertionmacros.cpp:414]
    ~~Dr.M~~ # 3 StaticFailDebug                                                         [d:\rel\engine\source\runtime\core\private\misc\assertionmacros.cpp:114]
    ~~Dr.M~~ # 4 FMsg::Logf_Internal__VA                                                 [d:\rel\engine\source\runtime\core\private\logging\logmacros.cpp:112]
    ~~Dr.M~~ # 5 FMallocBinned2::MallocExternal                                          [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:748]
    ~~Dr.M~~ # 6 FMallocBinned2::MallocExternal                                          [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:748]
    ~~Dr.M~~ # 7 FMallocBinned2::MallocExternal                                          [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:748]
    ~~Dr.M~~ # 8 FGenericPlatformString::Memcpy                                          [d:\rel\engine\source\runtime\core\private\genericplatform\genericplatformstring.cpp:19]
    ~~Dr.M~~ # 9 FBufferedLine::FBufferedLine                                            [d:\rel\engine\source\runtime\core\public\misc\outputdeviceredirector.h:25]
    ~~Dr.M~~ #10 FOutputDeviceRedirector::Serialize                                      [d:\rel\engine\source\runtime\core\private\misc\outputdeviceredirector.cpp:194]
    ~~Dr.M~~ #11 FMsg::Logf_Internal__VA                                                 [d:\rel\engine\source\runtime\core\private\logging\logmacros.cpp:112]
    ~~Dr.M~~ #12 FInstancedViewUniformShaderParameters::zzGetMembersBefore               [d:\rel\engine\source\runtime\engine\public\sceneview.h:757]
    ~~Dr.M~~ #13 FMallocBinned2::ReallocExternal                                         [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:818]
    ~~Dr.M~~ #14 FMallocBinned2::FFreeBlock::CanaryFail                                  [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:1139]
    ~~Dr.M~~ #15 FMallocBinned2::FreeExternal                                            [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:860]
    ~~Dr.M~~ #16 FJsonStringReader::~FJsonStringReader                                   [d:\rel\engine\source\runtime\json\public\serialization\jsonreader.h:808]
    ~~Dr.M~~ #17 FJsonStringReader::`scalar deleting destructor'
    ~~Dr.M~~ #18 FProjectDescriptor::Load                                                [d:\rel\engine\source\runtime\projects\private\projectdescriptor.cpp:78]
    ~~Dr.M~~ #19 FMallocBinned2::MallocExternal                                          [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:748]
    ~~Dr.M~~ Note: @0:00:10.096 in thread 9884
    ~~Dr.M~~ Note: instruction: mov    (%r14) -> %rax
    ~~Dr.M~~
    ~~Dr.M~~ Error #2: UNADDRESSABLE ACCESS: reading 0x0000000000000000-0x0000000000000008 8 byte(s)
    ~~Dr.M~~ # 0 WinMain               [d:\rel\engine\source\runtime\launch\private\windows\launchwindows.cpp:222]
    ~~Dr.M~~ Note: @0:00:11.911 in thread 9884
    ~~Dr.M~~ Note: instruction: mov    (%rcx) -> %rax
    ~~Dr.M~~
    ~~Dr.M~~ Error #3: LEAK 40960 direct bytes 0x0000021de2798ad0-0x0000021de27a2ad0 + 0 indirect bytes
    ~~Dr.M~~ # 0 replace_RtlReAllocateHeap                     [d:\drmemory_package\common\alloc_replace.c:3816]
    ~~Dr.M~~ # 1 FString::PathAppend                           [d:\rel\engine\source\runtime\core\private\containers\string.cpp:368]
    ~~Dr.M~~ # 2 FMallocBinned2::ReallocExternal               [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:818]
    ~~Dr.M~~ # 3 FMallocBinned2::MallocExternal                [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:748]
    ~~Dr.M~~ # 4 FMallocBinned2::Realloc                       [d:\rel\engine\source\runtime\core\public\hal\mallocbinned2.h:497]
    ~~Dr.M~~ # 5 FMallocBinned2::FreeExternal                  [d:\rel\engine\source\runtime\core\private\hal\mallocbinned2.cpp:892]
    ~~Dr.M~~ # 6 FDelegateBase::Allocate                       [d:\rel\engine\source\runtime\core\public\delegates\delegatebase.h:209]
    ~~Dr.M~~ # 7 ucrtbase.dll!realloc_base                    +0x38     (0x00007ffc952b1019 <ucrtbase.dll+0x11019>)
    ~~Dr.M~~ # 8 ucrtbase.dll!recalloc                        +0x51     (0x00007ffc952b0f82 <ucrtbase.dll+0x10f82>)
    ~~Dr.M~~ # 9 ucrtbase.dll!register_onexit_function        +0x3ed    (0x00007ffc952acf6e <ucrtbase.dll+0xcf6e>)
    ~~Dr.M~~ #10 ucrtbase.dll!register_onexit_function        +0x23a    (0x00007ffc952acdbb <ucrtbase.dll+0xcdbb>)
    ~~Dr.M~~ #11 ucrtbase.dll!register_onexit_function        +0x9f     (0x00007ffc952acc20 <ucrtbase.dll+0xcc20>)
    ~~Dr.M~~
    ~~Dr.M~~ Reached maximum leak report limit (-report_leak_max). No further leaks will be reported.
    ~~Dr.M~~
    ~~Dr.M~~ ERRORS FOUND:
    ~~Dr.M~~       2 unique,     2 total unaddressable access(es)
    ~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
    ~~Dr.M~~       0 unique,     0 total GDI usage error(s)
    ~~Dr.M~~       0 unique,     0 total handle leak(s)
    ~~Dr.M~~       0 unique,     0 total warning(s)
    ~~Dr.M~~       1 unique,     1 total,  40960 byte(s) of leak(s)
    ~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
    ~~Dr.M~~ ERRORS IGNORED:
    ~~Dr.M~~      14 potential error(s) (suspected false positives)
    ~~Dr.M~~          (details: C:\Users\tsaukpaetra\Downloads\DrMemory-Windows-1.11.0-2\drmemory\logs\DrMemory-HypatiaServer-Win64-Shipping.exe.23932.000\potential_errors.txt)
    ~~Dr.M~~       3 potential leak(s) (suspected false positives)
    ~~Dr.M~~          (details: C:\Users\tsaukpaetra\Downloads\DrMemory-Windows-1.11.0-2\drmemory\logs\DrMemory-HypatiaServer-Win64-Shipping.exe.23932.000\potential_errors.txt)
    ~~Dr.M~~    1795 unique,  9995 total, 3208913 byte(s) of still-reachable allocation(s)
    ~~Dr.M~~          (re-run with "-show_reachable" for details)
    ~~Dr.M~~   18670 leak(s) beyond -report_leak_max
    ~~Dr.M~~ Details: C:\Users\tsaukpaetra\Downloads\DrMemory-Windows-1.11.0-2\drmemory\logs\DrMemory-HypatiaServer-Win64-Shipping.exe.23932.000\results.txt
    ~~Dr.M~~ WARNING: application exited with abnormal code 0xc0000005
    


  • @tsaukpaetra It thinks the code is reading null pointer for some reason. You can try suppressing it; there is some mechanism for that. And if the code does not crash—which it totally should if it was actually reading null pointer—it might even be worth trying to get some upstream support, if they are responsive (I didn't try myself).


  • Notification Spam Recipient

    @bulb said in WTF Bites:

    @tsaukpaetra It thinks the code is reading null pointer for some reason. You can try suppressing it; there is some mechanism for that. And if the code does not crash—which it totally should if it was actually reading null pointer—it might even be worth trying to get some upstream support, if they are responsive (I didn't try myself).

    Well, it's not exactly wrong. To my observation, it's not creating the log window it's apparently trying to write to. But I have no idea why it thinks it shouldn't be creating said window, unless it figures that since there is an attached debugger it's expecting to write to stdio?

    Does Dr. Memory hook up those pipes? :/



  • @tsaukpaetra I don't think so. It has the visualstudio mode where it redirects its output (and I think the output of the program under analysis too) to the OutputDebugString, but otherwise it just passes whatever standard input/output/error it got itself. But I didn't need to fiddle with that, because our binaries don't fiddle with it either.


  • Notification Spam Recipient

    @bulb said in WTF Bites:

    @tsaukpaetra I don't think so. It has the visualstudio mode where it redirects its output (and I think the output of the program under analysis too) to the OutputDebugString, but otherwise it just passes whatever standard input/output/error it got itself. But I didn't need to fiddle with that, because our binaries don't fiddle with it either.

    Yeah. :mlp_shrug:
    Perhaps if I get it to insert itself in with Visual Studio it might work better, but I'm lazy...


  • Considered Harmful

    Realm Royale crashed, and I got the crash report information box. It then gives me a notification that my report has been submitted to a particular URL, and to click here to open it. And what do I get but...
    https://i.imgur.com/0n8lFwX.png
    Send username/password information over an unsecure connection? No thank you. And then I get a 401 Unauthorized when I refuse to enter them. I don't know why my crash report is private information in the first place, I don't know what credentials I'm supposed to be entering there, I don't know what prevents them from using a login form instead of HTTP authentication, and if I'm not actually supposed to access it I don't know why it gave me the link.



  • @bulb said in WTF Bites:

    The changeset had comment saying it was fixing memory leaks (found by a leak detector, specifically Dr. Memory (which is similar to Valgrind, but works on Windows)) and was associated to task requesting the same.

    Sigh.



  • @pie_flavor HiRez IT has never been great. I imagine the crash report should be accessible to you, but had to be secured once some securitycreature said something about "direct object access by URL" and OWASP.



  • WTF of my day: So, I got this new Geforce 1080Ti. The packaging praises its ability to stay at 0 dB in desktop mode and quite silent otherwise. It actually did that until yesterday.

    Yesterday was the moment where I fired up a game and suddenly noticed that I had a jet turbine next to me (or so it sounded. I'd estimate it to be around 65 dB). Due to the multitude of fans in my case it took me a while to identify the culprit.

    Basically, the card has three fans, one of which is obviously used as a reference of sorts. If that fan, as in my case, does not turn the other two fans will go into some sort of emergency mode when reaching 40 °C and turn at 100% all the time even when the temperature falls below that threshold again.

    Brought the card to my vendor and will receive a replacement. That's not the wtf, though.

    The actual :wtf: : If such an important fan does not respond to commands and reports 0 RPM why on Earth doesn't the corresponding vendor software or anything else really notify you of this problem?


Log in to reply