代码之家  ›  专栏  ›  技术社区  ›  Devarshi

在Leopard的WebView中显示内容时出现问题

  •  0
  • Devarshi  · 技术社区  · 15 年前

    我制作了一个示例应用程序,包括:WebView(显示URL的内容)、textfield(包含URL)、button(在WebView中加载URL)。

    我使用此方法在WebView中显示内容:

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

    我在Leopard和snowleopard中都做了这个应用程序。

    https://stackoverflow.com/ 在两个应用程序中都正确打开,但是当我尝试以下链接时- http://www.xyz.com/tools/gauges/livestream.php?data=123456

    堆栈跟踪如下:

    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::createPlugin
    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
    
    2 回复  |  直到 9 年前
        1
  •  0
  •   Joshua Nozzi    15 年前

    1. 崩溃完全在WebCore中,而不是你的代码。

    2. 第3行、第4行和;5 show WebCore正在为您正在加载的URL实例化一个插件,这似乎是崩溃发生的地方。

    3. Snow Leopard中包含的WebKit以不同的方式处理插件(将它们隔离开来,这样它们的崩溃就不会破坏整个过程),但这种额外的关注并不是Leopard中WebKit的一部分。

        2
  •  0
  •   Devarshi    15 年前

    有人能验证关闭:Stop on Debugger()/DebugStr()不会引起任何问题吗?

    谢谢,

    莫纳杰