3

On a particular internal site, whenever I open the Web Inspector in Safari 7, it immediately hangs and then the whole tab crashes. When I close the crashed tab, I then get this message in the Console:

1/22/14 10:54:27.896 AM com.apple.launchd[1]: (com.apple.WebKit.WebContent.D50214F7-A6C9-46E5-8F06-71C873A2D4B8[96246]) Exited with code: 1

Unfortunately, I can't share a link or code for the site itself since it's internal, but here are some additional details:

  • This happens on three different machines running Safari 7 on OS X Mavericks
  • It persists even if I quit and relaunch Safari 7
  • It does not happen when I use the inspectors in any other browsers, including Safari 6 (on OS X Lion)
  • It does not happen when I use Safari 7's Web Inspector on other sites
  • If I inspect the site in a different browser (e.g. Firefox), there are no reported errors

I did find this question which sounds like it describes the same problem, but there are no other details and the solution there doesn't work for me, hence why I'm posting this as a new question.


UPDATE: Another potential piece of the puzzle – the Web Inspector crashes only when I'm viewing the site off the server, not locally.

I initially thought this was because I'm referencing Pingdom and Google Analytics with protocol-agnostic URLs (which don't resolve locally, so they don't load), e.g.:

//www.google-analytics.com...

So that made me think something in one of those scripts was causing the crash, which would explain why it only occurred on the hosted page (where the paths resolve). But no dice: even if I prefix those URLs with http://, the Web Inspector won't crash when I'm viewing the page locally, only off the server.

2 Answers 2

1

I have just fixed precisely the same problem on a site. Its annoying when a debugger chokes so it can't help you find the problem!

My problem was caused by a stray class making its way into a style.

<div style="background: #ffb380; padding-bottom:30px; width:300px; text-center;">

Removing the text-center fixed the problem and web-inspector loads correctly. I would expect you also have an error in the page that is causing web-inspector to choke. Two approaches I can recommend:

  1. An online error checker e.g. http://www.onlinewebcheck.com/
  2. Track down the issue by removing content from the page until web-inspector loads.
4
  • My HTML passes validation. My CSS has one "error," which is really just because I'm using a -webkit- prefix in one particular selector. And again, the Web Inspector doesn't crash when I'm inspecting the page locally...
    – daGUY
    Commented Jan 27, 2014 at 17:56
  • If your server/local pages use different js/html or execute slightly different that could explain it. I would incrementally remove content from the page to discover the cause.
    – daw
    Commented Jan 27, 2014 at 23:32
  • See my update – the only difference between local/server was that the local version had two scripts that weren't actually loading, so I thought those were the culprit. However, even if I do load them locally, I don't get the crash.
    – daGUY
    Commented Jan 28, 2014 at 3:11
  • Have you actually tried locating the issue by removing page content yet? IMHO its the only way you are going to resolve it.
    – daw
    Commented Feb 1, 2014 at 11:09
0

The crash should produce a crash log. Since each Web Content is running in its own process. Open /Applications/Utilities/Console.app and type WebContent. this should show you a crash report:

30/01/2014 21:39:20.697 ReportCrash[4191]: Saved crash report for com.apple.WebKit.WebContent[331] version 9537 (9537.73.11) to /Users/UserName/Library/Logs/DiagnosticReports/com.apple.WebKit.WebContent_2014-01-30-213920-1_My-Mac.crash

There will also be a button: enter image description here which you can click to get more detail.

in it you will see lines like:

Crashed Thread:  18  Dispatch queue: CA::CG::Queue

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

Post this section and the thread it says it crashed on. my example is thread 18

There will be two entries for the thread. One that looks like this:

18  com.apple.HIToolbox             0x00007fff8f7cecb7 ReceiveNextEventCommon + 479

and another further down:

Thread 18 Crashed:: Dispatch queue: CA::CG::Queue
0   libsystem_kernel.dylib          0x00007fff96301866 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff8d0f235c pthread_kill + 92
2   libsystem_c.dylib               0x00007fff904adbba abort + 125
3   libGPUSupportMercury.dylib      0x00007fff95e551b6 gpusKillClient + 111
4   libGPUSupportMercury.dylib      0x00007fff95e5651a gpusSubmitDataBuffers + 161
5   com.apple.GeForceGLDriver       0x00001234402eefe1 0x123440000000 + 3076065
6   com.apple.GeForceGLDriver       0x00001234402eee49 0x123440000000 + 3075657
7   com.apple.QuartzCore            0x00007fff9a4f7cf4 CA::CG::Renderer::flush(bool) + 44
8   com.apple.QuartzCore            0x00007fff9a4f4fb5 CA::CG::IOSurfaceQueue::flush_renderer(CA::CG::Queue::FlushMode) + 117
9   com.apple.QuartzCore            0x00007fff9a4f6b5d CA::CG::Queue::render_callback(void*) + 555
10  libdispatch.dylib               0x00007fff9781d2ad _dispatch_client_callout + 8
11  libdispatch.dylib               0x00007fff9781f68f _dispatch_queue_drain + 451
12  libdispatch.dylib               0x00007fff978209dd _dispatch_queue_invoke + 110
13  libdispatch.dylib               0x00007fff9781efa3 _dispatch_root_queue_drain + 75
14  libdispatch.dylib               0x00007fff97820193 _dispatch_worker_thread2 + 40
15  libsystem_pthread.dylib         0x00007fff8d0f2ef8 _pthread_wqthread + 314
16  libsystem_pthread.dylib         0x00007fff8d0f5fb9 start_wqthread + 13

Posting these sections here may or may not someone spot what the error is.

3
  • Hm...the tab doesn't actually seem to produce a crash log. I don't see anything in Console.app that refers to WebContent until after I manually close the crashed tab, which then produces the message I quoted in my question.
    – daGUY
    Commented Jan 31, 2014 at 17:16
  • Ok it was worth a punt. If you have the web inspect open for another page and then go to that Url what happens. Or if you are in console view of the web inspector..
    – markhunte
    Commented Jan 31, 2014 at 17:22
  • If I do that, the whole thing hangs before anything finishes loading, so the Web Inspector's console doesn't have a chance to display any messages. I also noticed that none of the "Safari Web Content" processes in Activity Monitor are shown having crashed, so I guess that's why there's no crash log?
    – daGUY
    Commented Jan 31, 2014 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .