开发者

Problem while displaying content in WebView in Leopard

I made a sample application consisting of : WebView (to display content of a URL), textfield (to contain a URL), button (to load URL in WebView).

I used this method to display contents in WebView:

- (IBAction)displayAction:(id)sender{
    NSString *liveStreamLink = [[NSString alloc] initWithString:[livestreamLinkTextField stringValue]];
    [[livestreamDisplayView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:liveStreamLink]]];
}

I made this application in both Leopard and Snow Leopard.

The normal links such as - https://stackoverflow.com/ are opening correctly in both applications, but when I am trying a link such as- http://www.xyz.com/tools/gauges/livestream.php?data=123456, (Note: This link returns a graph), in application developed in leopard, it is causing crash. The application developed in Snow Leopard is working fine for all types of link.

Can anyone suggest me what could be its cause and some solution to resolve it?

Stack trace is as follows:

0   0x928252e6 in Debugger
1   0x1b7e8c15 in dyld_stub_sprintf
2   0x1b7e8ecf in NP_Initialize
3   0x90f0599f in -[WebNetscapePluginPackage _tryLoad]
4   0x90f054d7 in -[WebNetscapePluginPackage load]
5   0x90f0a8af in -[WebNetscapePluginDocumentView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:]
6   0x90ef41da in WebFrameLoaderClient::crea开发者_如何转开发tePlugin
7   0x930bd908 in WebCore::FrameLoader::loadPlugin
8   0x936ae0da in WebCore::FrameLoader::requestObject
9   0x930bc409 in WebCore::RenderEmbeddedObject::updateWidget
10  0x92f32e65 in WebCore::FrameView::updateWidgets
11  0x92f329c1 in WebCore::FrameView::performPostLayoutTasks
12  0x92f22e33 in WebCore::FrameView::layout
13  0x9306f72b in WebCore::Timer<WebCore::FrameView>::fired
14  0x92f9e94e in WebCore::ThreadTimers::sharedTimerFiredInternal
15  0x92f9e822 in WebCore::ThreadTimers::sharedTimerFired
16  0x93860624 in WebCore::timerFired
17  0x9621a70b in __CFRunLoopRun
18  0x96218094 in CFRunLoopRunSpecific
19  0x96217ec1 in CFRunLoopRunInMode
20  0x96e48f9c in RunCurrentEventLoopInMode
21  0x96e48d51 in ReceiveNextEventCommon
22  0x96e48bd6 in BlockUntilNextEventMatchingListInMode
23  0x902b0a89 in _DPSNextEvent
24  0x902b02ca in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
25  0x9027255b in -[NSApplication run]
26  0x9026a5ed in NSApplicationMain
27  0x000029ee in start at ESTableView.m:1278


I'm going to venture a guess that this isn't your fault but the fault of an earlier version of WebKit. The reasons for this guess?

  1. It works fine on Snow Leopard but not Leopard.

  2. The crash is entirely in WebCore, not your code.

  3. Lines 3, 4, & 5 show WebCore is instantiating a plug-in for the URL you're loading and this is where the crash seems to be occurring.

  4. WebKit included in Snow Leopard handles plug-ins differently (isolates them so their crashes don't take down the whole thing) but this extra attention wasn't part of WebKit in Leopard.


I found that whenever it was getting crashed it was displaying msg:Debugger() was called. So I checked Xcode run setting and found that- Stop on Debugger()/DebugStr() was selected. When I deselected it and re-executed the application, it worked and did not crash.

Can anyone verify that switching off: Stop on Debugger()/DebugStr(), does not cause any trouble?

Thanks,

Monaj

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