Quick Testing Challenge

Some updates and clarification below.
And a NEW HINT below too

Recently, I was discussing the diagnostic, debugging, and troubleshooting aspects of software testing, and this morning, while playing with Visual Studio 2012, I created a quick little exercise where the solution relies on these skills.

This zip file contains an app (theapp.exe), and the the vc 2012 runtime dll (both for 32-bit Windows) (note, this should be all that is needed, but if you get a load error, let me know in the comments or on twitter).

But even with the runtime, the app won’t launch. I’m sure that many of you will be able to figure out why –but I’m curious to know how you find the answer. When faced with problems like this, I have a favorite method – but I’m curious what other people do.

Two things to add:

  1. This application, does indeed launch. When it runs, you’ll have a generic windows application, and a message box indicating success.
  2. Some of you are probably thinking, “If the app doesn’t even launch, I’ll talk to the developer, since he’ll know what changed.”. But consider this scenario (which is the exact scenario that led me to create this app). You are the tester for Application Awesome. Your application is…Awesome. However, a user tells you that after installing Application Awesome, another app they love (TheApp.exe) fails to launch. WTF happened?
  3. HINTS: Think for a moment about what sorts of things an application may check on launch. Could one of them be failing? How would you (could you) know?

Similar Posts

  • My Toolbox – 2013

    On my bike ride to work today, I was thinking about my current toolbox – the tools I use on a daily basis to get my job done (or to help me get my job done). Or, to be perfectly honest, I’ve been thinking about my toolbox for a while – I just thought about…

  • Three Surprises

    I’m two months into my 18th year at Microsoft, and I still really enjoy it – most of the time at least. My job is great, I work on amazing technology, and with people smarter than you can imagine. But, for two months or so every year, the dreaded MS review monster comes out from…

  • <sigh> Automation…again

    I think this is the first time I’ve blogged about automation since writing…or, to be fair, compiling The A Word. But yet again, I see questions among testers about the value of automation and whether it will replace testers, etc.. For example, this post from Josh Grant asks whether there are similarities between automated trucking…

  • |

    End-Note

    My one-year-anniversary-of-leaving-Microsoft post (link) blew up quite a bit more than I expected. It was a reflection – and while it called out some all-too-true stories of bad management and shitty leadership, a few things I called out in the post just didn’t shout out enough over the stories. I received a lot of comments…

  • Beyond Regression Tests

    In a recent talk on test design (link), I discussed the concept of "useful tests". In my definition, useful tests are tests that provide new information. Almost every test is useful…once – typically the first time it’s run where it shows that the underlying functionality is working. From that point on, many tests function primarily…

  • A week of bad code

    Earlier this month, I spent a week in beautiful Copenhagen at what’s called a R&D Training week. The goal is that every new Unity engineer spends a week at the Copenhagen office, learning about the systems we use, and about engineering at Unity. Granted, since I’m on the services side, a big chunk of the…

14 Comments

  1. What if the main function just calls exit?
    What’s the definition of “launch”?

    I tried it with debugger and I did not see any exception.
    From the last callstack, the exit is called by the application. For me, it seems existing is the intentional behavior.

  2. Hi Alan,

    I tried the following to figure why the application won’t start –

    1. Double click, “TheApp.exe” – doesn’t start.
    2. Right and run as administrator – doesn’t start.
    3. Access Event Viewer logs and see if the application is logging any error logs. – there were no logs available.
    4. Copy the “TheApp.exe” into a new folder without the dll file – doesn’t start.
    5. Try to run “TheApp.exe” in different compatibility modes – doesn’t start.

    My next steps would then be finding out if the application requires dll or runtime software for in order for me to run it. If not, I would then go consult with the developer.

    Not sure if this what you were looking for but I would be interested in how you would approach this exercise.

    Thanks,
    Michael

      1. Hi Alan,

        Thanks for the reply.

        Okay, so no contact with the developers – check.

        My steps would be to ensure is whether the app is compatible with the Operated System that its been run from. I re-read the blog post and you mentioned 32 bit. My work machine is running windows 7 64 bit, so my “assumption” (now only if I had 32-bit VM lying around so I could test my theory) would be the application won’t start due to incompatibility.

        Thanks,
        Michael

  3. Well couldn’t get it working yet…
    So far:
    Run app
    check event logs
    run as admin
    run app
    check logs
    run as xp sp3 and a few others
    check logs
    An error, wonderful!
    Event ID 1001
    Fault bucket , type 0
    Event Name: PCA2
    Response: Not available
    Cab Id: 0
    Found this error to be kind of common with number of games, without a real common solution for it on the internet.

    Before I go further am I on the right track?

  4. LoadString fails.
    Did you miss some resource?

    Since this is not a trick game, with my CSS background, the 1st thing I would do is to use process monitor to monitor the run.

    From process monitor, there was no failure on file or registry loading. The last registry place before exit in resource related entries. The last API is LoadString.

    With this information, I launched the application inside debugger and monitored the LoadString call.

    The LoadString was called twice before exit. I changed the error handling behavior for the 2nd call of the LoadString, and the application did not exit any more.

    Based on above, I would suggest the “customer” to double check the resources. I would give the resource ID to the customer as a clue. (something like 0x67? I closed my debugger when writing this)

    It took me about 15 mins total time. ProcessMonitor is always the best tool to start with for such kind of problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.