Apple Mail just really keeled over on me… I whacked reply to much…

I was trying to forward a message. One with loads and loads of replies. Really in the order of dozens of replies on replies.

Aaaaanyway… I thought, what the heck I'll give Apple Mail some time.

And there Apple Mail was munching away… ..on my internal memory that is!! After about 10 minutes or so Apple Dumped on me. Turns out the Kernel identified Apple Mail as a run-away procces.

Luckily, I had taken a snapshot with the Activity Monitor…
Now look at that screwed call stack. Something was definatly going up the recursion tree.

Analysis of sampling pid 700 every 10.000000 milliseconds
Call graph:
300 Thread_0f07
300 0x94d19
300 0x94df2
300 NSApplicationMain
300 -[NSApplication run]
300 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
300 _DPSNextEvent
300 BlockUntilNextEventMatchingListInMode
300 ReceiveNextEventCommon
300 RunCurrentEventLoopInMode
300 CFRunLoopRunInMode
300 CFRunLoopRunSpecific
300 __CFMachPortPerform
300 __NSFireMachPort
300 -[MainThread handlePortMessage:]
300 _invokeInvocationRequest
300 -[NSInvocation invoke]
300 objc_msgSendv
300 0x67fbd
300 0x6a506
300 0x6a5a5
300 KWQKHTMLPart::setSelectionFromNone()
300 khtml::Selection::Selection[in-charge](DOM::Position const&, khtml::EAffinity)
300 khtml::Selection::validate(khtml::ETextGranularity)
300 KHTMLView::layout()
300 khtml::RenderCanvas::layout()
300 khtml::RenderBlock::layout()
300 khtml::RenderBlock::layoutBlock(bool)
300 khtml::RenderBlock::layoutBlockChildren(bool)
300 khtml::RenderBlock::layout()
300 khtml::RenderBlock::layoutBlock(bool)
300 khtml::RenderBlock::layoutBlockChildren(bool)
300 khtml::RenderBlock::layout()
300 khtml::RenderBlock::layoutBlock(bool)
300 khtml::RenderBlock::layoutBlockChildren(bool)
300 khtml::RenderBlock::layout()
300 khtml::RenderBlock::layoutBlock(bool)
300 khtml::RenderBlock::layoutBlockChildren(bool)
300 khtml::RenderBlock::layout()
300 khtml::RenderBlock::layoutBlock(bool)
300 khtml::RenderBlock::layoutBlockChildren(bool)
300 khtml::RenderBlock::layout()
etc, etc, etc… (You get the idea here?)

How I resolved this you say? Well, the weird thing was that Apple Mail was able to start and just show me the offending mail. Only when I tried forwarding OR replying things got ugly. I went into the Mail folder in my Library to VI my way out of it. As in locate the emlx file of that particular mail and "dd" the crap out of it to cut it down to size a bit. Then everything worked again in Apple Mail. All things went sunny again. (I do have the original message lurking on my pop box. So if any OG Apple engineer wants to look at it. Pleeeeeeease do contact me.