::::: : the wood : davidrobins.net

A frustrating few days

News ·Tuesday February 28, 2006 @ 22:50 EST (link)

15 bugs at the start of the week, goal was to get to 13, reasonable enough. By the end of Monday, I had 10 more bugs (I don't meant to imply I'm alone in this, either; the whole team was getting swamped). Probably another six or seven on Tuesday, with maybe five total fixed between both days.

By now I've accumulated about 25 fixes which I want to check in, so on Wednesday I run the quick tests, which pass after a minor fix, and sync up my changed files with the current build; I lose just about the whole day to build breaks (it's primarily the usual suspect, the installer (.msi) client project). Thursday I try to run the remote test suite but I have a huge failure count. On looking at the screen shots, there's a random "Microsoft Office can help" dialog popping up preventing several tests from working. I eventually track down a fix, or at least a workaround, tests pass, I check in, yay. It's now Friday evening and I'm up to 28 bugs.

It's a busy weekend, but there is light at the end of the tunnel; at 0400 Monday I'm down to 13. A few highlights
  1. Extra item shows up in the schema collection. Pretty simple, although a pain to track down: just an off-by-one in a string copy, so simpleSchema.xsd becomes simpleSchema.xs. Other code references the schema, which isn't found by the original name so another entry is created with the right name.

  2. Undead toolbars. Create a new custom toolbar, restart, delete the toolbar, restart, it's baack! Little trickier: turns out every "main window" clones the toolbar, and on delete one wasn't getting removed—the one in the VBA window (I was distracted by a comment that claimed otherwise).

  3. Incorrect correction. On Japanese Word, when \alpha is autocorrected to α, the "stop autocorrecting" item on the "on object" floating menu was always checked. Turns out that in Japanese, sometimes backslash and the Yen sign are equivalent, sometimes not. When you type \ it displays as ¥ but still acts as a backslash for autocorrection. However, we fetch the display text, not the document text. When we populate the floating menu, we check if there's an autocorrect item for ¥alpha, and when there isn't, we assume the user has turned off autocorrection for it. Fix was to temporarily turn off the "convert backslash to yen" flag when formatting text for the autocorrect lexer, although this still needs to be examined to see if we always want to convert in this case.

  4. Another set of settings. Creating another Word application and toggling an option fails. Turns out it crashes the other Word because the application was created without a window, and somebody was assuming we had one. Only tough because it required debugging another instance and because someone threw a spanner into the gears of my finely-tuned debugging environment (remember those remote tests I was trying to pass earlier? the Office test framework guys like to stomp all over everything and not clean up after themselves).

Watched The Devil's Own and Saw II (one can only work so long) plus we're going through M*A*S*H again. We're still going over to the house every few days to drop off boxes, mainly books but also random office supplies, today our bikes, and some boxed china.

And finally: a bug bounced its way around Office, finally getting handed to me by the Word dev manager (speaking of Word dev, we had our group meeting today and everything seems to be on track, although there's still lots of work to be done). A customer has a VB (not VBA, VB 6 actually; positively ancient and losing support fast with the takeup of VB.net) application that worked fine in Office 11, but slows to an absolute crawl on Office 12, except when run under the VB 6 debugger.

I tracked it down to our idle loop: VB calls us through a "component manager" interface so that Word can run various idle tasks (cleanup, delayed layout, etc.), apparently when user code calls DoEvents (and their code calls DoEvents thousands of times in a loop for some reason). If there's nothing much going on, we don't want to just wait around so we give back time to the operating system, as well-behaved programs ought: a second here, 500 ms. there, 60 ms. somewhere else, as it happens. That's all fine and good most of the time, but not when we're being called thousands of times by an external program. Turning off these delays in the "component manager" case caused an amazing speed increase. We may not want to turn them off entirely, just if we're called in rapid succession; I'll get consult some other devs in the area to see what the best fix is. That was nice to nail down, though. Setting up the client program was a bit fiddly; I could debug on my own machine, but it had to be as an OEM test user so their program would install properly.

I'm in the market for a lawn mower; I'm thinking of going with a Black & Decker rechargeable (cordless) model: no cords, no gas, what's not to like? I also got a lot of good lawncare advice from the previous owner of the house. I'm also going to get a spreader (for fertilizer, pesticides, etc.) and a set of shears; that should do for now. We still need to get a washer and dryer, although we're pretty sure which we want, a nice refurbished set from the Sears outlet in Tacoma. Also our furniture (sofa, loveseat, chair) will be arriving in a few weeks.