Safari Crash / Bug Webkit # 16196

I’ve been seeing this type of crash fairly often in Safari now. Not necessarily the same situation every time, but the culprit is almost always Javascript – not bad javascript – Safari just doesn’t like it. 

Here’s a stack trace:
0             	0x9535ff20 WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded(WebCore::Position const&, WebCore::Position const&) + 32
1             	0x9535f02c WebCore::ApplyStyleCommand::applyInlineStyle(WebCore::CSSMutableStyleDeclaration*) + 396
2             	0x9535bcac WebCore::ApplyStyleCommand::doApply() + 284
3             	0x952e5eb8 WebCore::EditCommand::apply() + 168
4             	0x952e66cc WebCore::CompositeEditCommand::applyCommandToComposite(WTF::PassRefPtr) + 44
5             	0x9535baf8 WebCore::CompositeEditCommand::applyStyle(WebCore::CSSStyleDeclaration*, WebCore::Position const&, WebCore::Position const&, WebCore::EditAction) + 120
6             	0x9535b5fc WebCore::ReplaceSelectionCommand::completeHTMLReplacement(WebCore::Position const&) + 700
7             	0x95358240 WebCore::ReplaceSelectionCommand::doApply() + 11600
8             	0x952e5eb8 WebCore::EditCommand::apply() + 168
9             	0x953f0d0c -[WebCoreFrameBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:] + 236
10              	0x94b1a82c -[WebHTMLView(WebHTMLViewFileInternal) _pasteWithPasteboard:allowPlainText:] + 220
11              	0x918b9358 -[NSApplication sendAction:to:from:] + 104
12              	0x00037870 0x1000 + 223344
13              	0x91954990 -[NSMenu performActionForItemAtIndex:] + 408
14              	0x919546c0 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 228
15              	0x91954388 -[NSMenu performKeyEquivalent:] + 744
16              	0x91952e6c -[NSApplication _handleKeyEquivalent:] + 456
17              	0x91889a94 -[NSApplication sendEvent:] + 3548
18              	0x00032fb0 0x1000 + 204720
19              	0x917f6ed4 -[NSApplication run] + 776
20              	0x917c792c NSApplicationMain + 440
21              	0x00002d10 0x1000 + 7440
22  ???                           	0x00000ffc 0 + 4092

For anyone blogging and trying to paste content into the blogger Compose post window, good luck in Safari!

Looks like WebKit folks are working on it, there’s an Apple bug filed as well. This bug leads to crashes. If it’s happening for you, know that you are not alone or crazy. Writing browsers ain’t easy!
I heart WebKit team.
Safari Crash / Bug Webkit # 16196

Web 2.0 Ideas #BarcampAustin

Putting together a Half-Baked Web 2.0 get together ended up with some entertaining startup ideas. I can’t remember them all, but here’s a brief summary.

Epic Fail
Idea: Sharing content, all original – give back revenue like metacafe
Tag Line: screwing up on an epic scale or doing it wrong all day long
Marketing: Viral via browser plugins / xgames, cheap cable (extreme crashing)

This idea was not funded because it was agreed the brand would live up to it’s name.

Purple Energy
Idea: Coaching for your alter ego [in second life]
It was noted this was “coaching” and NOT “psycho-therapy”

The judges determined this was a perfect boot strap idea and could be started immediately and did not require funding.

Idea: Pursue digital attackers after they strike (identify theft, piracy, corporate hacking, etc.)
Logo: A pirate and cross bones, attacking a pirate
Marketing Plan: Free unwarranted security audits (an example of what we’ll do)
Revenue Model: Old fashioned contracts. If you don’t pay…we’ll get the money from you anyways!

This idea was funded for fear of the consequences of NOT being funded.

Green Circle
Idea: A peer-to-peer system for trading carbon credits
Logo: A green circleMarketing Plan: guilt free environmental exploitation
Revenue Model: Transactional feesThis idea genuinely made fun of carbon credits.

