top of page
Writer's pictureGraeme Devine

I am Bug Hunting Batman

Bug hunting.


It’s the easiest and sometimes the hardest thing to do.


For the image processing we use Google Mediapipe which is great, but for logging it uses glog, which it notes, doesn’t work that great on windows. Since I can’t actually straight up put anything from mediapipe into a debugger I am somewhat reliant on logging. This leads to a lot of fun.


First of all, you’ve got to use Bazel. Bazel is the build system that is exclusive to Google. It’s not so bad except it’s only used by Google and is incompatible with everything else (things like Visual Studio, Unreal etc., you know, the rest of the world). It also uses Python. But on Windows. It doesn’t quite work with Python properly so you have to add that to the bazel command line. Except that doesn’t always work, so it’s easier to use the bazelisk program that makes sure it works and why that program isn’t called bazel is a mystery to me I’m not going to go look at.


So. The pose calculator isn’t loading. I’ll try a debug build in Unreal. Nope, definitely in mediapipe.


I’ll try a debug build there. After it compiled the 4,352 files it decides that it can’t link with OpenCV because… Windows and I’m using OpenCV as a DLL.


So I go back to logging. It’s easy, just add —v=2 from the command line. I do that. Nothing. I debug the macro. Nothing. Mystery code. Endless macros upon endless macros. I change the code to override and just print the error logging, it overrides my override and makes the file read-only for the hell of it.


I take Bella for a walk.


Suddenly I think, maybe if I build a Linux computer and compile it there I can use all the magical compiler tools apparently Google loves because they have a real problem with Windows…


So then I get out an NVMe drive and try to format a USB stick to make a Linux installer boot, so I can install Linux, to install visual studio code, gcc, git, gdb, mediapipe and all the things and now debugging has me with an actual screwdriver in my hands.


Of course. I couldn’t get the USB sticks to format, because, wow, they have been in my backpack for a long time and those things are not forever sticks, so I went to Target and got a new one.


Now I’m traveling outside my house to debug a bug. Second computer at home, all in bits.


Anyway. At Target. I get all the stuff I need. Starbucks is 20% on Target Circle if you didn’t know, and so I went to get a coffee.


"What’s your name?”


“Graeme”


“Umm, didn’t quite catch that?”


“Graeme”


By the way, I’m double masked and Graeme sounds like “Greaaam”


“Okay. Sorry. One more time? “


“I’m Batman”


AND THAT, ladies and gentlemen is how you spend a day debugging a pose bug in mediapipe.



Graeme.


PS. I did tweet a shorter version of this story and Target responded:



Comentários


bottom of page