About | Buy | Forum | Industry Watch | Learning Curve | Products | Search | Twitter | Xnews
Home » Learning Curve » Hotspots

Another Bug, Another Revelation

Secrets lurk behind crashes.


Buy It

Try It

Safari 3 for Leopard's got some bugs. Everybody knows that. We encountered one almost immediately on install.

Intrigued by this 'Inspect Element' context menu item we clicked it. Don't do it - not unless you've got JavaScript turned on. You'll crash reliably and ignominiously.

The crash log clearly shows something going south in good old KDE C++ code. What a shocker.

Here's a bit more of the crash log.

Thread 0 Crashed:
0   com.apple.JavaScriptCore      	0x92f9412a KJS::PropertyMap::put(KJS::Identifier const&, KJS::JSValue*, int, bool) + 26
1   com.apple.JavaScriptCore      	0x92fa6b11 KJS::JSObject::putDirect(KJS::Identifier const&, KJS::JSValue*, int) + 49
2   com.apple.WebCore             	0x9232b75c WebCore::toJS(KJS::ExecState*, WebCore::Document*) + 204
3   com.apple.WebCore             	0x9232f7e9 WebCore::toJS(KJS::ExecState*, WTF::PassRefPtr) + 585
4   com.apple.WebCore             	0x923bfe83 WebCore::toJS(KJS::ExecState*, WebCore::EventTarget*) + 115
5   com.apple.WebCore             	0x9271f63a WebCore::getResourceDocumentNode(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) + 634
6   com.apple.JavaScriptCore      	0x930113b3 KJS::JSCallbackFunction::callAsFunction(KJS::ExecState*, KJS::JSObject*, KJS::List const&) + 115
7   com.apple.JavaScriptCore      	0x92fa6a13 KJS::FunctionCallDotNode::evaluate(KJS::ExecState*) + 915
8   com.apple.JavaScriptCore      	0x92fb2f45 KJS::ReturnNode::execute(KJS::ExecState*) + 133
9   com.apple.JavaScriptCore      	0x92fb3797 KJS::IfNode::execute(KJS::ExecState*) + 407
10  com.apple.JavaScriptCore      	0x92fa4e0b KJS::SourceElementsNode::execute(KJS::ExecState*) + 139
11  com.apple.JavaScriptCore      	0x92fa4601 KJS::BlockNode::execute(KJS::ExecState*) + 49
12  com.apple.JavaScriptCore      	0x92fb057c KJS::DeclaredFunctionImp::execute(KJS::ExecState*) + 28
13  com.apple.JavaScriptCore      	0x92faff8f KJS::FunctionImp::callAsFunction(KJS::ExecState*, KJS::JSObject*, KJS::List const&) + 559
14  com.apple.JavaScriptCore      	0x9301ad1a KJS::PropertySlot::functionGetter(KJS::ExecState*, KJS::JSObject*, KJS::Identifier const&, KJS::PropertySlot const&) + 154
15  com.apple.JavaScriptCore      	0x92fa626a KJS::DotAccessorNode::evaluate(KJS::ExecState*) + 250
16  com.apple.JavaScriptCore      	0x92fad241 KJS::EqualNode::evaluate(KJS::ExecState*) + 33
17  com.apple.JavaScriptCore      	0x92fb3645 KJS::IfNode::execute(KJS::ExecState*) + 69
18  com.apple.JavaScriptCore      	0x92fa4f27 KJS::SourceElementsNode::execute(KJS::ExecState*) + 423
19  com.apple.JavaScriptCore      	0x92fa4601 KJS::BlockNode::execute(KJS::ExecState*) + 49
20  com.apple.JavaScriptCore      	0x92fb7b77 KJS::ForNode::execute(KJS::ExecState*) + 295
21  com.apple.JavaScriptCore      	0x92fa4f27 KJS::SourceElementsNode::execute(KJS::ExecState*) + 423
22  com.apple.JavaScriptCore      	0x92fa4601 KJS::BlockNode::execute(KJS::ExecState*) + 49
23  com.apple.JavaScriptCore      	0x92fb057c KJS::DeclaredFunctionImp::execute(KJS::ExecState*) + 28
24  com.apple.JavaScriptCore      	0x92faff8f KJS::FunctionImp::callAsFunction(KJS::ExecState*, KJS::JSObject*, KJS::List const&) + 559
25  com.apple.JavaScriptCore      	0x92fdb127 KJS::JSObject::call(KJS::ExecState*, KJS::JSObject*, KJS::List const&) + 135
26  com.apple.JavaScriptCore      	0x9300ec73 JSObjectCallAsFunction + 83
27  com.apple.WebCore             	0x9271cd03 WebCore::InspectorController::focusNode() + 291
28  com.apple.WebKit              	0x915d9b9c -[WebInspectorWindowController showWindow:] + 92
29  com.apple.WebKit              	0x915d9a4a WebInspectorClient::showWindow() + 58
30  com.apple.WebCore             	0x92496f63 WebCore::ContextMenuController::contextMenuItemSelected(WebCore::ContextMenuItem*) + 2179
31  com.apple.WebCore             	0x924966c2 -[WebCoreMenuTarget forwardContextMenuAction:] + 210
32  com.apple.AppKit              	0x9091cf94 -[NSApplication sendAction:to:from:] + 112
33  com.apple.Safari              	0x000369b8 0x1000 + 219576
34  com.apple.AppKit              	0x909cb868 -[NSMenu performActionForItemAtIndex:] + 493
35  com.apple.AppKit              	0x909cb56d -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 220
36  com.apple.AppKit              	0x909a8482 AppKitMenuEventHandler + 6608
37  com.apple.HIToolbox           	0x91ef5863 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1181
38  com.apple.HIToolbox           	0x91ef4c9d SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 405
39  com.apple.HIToolbox           	0x91f1108e SendEventToEventTarget + 52
40  com.apple.HIToolbox           	0x91f45c9d SendHICommandEvent(unsigned long, HICommand const*, unsigned long, unsigned long, unsigned char, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) + 411
41  com.apple.HIToolbox           	0x91f6c377 SendMenuCommandWithContextAndModifiers + 59
42  com.apple.HIToolbox           	0x91f6c334 SendMenuItemSelectedEvent + 134
43  com.apple.HIToolbox           	0x91f6c242 FinishMenuSelection(MenuData*, MenuData*, MenuResult*, MenuResult*, unsigned long, unsigned long, unsigned long, unsigned char) + 162
44  com.apple.HIToolbox           	0x91fbc28f PopUpMenuSelectCore(MenuData*, Point, double, Point, unsigned short, unsigned int, Rect const*, unsigned short, unsigned long, Rect const*, Rect const*, __CFString const*, OpaqueMenuRef**, unsigned short*) + 1763
45  com.apple.HIToolbox           	0x91fbbb59 _HandlePopUpMenuSelection7 + 627
46  com.apple.AppKit              	0x90a93b53 _NSPopUpCarbonMenu3 + 3081
47  com.apple.AppKit              	0x90a92f40 _NSPopUpCarbonMenu2 + 155
48  com.apple.AppKit              	0x90a92ea1 _NSPopUpCarbonMenu1 + 82
49  com.apple.AppKit              	0x90a92e03 -[NSCarbonMenuImpl _popUpContextMenu:withEvent:forView:withFont:] + 237
50  com.apple.AppKit              	0x90a92c3e -[NSMenu _popUpContextMenu:withEvent:forView:withFont:] + 285
51  com.apple.AppKit              	0x90a92b1b -[NSMenu _popUpContextMenu:withEvent:forView:] + 63
52  com.apple.AppKit              	0x90a92ad6 -[NSMenu _popUpMenuWithEvent:forView:] + 52
53  com.apple.AppKit              	0x9091a8e2 -[NSWindow sendEvent:] + 8249
54  com.apple.Safari              	0x000329d3 0x1000 + 203219
55  com.apple.AppKit              	0x908e6a2c -[NSApplication sendEvent:] + 2766
56  com.apple.Safari              	0x000324a8 0x1000 + 201896
57  com.apple.AppKit              	0x90844705 -[NSApplication run] + 847
58  com.apple.AppKit              	0x908119ba NSApplicationMain + 574
59  com.apple.Safari              	0x00002876 0x1000 + 6262

