The App Compat Guy

Chris Jackson's Semantic Consonance

June, 2009

  • The App Compat Guy

    ACT 5.5 in Non-English Locales Not Recognizing Date Strings: Workaround and Long Term Fix

    • 5 Comments

    I’ve been seeing a number of reports on an error while synchronizing with ACT, with an error message indicating something along the lines of:

    String was not recognized as a valid DateTime

    The errors have thus far come from Germany and The Netherlands. The team has already investigated the issue – it is, indeed, a globalization bug. They have a fix in place for ACT 6.0, but for now to work around the problem you will need to change the Windows locale to English-US. Sorry for the inconvenience, but wanted to unblock those who were confused by this by sharing the workaround.

  • The App Compat Guy

    TechNet Podcast on Windows 7 Application Compatibility

    • 0 Comments

    A few weeks ago, I sat down with Wayne Applehans to record a session for our TechNet IT Managers “The Big Show” – it’s posted here:

    http://technet.microsoft.com/en-us/itmanagement/default.aspx

    Here is the transcript, if you prefer to read rather than to listen:

    You are listening to a Microsoft Podcast for IT professionals. For more great content please check out www.microsoft.com/podcasts.

    John Baker: Good morning, good afternoon, and good evening everyone. This is John Baker for TechNet Radio. Today’s show is Wayne Applehans. He is the director of technical audience marketing at Microsoft, and he is going to be talking to Chris Jackson, who is the technical lead for the Windows Application Experience SWAT Team. And they are going to be talking about application compatibility in Windows 7.

    Wayne Applehans: Hello everyone, my name is Wayne Applehans, director of technical audience marketing at Microsoft and I want to welcome you to our April edition of the Microsoft Platform Dialogue series. This is our monthly interview. We open up and talk to the experts, both inside and outside of Microsoft about the latest trends impacting IT, and the resources and guidance available to help you plan and deploy the latest Microsoft technologies.

    A much anticipated topic of Windows 7 is the center of our discussion today, and joining us from Microsoft is Chris Jackson. Hey Chris, how are you doing?

    Chris Jackson: I’m doing great, how are you doing?

    Wayne: Great Chris. So we understand that you are the Windows 7 app compat guy. Can you give us a little bit more information about your experience? What do you do at Microsoft?

    Chris: Sure. Well I am the technical lead for the Windows Application Experience SWAT Team. We’re a worldwide team that is the highest level of escalation for application compatibility issues in the enterprise, so we could go onsite to customers around the world and figure out, you know, what is it that is being a blocker in terms of application compatibility to both fix that specific problem and also bring in the organizational learning of how can we avoid other people having those same problems and share that knowledge.

    Wayne: Awesome. Well we appreciate your time today helping us to break down the topic of application compatibility with Windows 7, and I know that it’s a topic that’s at the top of the mind for a lot of IT managers and IT professionals thinking about jump starting their planning process. So let’s go ahead and jump in. There’s quite a bit of buzz in the press today and in the blogosphere about Windows 7. In fact, I was in Hanover recently at the CeBit Conference and it was standing room only for the Win 7 demos. So Chris, let’s start with the big perception that’s out there today about Windows 7 really being Vista SP3, or what did you refer to it earlier today when we were talking?

    Chris: What I have been referring to in my own side conversations is “The Great Vista Do Over”. Our opportunity to fix all of the things we didn’t do right on Windows Vista.

    Wayne: So do you think the confidence level should actually be higher for Windows 7? What’s changed in it, as IT pros think about their migration path from XP, or if they’re on Vista, what’s changed, what’s going to help them make that leap in terms of migration and deployment?

    Chris: Well I think there are several things that have changed. First of all, the passage of time itself has helped matters. When Vista first came out, we simply broke so many things, and you couldn’t buy a version that worked, that we blocked a lot of people from being able to get there at all, it was simply impossible. The ecosystem has had time to catch up to that, and thereby now you actually have an option to go buy something that works, and that’s pretty important.

    Wayne: I’ve heard that the goal is for everything that worked on Windows Vista to continue working on Windows 7, which is probably somewhat unrealistic, and I’m just wondering, we know some apps are going to fail, can you give us some examples of the types of things that may regress in this process?

    Chris: Sure, and you are exactly right. I mean, anytime you change code at all you have the potential for a compatibility problem because you never know what kind of things people are depending upon. So what I normally do is give two examples of software that didn’t work on certain builds of Windows 7, one of them which we addressed and another that we didn’t address directly to the operating system, we used a different technology, because I think those examples are going to showcase the decisions that we’ll make.

    Let me give you an example of one that we fixed directly. If you run Microsoft Money, and I know it’s the 2008 version, and also I believe the 2007 and 2006 version, if you’ve got one of the previous released versions, if you run that on the data build, the seven thousand build, you’ll notice it pops up an error. And if you debug the error activity, which typically takes about a day or two by some of our top debuggers to figure this one out, what we eventually discovered was that the bug itself is one in the Internet Explorer controls that are being hosted by Money. And one of the buffers that it is using to pass a string around depends on you being able to overrun that buffer by two bytes, and that’s a bug that’s been in Windows since Windows 95. Someone fixed the bug and surfaced the fact that Money, and probably a lot of other apps, depend on that behavior, they expect the bug to be there. So what we had to do in the operating system to fix that is put the bug back in. So we just over allocate the string by two bytes every time you request it. So we’ve now made it so it’s no longer depending on a buffer overrun because we’ve actually allocated enough buffer memory, but it’s always over allocated to account for that software dependency.

    Wayne: Wow, that’s the first time I’ve ever heard of us actually knowingly putting a bug into software. That’s awesome. So if I’m an IT pro, and I just finished up a lot of work migrating to Windows Vista, what is Windows 7 going to do? What is that going to mean to me? Will I have to repeat a lot of that work? What are your thoughts on that?

    Chris: Well when it comes to the work with Windows Vista, the majority of what you are doing is you’re updating it to meet the new security requirements that we began enforcing, starting with Windows Vista, things that were always in the guidelines, that you ought to do this, that this is really recommended, this is what you are supposed to do, but if you didn’t you got away with it, suddenly you couldn’t get away with it anymore, so we started enforcing those. We have not gone back on that bet at all, so all of the investments that you’ve made to get your applications working as a standard user are going to continue to pay off.

    And in fact, if you are an enterprise who is using, for example, shims to keep software working without having to update the source code or buy another version, one of the greatest demos that I’ve seen done, it was actually Jeremy Chapman, one of the guys in front marketing, who took my demo app and the shim demo that I put together for our technical conferences, fixed it up in Windows Vista, took the shim database, fixing that application, dropped it in the USB key, pared it to Windows 7, installed it unchanged and the same apps continued to be fixed on Windows 7, with even shims continuing to work. So it’s just super important to us that we respect that. We can’t always do it. There are some dependencies, particularly when applications are hooking the operating system, which it’s kind of remarkable how many are. But for the most part we’re going to keep anything that’s reasonably well behaved continuing to work.

    Wayne: So if you had a few minutes with an IT professional, maybe it’s the desktop support engineer or the IT manager of a mid-market company, and they were talking to you about considering an upgrade to Windows 7 in the future, what would the three things be that you’d share with them in preparing for that migration?

    Chris: Well, the first thing is to be thinking about the application compatibility work that you need to do earlier rather than later. If you have a reasonably large application portfolio, I’ve seen some of the application compatibility projects take 18, sometimes even 24, months. A lot of that is simply because you have some fairly major projects to fix software along the way. Maybe you’ve started up a new development project for some internally developed software. You want to get started on things like that as early as possible. If you know today, that running as a standard user, or running as a protected administrator with UAC turned on, causes your application to have a problem, yet there’s really no reason to wait until, you know, if you’re waiting for Windows 7 RTM or even Windows 7 SP1, you shouldn’t have to wait until that shifts to start addressing those problems now to shorten that time later.

    The second big recommendation is if you have people writing internal software, figure out what you want your future desktop to look like, if you want standard users, if you want to be on Windows 7, or at least Windows Vista, get your developers who are writing software creating software in the environment that you’d like to see so that they will stop developing software that depends on the current environment which you may be trying to modify in the future.

    Wayne: Right, so being proactive and really thinking about the modern operating system where you are heading sounds to me like a really important discussion to have with your developers and your line of application business owners as well in your organization. So, what’s the third thing that you would ask them to do?

    Chris: I don’t think I have a third thing.

    Wayne: Well you don’t have to have three. So as part of the SWAT Team I assume that in addition to you shared with me a bit about the application compatibility toolkit, what other resources are available to our customers as they begin planning for this work?

    Chris: Well, we’re doing a number of things. Like I said earlier, I described Windows 7 as the great Vista do over. Well a lot of what I mean by that is what are the different things that we can do strategically or the different activities we could be taking? The number one activity that I’m seeing a lot more efforts going on around are not simply looking at the technology, but looking at strategy and best practices. It’s a conversation I’ve been having for a while over trying to formalize it to say do things smarter, think about application management, and reducing your inventory. If you’ve got 20, 30, 40, and I’ve seen as high as 92,000 apps in an organization, what you need to do to make yourself more agile is not to be able to have more highly trained technicians, you need to dump a lot of those apps, and you need to have a strategy for how you are going to fix them, so that there the people doing the remediation know what the bounds are, and really approach things strategically at first, and not just launching directly at the technology. So we’ve got some initiatives going on there to help deliver that message, both from Microsoft and from our partners, we’ve got some great technology solutions, we’ve done some good investments in ACT to make it easier to use and to bring in a lot of the community data, we’ve gone to the Windows Compatibility Center, which is windows.com/compatibility, that now finally integrates with that. It will starting at the end of the month, so I am promised. It’s a pretty reliable source, so I’m pretty sure that will actually take place, so we’ve done a lot of work on the tool side. And then of course, from my perspective, I’m the guy that goes out fixing things, I need all of my latest debugging tools for Windows, I need all my sys internal stuff, and I need LUA Buglight. All of those things put together give you a pretty good toolkit to solve anything you can come across.

    Wayne: Sounds great. So building on that, what cool things are you excited about personally about Windows 7? And when you think about the IT professional, or even the consumer for that matter, what gets you pumped up for Windows 7?

    Chris: There are a number of things. First of all, I think you’d notice immediately when you start using it is the performance. It is just in every country I’ve been to around the world has commented on the performance. It’s so much snappier feeling, it just feels better to use. Certainly, the user interface, we certainly did some work to lay the foundation in Windows Vista, but the most noticeable thing was this cool pixel-shader thing, which unless you’re a real hardcore geek, you don’t even see how cool that is, you just think “Okay, it’s see-through. Great.” Now we’ve got some really great behaviors in the user interface for helping them manage Windows better. There’s just a lot more for people to get excited about and to sort of feel better while using it, as opposed to the real geeky under the cover stuff, which really represented the story on the most exciting features of Windows Vista that only the geeks really cared about.

    Wayne: Sounds great. Hey Chris, is there a website that you would recommend our listeners to learn more about app compatibility and Windows 7 planning?

    Chris: Well we’ve got a TechNet portal on technet.com/appcompat. We try to keep that up to date with all of the latest links on tools, guidance, and white papers. We also try to divide things out by what is the role you’ll have in this exercise, so we can try to filter things down to the documents you may find interesting. Something else we’re trying to get is more targeted guidance so that we don’t give you “Hey, here’s the C code that’s compatible” if you’re an IT pro that just wants to learn how to fix a broken app.

    Wayne: Well that’s great. We can definitely point our listeners to TechNet. And I want to thank you for your time today Chris, and wish you the best of luck as we move forward with Windows 7 planning and I’m sure our IT pros will appreciate this information today. Thanks to our listeners for joining us today. We spent time with Chris Jackson with Microsoft discussing ways in which Microsoft can help jump start your Windows 7 planning efforts. I’m your host Wayne Applehans. Please join us in May for our next session on making the most out of business intelligence.

    Thank you for listening to this Microsoft Podcast for IT professionals. For more great content, please check out www.microsoft.com/podcasts.

  • The App Compat Guy

    Stock Viewer Shim Demo Application - Now Available in Japanese!

    • 1 Comments
    I have had the Stock Viewer Shim Demo application available for over a year now, and I'm delighted at how much impact it has had. I see people using this all the time! But previously it was available only in English. Well, no more - it has now been (mostly) localized to Japanese! Enjoy.
  • The App Compat Guy

    TechEd 2009 Recap

    • 0 Comments

    I’m still catching up on my conference recaps…

    TechEd US was another busy conference this year, with a ton of great interactions and lots of activity around Windows 7 to keep things interesting. We ran a Windows 7 application compatibility lab again, and had more advertising than ever, but the folks who were staffing that spent a lot of time bored. Perhaps that’s a good sign for app compat for Windows 7? (Hey, I’m trying to look on the bright side.)

    I delivered 3 breakout sessions this go-around: one providing an overview of application compatibility for Windows 7, one talking about how to fix applications using shims, and one going into hard core debugging for application compatibility issues. How did I do? (As always, I list the rank order of my session against all other sessions at the conference with 10 or more evaluations, in this case 396.)  The good news is that I was in the Top 10% of scores for almost every attribute of my sessions, with one exception (debugging – we’ll talk about that in the analysis).

      Win7 Overview Shims Debugging
    Overall 12 18 47
    Valuable Information 10 33 37
    Knowledgeable 3 5 26
    Effective Speaker 10 14 51
    Effective Demos 4 9 42

    And the comments?

    Win7 Overview

    Chris is an incredible presenter. I try to make it to all of his sessions each year. He is great to work with outside of the sessions as well.

    Chris was able to take a dry subject and make it fun. Good presentation. Good examples/demo.

    great session ... great speaker

    Great speaker, was able to maintain captive audience.

    I had to leave, Chris was yelling over the mic and after 15 minutes I was getting very exhausted of trying to listen.

    I was hoping for more how to fix my apps. Found out that there is another session for that, so I'm attending that one too.

    informative and on subject.

    outstanding speaker

    Over 75% of the audience were still on XP. Discussion would be more affective if it went into migration of XP to Windows 7 instead of going from Vista to Windows 7. Not much difference from this latter migration.

    Per the session title, I expected more demos and hands on examples on fixing application compatibility issues.

    The speaker did an absolutely fabulous job discussing the things that we need to consider when moving to Windows 7. If there was one area of improvement, I would have liked to have seen more information related to moving from XP to 7 instead of Vista to 7. Many of our enterprises have a lot of work to do, so thank you for making sense out of most of it.

    Shims

    Awesome session. Thanks.

    Chris Rocks!!! Very good presentation and his expierence and depth of knowledge just made this great. Thank you ...

    Even though the speaker took a survey of the audience and most people responded that they did not know what a shim is, the speaker still did not define what a shim is, or mention which various applications he was using in the demo to fix the problems. He did show how the process works but, for example, he used "Standard User Analyzer" and I have no clue where he got it from. I left early for a different session.

    Great session.

    Had no idea I could fix some of those nagging legacy apps to work. This was a very powerful presentation and made me feel very enabled! nice job!

    I was unaware of shims previous to this session, can't wait to get to creating my own.

    This presentation was on a topic that we probably won't have to face at my company. However, the presenter was very knowledgeable and effective. The information I picked up here may come in handy, in case I need it.

    Very interesting, demystified app compat for me to a great extent

    Debugging

    A bit over my head, but definately a good session.

    Chris is a pleasure to watch. One day I want to be Chris Jackson

    cjacks is a great and lively presenter who knows his stuff

    Excellent session - not for your typical TechEd attendee. Outstanding delivery and extremely useful material.

    good thought provoking session. Thanks!

    I'm not a developer or a debugger, but Chris made this presentation one of the best of TechEd!

    Phenomenal

    Here are my take-aways from this data:

    Scores aren’t as informative as comments. Thank you to everyone who took the time to fill out comments, it really is helpful in helping me interpret the data that I receive. If you take a look at the numbers alone, my overview session was the highest rated session. However, the comments revealed some mixed feelings. My debugging session had ratings that were mostly not even in the Top 10%, but received comments that defined people who were extremely enthused. Which leads me to this:

    A Likert scale has the fundamental flaw of clipping feedback. As pointed out above, the debugging session was clearly the lowest rated session, and to some extent that was expected. I set out to go hard core. I called the session “Not For the Faint of Heart: Hard Core App Compat Debugging.” But, despite that, people are still going to show up and think it’s too technical and get lost. Those people aren’t going to give you the great scores. However, for people who are delighted, the score doesn’t capture that delight. It’s one of the risks of presenting something that’s almost necessarily going to divide folks along these lines. But I’d rather actually give you something that delights you at the expense of going over some peoples’ heads, because sticking to the least common denominator means you can never go hard core geek. I like to have a little of that around – the burden is mine to keep the quality levels high enough that we can continue to have sessions like these despite alienating a few people.

    I appear to know what I’m talking about. This is the area of highest ratings across the board. Thanks for that – it makes me feel great!

    I need to figure out some way to do Windows XP – Windows 7. I’ve been presenting on the delta from Windows Vista to Windows 7, not only because the delta from Windows XP to Windows Vista is so thoroughly documented, but also because it’s really hard to fit that into a single hour. (I deliver a 2 day workshop covering this – how do I squeeze that into 1/16 of the normal size?) However, it’s coming back loud and clear that making you connect the dots isn’t working so well.

    Mic check at normal volume. I had one dissatisfied attendee who thought I was yelling. I don’t really so much yell, per se, as have a voice that carries well enough that I seldom actually need a microphone. So, when I do have one, it can be kind of loud. Fortunately, this feedback came in the first session, and I was able to do better mic checks for the other 2 sessions.

    One day I want to be Chris Jackson. OK, that’s just the most f*ing awesome comment ever.

  • The App Compat Guy

    MMS 2009 Recap

    • 0 Comments

    I’m a wee bit behind on reflecting on the conferences that I was fortunate enough to participate in, but I like to spend the time to think about it. I guess to some extent it’s probably fairly selfish of me, because I think that the most frequent user of this data is me (I use it when I’m looking back and trying to remember what went right and what could have gone better), but hopefully you can forgive my indulgence.

    I was at MMS 2009 this year, and other than participating in a chalk talk and spending some time at the booth, I only ended up delivering one breakout session (which is rather abnormally small for me at a conference). How did it go? Well, it was in the Top 5 list for Friday sessions, but as always, I like to compare myself to all other speakers for the entire week, and see where I fall in the stack ranks.

    The good thing is: I was in the Top 10% of all sessions (there were 146 with 10 or more evaluation reports) for all but one variable. And the results are rather interesting to reflect on, because I took an altogether different approach for this session than my normal session deliveries (mostly because it’s a completely different audience, one that I struggled to connect with at MMS 2008). Here’s how I landed:

     

      ACT 5.5
    Overall 20
    Usefulness 15
    Knowledge 15
    Presentation Skills 15
    Slides 12
    Demos 15
    Relevant 13
    Technical Content 12
    Average 15

    And here were the comments from the evaluations:

    Chris, excellent session on ACT. Will be email you soon.

    Great presentation. it gave me a lot more information than i had expected to get. I am glad i stuck around for this last session.

    Had to leave early, but enjoyed what I saw. Look forward to downloading the .WMV file as seeing what I missed.

    This was the best session of all week. It was very very intresting and the presenter was really really good

    very good info

    Very valuable info - I will be showing slides and recordings to Testing team - I hope they will be as excited about this as I am!

    Since I don’t have a pile of sessions to compare what went well and what didn’t I just have to look at attributes. So, here’s my take on this data:

    ACT Talks that go a little bit geeky fill a gap. There have been talks about ACT for years, and 5.5 wasn’t that different. This talk could have been the epitome of mediocrity, but going geeky and finally answering some nagging questions (not to mention ensuring that we understand where the rubber meets the road) led to some decent scores. This is going to inspire me to continue to talk about internals and give you more raw data in order to drive your decisions.

    Whatever made people think the session was mostly good isn’t captured on these attributes. It’s hard for me to figure out why I dropped out of the top 10% for Overall Sat when I’m in the top 10% on all of the attributes we’re measuring.

    I can deliver slides and still be technical enough. For those of you who have seen me present at other conferences, one of the things I commonly do is present mostly demos. In some cases, it’s even 100% demo. Here, it was mostly slides, and I managed to receive good scores for both the quality of the slides and the technical content. Nice.

    Talking about ACT was timely. With the impending release of Windows 7, there are a lot of people interested in this. Let’s make sure we keep ahead of the game and ensure we’re giving you the information you need when you need it.

  • The App Compat Guy

    PCA Changes for Windows 7: How To Tell Us You are Not an Installer, Take 2 (because we changed the rules on you)

    • 10 Comments

    I have an ongoing conversation with a customer whose application is now popping up a Program Compatibility Assistant dialog box, where it didn’t used to before (on either Windows Vista or Windows 7 beta). What’s going on?

    Well, when I cracked the resources for the binary, you can spot right away that it’s going to trigger installer detection, given the presence of the word “Install” in multiple places. You can also turn on shim diagnostics and see that it’s wiring up with GenericInstaller.

    But why wasn’t it popping PCA on Windows Vista? Is this a new PCA scenario? I explored that, and discovered that it was Scenario #1 – an app that we detect as a setup doesn’t leave anything behind in Add/Remove Programs. That suggests possible failure.

    So, existing scenario, new PCA prompt, and the final bit of evidence: the application doesn’t prompt for UAC Elevation on either Windows Vista or Windows 7. You should now be able to connect all of the dots.

    The application has a UAC manifest.

    On Windows Vista, the presence of a UAC manifest disables PCA. On Windows 7, that’s not good enough. You have to have one of the new-fangled Windows 7 GUIDs in your manifest to avoid PCA annoyance.

    So, if you’re following along, here’s what happened:

    • Customer has an app that looks suspiciously enough like an installer that the operating system is trying to intervene and make things work
    • Developer notices that, doesn’t want/need the elevation, wonders how to make it go away, and discovers our documentation saying how you can turn off setup detection by including a UAC manifest – being good law-abiding citizens, they do exactly that (at their own expense)
    • Unbeknownst to the developer, we came along behind their back and changed the rules to make our previous guidance null and void, and once again we’re annoying their users with dialog boxes that make the developer look bad
    • Now the developer, if they wanted to make their users happy, would have to stop what they are doing, update their currently shipping app to include a manifest for an operating system that isn’t even released yet, so that Windows 7 can be more successful by having a more compatible and friendly OS (at their own expense)
    • Repeat for every subsequent version of Windows, as the Windows 7 GUID would no longer indicate Windows 8 compatibility either when it comes along

    Does anyone else see anything wrong with this picture?

    I’m trying to see what we can do about this, because I don’t think we’re being fair to developers right now. I believe that an asInvoker manifest is a pretty darned good indication that you’re not an installer, both from the perspective of GenericInstaller and PCA. I have absolutely no idea why somebody would disagree.

    In the interim, rather than gripe about this (if you only know how many not-so-polite words and pejorative phrases I have already deleted from this blog post, you’d likely be very disappointed in me), I figured I’d tell you how you can fix it until whenever / if ever we address this:

    Shim your application with SpecificNonInstaller.

    I know of no other way to tell setup detection that “hey, you’re wrong” that will survive into the future. Because UAC Manifests only work on Windows Vista, Windows 7 Manifests will presumably only work on Windows 7, and who knows what you’ll need in the future?

    What I don’t understand about PCA is, why haven’t we learned our lesson that asking the user a question every time we’re confused isn’t the right approach? <sigh />

  • The App Compat Guy

    Springboard Virtual Roundtable on Application Compatibility

    • 0 Comments

    This Thursday, June 18, 2009, my friend Mark is hosting a virtual roundtable on Windows 7 Application Compatibility. Alas, they didn’t think to check my schedule, and I have a customer commitment this week (and I do not ever turn my back on a customer) so I’m not going to be able to make it. However, even though I am “The App Compat Guy” I’m still just a guy, and the show must go on – and they’ve filled the room with enough interesting folks that I’m sure nobody will miss me. We’re also planning a second part to the series for shortly before RTM, which I’m going to be blocking off in advance, so none to worry if you have some strange desire to have a look at my ugly mug.

    Thursday, June 18, 2009, 11:00 am Pacific Time

    https://ms.istreamplanet.com/springboard

    Enjoy! And make sure you send in question to stump them in advance. vrtable@microsoft.com is the alias to email your questions to. Seriously, make them work for it! :-) (Perhaps you can ask for some code examples on using the Sdb* APIs?) My friends from ChangeBase and AppDNA will be there as well, so it really should be worth your time.

  • The App Compat Guy

    How to Fix the ACT 5.5 Persistence_FlushSqlError

    • 5 Comments

    I’ve seen this error come up a few times now, and there’s a (dirty, ugly) hack you can use to fix it. So, for those who are fans of dirty, ugly hacks, here you go.

    If you see the error:

    ACM encountered the following error while performing synchronization:

    Persistence_FlushSqlError
    Violation of PRIMARY KEY constraint ‘IssueSolution_PrimaryKey’.
    Cannot insert duplicate key in object ‘dbo.IssueSolution’.
    Stale Data
    The statement has been terminated.

    Would you like to retry?

    You can fix it by (remember, I said it was a dirty, ugly hack) removing the constraint:

    ALTER TABLE [dbo].[IssueSolution] DROP CONSTRAINT [IssueSolution_PrimaryKey]

    Good luck, and sorry for the bug.

  • The App Compat Guy

    The Case of the SUA Missing Log File

    • 0 Comments

    Since I’m using Mark’s tools, I figure I may as well steal his blog title scheme…

    I had a customer come to me with a question on Standard User Analyzer (SUA), looking for an explanation for why it was coming back with the following error:

    Failed to load log file C:\Users\…\AppData\Local\Temp\sua
    No (valid) log file is found.

    I asked him to try opening it up in Application Verifier, which he was able to do successfully.

    So, now we knew that the problem was somewhere between collecting the data and displaying it – we’d narrowed down the surface area rather significantly. What happens in that time? Well, SUA is kind enough to tell you. First, it clears existing logs:

    Executing: cmd.exe /c "del /q "C:\Users\…\AppData\Local\Temp\sua""
    Returned : 0

    Then, we export the logs we just created:

    Executing: "C:\Program Files (x86)\Microsoft Application Compatibility Toolkit 5\Standard User Analyzer\SUAnalyzerSrv.exe" exportlogs "C:\Users\…\AppData\Local\Temp\sua" "(symbol file directory)"
    Returned : 0

    Finally, we view it, but this was the step which was failing. We could browse to the temp directory it was using and discover that it was, indeed, clear, so now we know that the command to export logs was our most likely suspect. But it was returning 0, which presumably meant success, so we had very little to go on.

    Fortunately, I was able to find a repro relatively quickly. And, when in doubt, use Process Monitor.

    I didn’t even have to go any further than the process tree. I found the call to SUAnalyzerSrv.exe, and it made a call to appverif.exe – Application Verifier. Here was the arguments it was passing:

    appverif.exe -export log -for AppVerifier Bug Generator.exe -with To=C:\Users\…\AppData\Local\Temp\sua\AppVerifier Bug Generator.exe.0.xml Log=0 Symbols=(symbol file directory)

    It’s when you see this that you probably notice something: the name of the binary … has a space in it.

    I renamed the binary to remove the spaces, and it worked. No problems importing. So, I filed a bug against SUA, and it’s going to be fixed for the next release. In the interim, if SUA isn’t working as well as you’d like, well, the EXTREMELY hacky workaround may be to rename the binary…

Page 1 of 1 (9 items)