It was not funded, as a carbon credit has yet to *really* be defined.

Web 2.0 Ideas #BarcampAustin

iPhone SDK – Overview (the SDK, not the Event)

First off, if you’d like an overview of the iPhone SDK event as well as some quick details, head over to, they’ve done a great job of summarizing the Event [macrumors summary]. The iPhone SDK is a 2.1GB download which you get from Apple’s iPhone developer site – certificates are $99 or $299 [here]. At one point the SDK documentation was publicly accessible but Apple has since restricted it to registered users. The SDK itself still appears to be free (you can signup without purchasing a certificate). What comes with the SDK:

  •  XCode 3.1 Beta (along with updated utilities)
  • Platforms/Aspen.platform
  • Platforms/AspenSimulator.platform
  • Platforms/MacOSX.platform
Quick Note: The iPhone SDK only supports Intel – it will not work if you’ve got a PPC-based system (G3/4/5)
So what are the platforms?
Apple has expanded Xcode to support projects based on a platform. The Aspen.platform directory and MacOSX.platform directories have icons which we see used in Xcode and Instruments to select between platforms for a project or trace. We can also see a glimpse of Apple’s naming process on how to refer to the ‘iPhone / iPod Touch’ operating system; as such, we’ll follow suit and use “Aspen” as well.
Since this is about the iPhone SDK and not Xcode we’ll move right along into Aspen – the simulator and the device. Fire up Xcode to start developing an application and then select a new iPhone Application project where you can select from:
  • Cocoa Touch Application
  • Cocoa Touch List
  • Cocoa Touch Toolbar 
You should first note that all three applications have the same thing in common – “Cocoa Touch”. As a part of the SDK Apple has provided the UIKit framework which provides core features required by every application as well as access to device-specific features such as the Accelerometer and Camera. The Cocoa Touch “layer” comprises of the UIKit and Foundation frameworks. It should be noted that the Aspen Foundation framework isn’t the same as the MacOSX Foundation framework.
Of the project templates above, the Application is a basic application which does nothing, the List is a flat list of locales and the Touch Toolbar could be considered the “richest” application as it is a menu bar with Red, Green, and Blue buttons which change the color of the application’s canvas.


After creating a project you can simply Build & Go which will compile and execute the project – when executed your application will open inside of the Simulator. As Apple hasn’t yet issued any developer certificates (I’m waiting on mine), you can only test with the Simulator. When certificates are available you will actually be able to test the application on your iPhone/iPod Touch while it is tethered to your machine. All of this is accomplished by changing the compile settings from Simulator to device. One quick note: Not all simulator functionality is supported on the actual devices and not all device functionality is supported on the simulator. A quick diff of the two “.Platform” directories gives us a quick glimpse of the differences:
e nessence$ diff device simulator 
> Accelerate.framework
> ApplicationServices.framework
< CFNetwork.framework
> CoreServices.framework
> DiskArbitration.framework
< OpenAL.framework
< OpenGLES.framework
This means some functionality “< ” you’ll only be able to test on the device, and other functionality “> ” you can only build for the simulator. It maybe possible you can build device functionality that’s only in the simulator with some workarounds but I’m sure the better option is to wait for Apple to update the SDK.
In addition to integration with Xcode, you’ll find that Apple’s “Instruments” application which can take advantage of debugging utilities to monitor the performance of your applications. From my testing I could only get some of the traces to work with the simulator while it was obvious I would need to debug the device directly for other traces (Core Animation, OpenGL ES). This only makes sense because you can’t currently compile an application for the Simulator with the OpenGL frameworks.
While it’s evident improvements can be made to the SDK, Apple has done a good job for the first release. Writing a simulator to encapsulate an entire OS is no small feat. The most promising functionality is the level of debugging (and remote debugging) that Apple is pushing to provide by integrating iPhone development into both Xcode and Instruments (ie DTrace).

iPhone SDK – Overview (the SDK, not the Event)