Whatever. It's a bug. Now for the revelation. Turn on JavaScript.

Some people say surfing without JavaScript is like taking a shower in a raincoat; mindful as we are of the fundamental security weaknesses in the model (and of myriad scare stories we've read) we're more inclined to liken it to practicing safe sex without a condom. Whatever. JavaScript now on - and for a very good reason.

We namely visited the site of Marie Picasso who won the Swedish Idol contest yesterday evening. And we needed JavaScript (and Flash) to see most anything. And now when we clicked 'Inspect Element'? Whoa.

[The window was reduced in size to fit the image comfortably on this page.]

You can do almost anything with this 'Web Inspector'. Just click. Click on everything.

Documents, stylesheets, images, scripts, other: they all open to show you what's been fetched for the current web page. Rendering (formatting) errors are also shown.

The small exclamation marks ('!') conceal 'advice' on how the web page can be optimised.

But best of all is the 'Network' view shown above. Note the crisp clean (fantastic) graphics everywhere. Note the reflection of the 'transfer size' bar. Take it all in.

Then start moving your mouse over the right part of the window. Where the various components of the web page are listed, colour typed and chronologically ordered as they were fetched by Safari.

Now that selection bar that follows your mouse over this part of the window? Click the mouse.

For those who haven't yet made the leap to Leopard: you'll have to wait. We're not telling. Not yet.

Let's just say that those who have made the leap and try this trick have witnessed the power and the glory.

Try this on your Ford computer, Thurrott.

About | Buy | Forum | Industry Watch | Learning Curve | Products | Search | Twitter | Xnews
Copyright © Rixstep. All rights reserved.