Event Information
Debugging Challenge – A mystery thriller for you to solve
The Story
Yesterday was december 1st. What a day…
In the morning I got a call and they told me that we’re having a “tiny problem”. And I am to fix it ASAP. A “tiny problem”? Quite the understatement!
“They were careless and a few nights ago I caught them red handed. But I believe they know that I know and they’re out to get me. Last week, while taking a walk, I felt a sting in the lower leg when waiting at a traffic light. Ever since then, I am feeling worse and worse. Even the vitamin injection Dr. Hyde gave me isn’t helping at all. I can’t talk on the phone, but I suspected what they are hiding for quite some time and I have deposited the essential information in an ABAP program at your workplace around 6 months ago. Unfortunately, I didn’t get to test it. You just have to get it running and you’ll know what I’m talking about when you see the output. They are much further ahead than we would have guessed! And not just since today. Just two Pixels will tell the story – sometimes even four. Make a screenshot of the output and send it to the group. They’ll know what to do. The secret project is AAAARRGHHHH”
My clenched fist slammed at the tabletop – so close… Slowly I opened my hand and realized that the lock of hair, which I had held, was the last thing I had left from Jack.
I tried to get to the place where Jack had died as fast as possible, but a team of the local crime scene unit had been faster, had collected his remains and the forensics were doing their job. While I was waiting for the examination results of the new pathologist, which came with quite a reputation, I started with the program analysis. No wonder that they had contacted me. Hardly anyone in the company knows anything about an occult language like ABAP. And even though Jack must have had an immense intuition to be able to find out about the project I was beginning to doubt his capabilities as a programmer. This was about the worst spaghetti code I had seen in ages. And there were so many errors, that if I had solved only one of them each day, I would have been able to see the correct result come Christmas eve.
Just as the autopsy report arrived, I finally corrected the last error and viewed the output. It was obvious now that Jack had been on the right track. The new pathologist wasn’t only fast but also very thorough. Besides the general information, the following findings caught my eye
- The lower leg contained a pellet made of platinum iridium filled with ricin
- Microchip in the upper arm labeled “MBGF”
- The reason for the victim’s death are unexplainable bruises in multiple inner organs.
With all this information my task was clear. I can’t delete the program because of the version history, but if I add some innocuous lines of code to hide the suspicious pixels, Jack’s coworkers can’t find anything relevant the next morning. Afterwards, I have to destroy the bag containing the umbrella, the doll with Jack’s lock of hair and Dr. Hyde’s ID card. And finally, I should visit the pathologist to demonstrate the neuralizer to her.
The challenge
Follow the link to Jack’s sourcecode:
- Correct the program, so that you are able to see Jack’s anticipated output.
- Try to identify the problemtic two or four pixels Jack talked about
- Give a wild guess, what might be their cause
- Hint at how to change the code to get rid of these pixels
- Post a screenshot of the output and mark the eliminated pixels. I’ll forward this information then to the group Jack tried to contact. And as a confidence-building measure, please send me some mail clippings of your last manicure.
Hints:
- Jack has made 24 errors in his coding – one for each day from december 1st up to christmas eve
- Almost half of the errors are syntax errors. Some of these are somewhat tricky but can happen in your daily work. And I have made each of these at least once
- Almost another half of the errors are minor misconceptions or typos which unfortunately will lead to a dump. In general, the dump’s cause will be a few lines before the dump itself or in the previous modularization unit. But there is one exception and for this a special hint:
- X should always be positive. Zero and negative values will lead to the dump. You have to identify the method that creates the wrong values and then the reason why the seemingly correct code does not quite work as expected
- The third part are again misconceptions and typos – but these won’t lead to a dump but instead will deface the output of the three expected parts.
- The two or four pixels Jack tried to talk about don’t have to be searched for with a magnifying glass. When you got the correct output, they will catch your eye. You just have to realize why these pixels are my problem and what they uncover. But then – this contest shouldn’t be too simple
- The output should basically look like this – just not as blurred
- There are no hints in the coding pointing at the big secret. It’s in the output.
- If you are wearing a tin foil hat or dwell on conspiracy theories you’ve got an advantage.
I hope you enjoy debugging a really bad piece of code and in doing so hone your debugging skills. I believe that you will find a lot of standard mistakes and truly bad programming styles and the errors that will result from this.
If you have questions or want to discuss your discoveries and speculations you’re encouraged to do so in answering to this blogpost. There will be no prize if you manage to find out about the secret project. But you will be recognized. I’ll forward any relevant information to the group Jack tried to contact. Promised!
Great initiative, Stefan Schmöcker! Thanks for this fun exercise I am sure our members will enjoy - Happy debugging!
I am Jack's hardcoded xstring.
Thank you for the Challenge!
I hope it'll provide you with some headaches and a reason to write structured code.
Looks like fun and I alrady copied the code!
Is a specific system version needed to solve this or will it work on NW 7.50 SP21 and will Eclipse/ADT 2020-12 be suitable to identify all the syntax errors?
Thanks & Cheers
Bärbel
Moin Bärbel,
Jack has written the program on a HANA-System, Rel. 7.54 and as old-fashioned as he was, he was using the SE38 Editor. But since this is just coding you should be able to use Eclipse as well.
But I just checked on another release 7.40 SP10 and there the looooong XSTRING leads to a syntax error that was not anticipated. If you replace
with
you should be fine. And using macros is just so like Jack's programming style...
Thanks Stefan!
As I'm not getting a syntax error on NW7.50 for this statement I think I won't have to go to the trouble to updating those many code-lines - lucky me!
I already got rid of the outright syntax errors and am now trying to eliminate the causes for the dumps.
Cheers
Bärbel
Hi,
What is the expected output.
Got some output but couldn’t find out what are the corrections to be done in that.
Moin Lalithya,
the original posting shows a very blurred picture of the expected output. Bascially if you see the three parts and they are all showing something you are done with the debugging.
Now comes the tricky part which has nothing to do with ABAP or programming. There are a few pixels somewhere in the output that shouldn't be there and that the narrator wants to eliminate. You need to find out which pixels these are, give a (very) wild guess what they are uncovering and ( programming again ) hint at how to eliminate these from the output.
Hi,
I'm a bit late to this party, but it's a fun challenge.
I'm done with the errors and I have a nice output. The problem is that I don't see any pixels that might be off.
Can it be that I already got rid of them by correcting the code?
Can I send a screenshot of my output to someone to verify the output and to make sure that either the output is already correct, either still contains the erroneous pixels or is still completely wrong?
Didn't want to post it here to not spoil the challenge.
Thanks.
Regards,
Geert.
Moin Geert,
it's never too late to try to save the world. Somehow I doubt that you eliminated the treacherous pixels, but maybe you have.
My Emailadress is visible in my profile details for the duration of this challenge and I can tell you whether the output is complete or not.
Up to now some people have tackled the problem but no one was able to uncover the big secret so far, so you are definitly not too late for the party. Unless maybe - just maybe - the others somehow got the impression that it's not in their best interest to contact me about their findings...