Unfunny April Fool's Joke from the Magic Lantern Developers

IT

Magic Lantern (ML) is an unofficial firmware for Canon cameras that provides enhanced functionality (like dual-iso, focus stacking, raw video, camera parameters fine-tuning and a lot more). The firmware is installed directly on the flash card, which allows to remove it without serious consequences, or update it by simply replacing files.

You might have read other articles related to this firmware, so I’m not going to dwell on its features and the order of installation. What I will tell you about is how the firmware developers tricked me with an unfunny April fool’s joke.

All the described actions have been performed using the Canon 650D camera with the stock (1.01) firmware.

March 28th. It all started when the hunger for learning something new had reached the critical point and I found out how to perform automatic focus stacking on my camera. But this feature required installation of the unofficial Magic Lantern firmware.

A quick search showed that:

  • the firmware of the camera does not support the current ML builds;
  • there’s no stable build for the 650D model, but nightly builds only;
  • some ML functions do not work properly for 650D;
  • the authors warn that we can brick the camera by our wrong actions when dealing with the firmware.

After that, I re-flashed the camera successfully to the latest official version for Canon 650D 1.04. According to instructions, I reset all the settings and formatted the card, and then installed the latest nightly build of Magic Lantern (dated March 28th).

My eyes widened as I saw the number of settings. I tried out dual-iso, focus stacking and some other features. The first impressions were highly positive, although the obtained results were quite poor. The first view took 4 hours, during which there were no negative comments on the operation of the software itself.

March 29th. A more detailed study of the firmware has shown that I can also shoot videos in RAW format. Besides a new ML has been released. I uploaded it to the card (due to lack of experience, I updated the ML directory only). I tested the recording on the camera, but the time was running out, so I couldn’t assess the quality on that day. It was the end of the weekend.

April 1st. I am returning from work with thoughts like “I’m not going to experiment today”. But curiosity is stronger than me.

I update MP to the latest build (the one dated March 29th, but with a complete set). Run it and start to adjust… and see the BSOD on the camera.

Shock!

BSOD says that an internal error number 0x000000aa (there’s no mistake in numbers) occurred. There’s a lot of text (memory dump is ready, try to restart, check the settings, etc.) and “Your camera was bricked” (among others).

My cold fingers do a reset via the battery, as recommended by the developer. I turn on the camera and get the same BSOD two seconds after the download. F@#$%!

I’m getting nervous. Remove ML. Everything works normally.

Thinking that it is the build’s fault, I roll back to the version dated March 28th (which took me 4+ hours!).

Run it. Everything works. Okay. Adjust the camera again, being prepared to dive into the study. BSOD! WTF?!

Reset. BSOD in a minute. Format it. Reinstall. Run. BSOD. Shock. Damn!

I am calm. The camera works normally without ML, while I get the regular random BSOD with it (even in idle, when the camera is on).

Searches by error fail. They give no results at all. There’s nothing. As if I am the only one facing such problem. Go to the official forum and register there. Describe the problem. Wait.

Get a few answers fairly quickly:

  • Community asks to make a video of how this happens (IMHO, it’s useless in the current situation);
  • Someone recommends to follow instructions on the screen and upload results to the forum (results? About another successful reset using the battery?);
  • Someone else recommends to roll back to the build dated March 11th, as it’s the most stable version as for today;
  • A few messages about similar errors.

Stop. I am not the only one. The problem is new, but they cannot say when it occurred.

At first I decided to roll back to March 11th. Sleeping on it, I decided to dig deeper.

There are 10 builds from March 11th to 29th. The source code is available on bitbucket with full (I hope) change logs of the builds. Read them.

  • 2015-03-12 – options to dump the video, fine tuning
  • 2015-03-13 – refactoring, tuning, fixes
  • … a lot of other changes…
  • 2015-03-23 – works with DOF
  • 2015-03-25 – 80cee7a | Alex — Looks like some people didn’t like my bad joke

Well, well… Something becomes clear. Reading the changeset, I find the following in src/tweaks.c:

struct tm now;
     LoadCalendarFromRTC(&now);
     joke_mode = (now.tm_mday == 1 && now.tm_mon == 3);
+    if (joke_mode)
+    {
+        msleep(1000);
+        joke_mode = display_idle();
+    }

and

+        if (joke_mode)
+        {
+            if (rand() % 1000 == 13 && !RECORDING)
+            {
+                extern void bsod();
+                bsod();
+            }
+        }

What?! Joke mode? Seriously?

The explanation: On April 1st (now.tm_mday == 1 && now.tm_mon == 3 (the third month becomes the fourth when counting from zero), after loading ML, the firmware generates a random number every second. If this number is equal to 13 and the camera is not recording at the moment (thanks at least for this), get your BSOD. Since my level of luck was critically low, I caught the BSOD 5 times after loading the firmware.

April 2nd. 364 days left to random BSODs.

PS: Saying Hi to Alex, the developer who spoiled the evening of April 1st, as well as my mood and nerves. It was not funny.

Comments

    3,751

    Ropes — Fast Strings

    Most of us work with strings one way or another. There’s no way to avoid them — when writing code, you’re doomed to concatinate strings every day, split them into parts and access certain characters by index. We are used to the fact that strings are fixed-length arrays of characters, which leads to certain limitations when working with them. For instance, we cannot quickly concatenate two strings. To do this, we will at first need to allocate the required amount of memory, and then copy there the data from the concatenated strings.