Tuesday, June 29, 2010
Crash of the day
Here's a nasty crash.
Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at control_window_class.show_image(control_window_class* , study_identifier_class* , Int64 , Int64 , Int32 )
at xxx.Pacs.ImageDisplay.StudyImageViewer.ShowImage(GlobalStudyId globalStudyId, Int64 seriesRef, Int64 imageRef, Int32 frameNumber) in e:\sandbox\xxx-client-study-image-viewer_xxx65\src\xxx-client-study-image-viewer\control\studyimageviewer.hpp:line 3378
at xxx.Pacs.ImageDisplay.DisplayController.ShowConflictImage(PacsStudy currentStudy, BaseConflict baseConflict)
at xxx.Pacs.ImageDisplay.UidConflictController.ShowConflictImage(PacsStudy currentStudy, BaseConflict baseConflict)
at xxx.Pacs.ImageDisplay.UidConflictWindow.Hyperlink_Click(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.ContentElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Documents.Hyperlink.OnClick()
at System.Windows.Documents.Hyperlink.DispatchNavigation(Object sender)
at System.Windows.Documents.Hyperlink.DoUserInitiatedNavigation(Object sender)
at System.Windows.Documents.Hyperlink.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
at System.Windows.Documents.Hyperlink.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.ContentElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run()
at xxx.Pacs.Application.ApplicationStates.xxxClientApplicationMainState.RunApplication()
at xxx.Pacs.Application.xxxClientApplication.RunApplication()
at xxx.Pacs.Application.xxxClient.RunApplication()
at xxx.Pacs.Application.xxxClient.StartxxxClient(String[] args)
at xxx.Pacs.Application.xxxClient.Main(String[] args)
And the root cause? We're doing the devil's work, of course...
ERROR 2010-06-29 11:45:25,984 [MainThread] xxx.Pacs.Application.xxxClient [(null)] - GDI Objects: 666
Sunday, June 27, 2010
Toronto Tourism
Friday, June 25, 2010
Happiness is…
Knocking off four nasty issues,
on code freeze day,
while listening to Meddle, Wish You Were Here and Animals in their entirety,
at a totally inappropriate volume level.
G20
Obama arrives, and is met by John Baird.
Harper must have been in the bathroom again…
Thursday, June 24, 2010
Miss Congeniality 2010
Let the nominations begin.
I vote for this sweet young lady.
Wednesday, June 23, 2010
Tsunami warning
Fortunately, the lake - like the Conservatives - is shallow and fake.
They pressed the button, Jim
Billy: They pressed the button, Jim.Was that really an earthquake, or did Stephen Hawking push the big red button?
Jim: They pressed the button Billy, what button?
Billy: The big red one.
Jim: You mean THE button?
Billy: Goodbye, Jim.
UPDATE: It was a 5.5 earthquake, felt farther afield than Waterloo. Professor Hawking, you're off the hook, this time.
Tuesday, June 22, 2010
Happy 10th birthday, .NET
private readonly UInt32[] keyColour = {
0xFF994C4C,
0xFF1442CC,
0xFFCC2967,
0xFF73994C,
0xFF4C9986,
0xFF4C7399,
0xFF734C99,
0xFFBF4D26,
0xFF4CBF26,
0xFF13BFBF
};And some of this:
public void PaintRedDotStudyList(WrappedDataGridCellPaintQueryEventArgs ea, PacsStudy study) { if (EmbeddedReportingContext.Instance != null && EmbeddedReportingContext.Instance.EmbeddedReportingModel != null) { bool isbeingReported = false; string[] reportedStudies = EmbeddedReportingContext.Instance.EmbeddedReportingModel.StudyUIDs; foreach (string reportedStudyUID in reportedStudies) if (reportedStudyUID == study.GlobalStudyId.StudyUid) isbeingReported = true; if (isbeingReported && ea.CellImage == null) ea.CellImage = new Bitmap(22, 22); if (isbeingReported && ea.CellImage is Bitmap) { Bitmap bm = ea.CellImage.Clone() as Bitmap; if (bm != null) { for (int x = 0; x < 7; x++) for (int y = 0; y < 7; y++) if (x + y >= 2 && x + y < 11 && x - y < 5 && y - x < 5) bm.SetPixel(bm.Width - 8 + x, bm.Height - 8 + y, Color.Red); ea.CellImage = bm; } } } }
And when we missed good old Visual Basic, we brought it back to life:
////// Replacement for VB InputBox, returns user input string. /// string public static string InputBox(string prompt, string title, string defaultValue) { InputBoxDialog ib = new InputBoxDialog(); ib.FormPrompt = prompt; ib.FormCaption = title; ib.DefaultValue = defaultValue; ib.ShowDialog(); string s = ib.InputResponse; ib.Close(); return s; }
Monday, June 21, 2010
Word of the day
The word of the day today is "Galimetres".
We spent the weekend camping, and when we returned yesterday afternoon we noticed that some of the flowers needed water.
I handed the watering can to my six-year-old and we went over to the rain barrel to fill it up. She put the hose in and asked me, "Do we need two Galimetres, Dad?"
Wondering where this unit of measure came from, I took a close look at the watering can. Near the top is a line and the letters "2 Gal", which to a metrically minded Grade One student can only mean Galimetres.
MacGregor Point Provincial Park - June 2010
I need to turn in my camping license...
We arrived at MacGregor Point on Friday afternoon, for our annual Father’s Day weekend camping trip. The first stop after registering at any park is the water station, to fill up the fresh water tank. Usually, the water pressure is not very strong, so it takes a while. At MacGregor though, there was plenty of water pressure to go around. Perhaps a little too much.
I put the hose in the tank, and turned on the tap. Luckily, I caught the hose as it was trying to escape the tank. Then I realized that I may not have opened the water heater bypass. I called for my nine-year-old to come help me for a minute. Switching hands on the hose so I could hand it to her, I accidentally let go. The hose came flying out of the water tank, spraying water like... well... a fire hose. I was drenched - stiched across the thighs by the water. I managed to corral the hose and hand it to my daughter.
Then, I turned quickly to go into the trailer so I could attend to the water heater. Except, there was a huge boulder in the way. I walked smack into the damn thing, carving up my shin quite badly. I limped into the trailer and found the water heater bypass in the correct position. I took the hose from my daughter and carried on filling the tank. She hopped back in the car and said, "Dad's soaking wet, and he's got blood running all down his leg!" The cavalry did not ride to my rescue. I think they were laughing too hard.
Other than that, the weekend was awesome. We had fantastic weather, and did lots of biking on the excellent trails.
Friday, June 18, 2010
Can’t keep my eyes from the circling skies
We were loading up the trailer last night, when I heard an approaching roar.
I stepped out of the trailer and looked up – two Snowbirds were flying over.
About an hour later, a louder roar drew us to the backyard, where we saw the entire group heading East, in their Big Diamond formation.
They are flying over Waterloo right now, in fact… the crowd in the Canadian Tire parking lot was very impressed.
Thursday, June 17, 2010
Waterloo Region Children's Safety Village
My six-year-old went to the Waterloo Region Children's Safety Village with her Grade One class yesterday. She had a blast, especially driving the go-karts around the track.
I asked her if she got a speeding ticket, and she said no, but that she did get in trouble for going the wrong way down a one-way street. "There was NO SIGN, Dad!" she yelled, "They had NO SIGN AT ALL. How was I supposed to know it was a ONE WAY STREET?!?!"
I asked what the punishment was for that offense. Turns out, it was ten jumping jacks. And the kid who followed her down the one-way had to do ten as well.
Monday, June 14, 2010
Cover Girl
Our little cover girl will be holding informal autograph sessions this weekend at MacGregor Point, and Labour Day weekend at Inverhuron.
Magnetic North
We saw Rick Mercer at the Centre in the Square last night, an event that was part of the Magnetic North Festival.
Despite a noticable lack of advertising around town, the place was almost full. And of course, Rick did not disappoint. The funniest line came from a story he told about ambushing Arkansas Governor Mike Huckabee. After talking his way through a number of aides, just before meeting the Governor a thought came to Rick: "If they Google me, I'm fucked!"
Thursday, June 10, 2010
Sweet home Chicago
Hey Montreal, this is how you celebrate winning.
Wednesday, June 09, 2010
Lights out
The lovely Peggy's Cove lighthouse has been declared surplus, and may be replaced.
Because, of course, there's no money for real lighthouses. Somehow, we found nearly $200,000 for a fake one, though.
Tuesday, June 08, 2010
Monday, June 07, 2010
Letter to Tony Clement
If you could send me a map of anything that won't be behind the razor wire, that would be great.
Thanks, man.
Oh, and don't let any of this "accountability" stuff get to you. Remember, you guys are above the law.
Bumper sticker of the day
Driving in to work this morning, I spotted:
Save a Tree, Eat a Beaver
Scary warning of the day
#region
Component Designer generated code !!!!DO NOT TOUCH!!!! - No Really!!! You may think it's easier to add your code here, but it's NOT easier when your code is lost because someone accidentally double clicks this class and the designer rewrite this method! So Don't Touch This Method!!!!Wednesday, June 02, 2010
Quote of the day
"Vision without execution is hallucination."
— Thomas A. Edison
Tuesday, June 01, 2010
It's not easy being green
James is thorough. I mean, really thorough. He tests, tests, then tests some more. When most of us are on our third beer of the evening, James is still testing his code.
Recently, he's been digging into a really tough problem. On a system with two or four monitors, we sometimes show something on the second, third or fourth monitor. A code change a couple of months ago broke this behaviour.
James spent some time spelunking the code, and found the problem. He's written up a long document detailing the steps to verify that his code change has fixed the problem. I've sat with him at his desk running over the different scenarios, making sure that everything is covered. It all looks great. He's ready to commit the code.
Except... this morning, it stopped working.
The right information was on one monitor, but the other monitor was blank. James tried it again. Still blank. Even for the simplest set of tests. There had been no other code changes. What could have gone wrong? Could he have missed this simple test case? James was ready to blow.
Then, the light dawned.
To do his part to foster a better world, James saves energy at night. By turning off his monitors. When he came in to work this morning, he turned on three of the four.
I've always said, it's a good thing the windows here on the second floor don't open. We'd forever be talking people in off the ledge.

