svg graphic hangs browser

RESOLVED FIXED

Status

()

Core
SVG
--
major
RESOLVED FIXED
10 years ago
4 years ago

People

(Reporter: jtd, Unassigned)

Tracking

({hang, perf})

Trunk
hang, perf
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [in-the-wild], URL)

(Reporter)

Description

10 years ago
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9pre) Gecko/2008051904 Minefield/3.0pre

Nothing crashes but for the few minutes I ran this the browser completely hangs.  Had to force quit.
(Reporter)

Comment 1

10 years ago
Analysis of sampling pid 1295 every 10.000000 milliseconds
Call graph:
    286 Thread_0f0b
      286 start
        286 start
          286 __darwin_gcc3_preregister_frame_info
            286 XRE_main
              286 XRE_GetFileFromPath
                286 JSD_GetValueForObject
                  286 -[NSApplication run]
                    286 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
                      286 _DPSNextEvent
                        286 BlockUntilNextEventMatchingListInMode
                          286 ReceiveNextEventCommon
                            286 RunCurrentEventLoopInMode
                              286 CFRunLoopRunSpecific
                                286 __CFRunLoopRun
                                  286 __CFRunLoopDoSources0
                                    286 JSD_GetValueForObject
                                      286 JSD_GetValueForObject
                                        286 GetSecurityContext(JNIEnv_*, nsISecurityContext**)
                                          286 NS_GetComponentRegistrar_P
                                            286 JNIEnv_::CallStaticObjectMethod(_jclass*, _jmethodID*, ...)
                                              286 XRE_GetFileFromPath
                                                286 XRE_GetFileFromPath
                                                  286 XRE_GetFileFromPath
                                                    286 XRE_GetFileFromPath
                                                      286 XRE_GetFileFromPath
                                                        286 XRE_GetFileFromPath
                                                          286 XRE_GetFileFromPath
                                                            286 XRE_GetFileFromPath
                                                              286 XRE_GetFileFromPath
                                                                286 XRE_GetFileFromPath
                                                                  286 XRE_GetFileFromPath
                                                                    286 XRE_GetFileFromPath
                                                                      286 XRE_GetFileFromPath
                                                                        286 XRE_GetFileFromPath
                                                                          286 XRE_GetFileFromPath
                                                                            286 XRE_GetFileFromPath
                                                                              286 XRE_GetFileFromPath
                                                                                286 XRE_GetFileFromPath
                                                                                  286 XRE_GetFileFromPath
                                                                                    286 XRE_GetFileFromPath
                                                                                      286 XRE_GetFileFromPath
                                                                                        286 XRE_GetFileFromPath
                                                                                          286 JS_CallFunctionValue
                                                                                            286 js_Invoke
                                                                                              286 js_Invoke
                                                                                                286 JS_CompareValues
                                                                                                  212 js_Invoke
                                                                                                    212 XRE_GetFileFromPath
                                                                                                      212 XRE_GetFileFromPath
                                                                                                        212 _NS_InvokeByIndex_P
                                                                                                          212 XRE_GetFileFromPath
                                                                                                            212 XRE_GetFileFromPath
                                                                                                              212 XRE_GetFileFromPath
                                                                                                                212 XRE_GetFileFromPath
                                                                                                                  212 XRE_GetFileFromPath
                                                                                                                    212 XRE_GetFileFromPath
                                                                                                                      212 XRE_GetFileFromPath
                                                                                                                        212 XRE_GetFileFromPath
                                                                                                                          212 XRE_GetFileFromPath
                                                                                                                            212 XRE_GetFileFromPath
                                                                                                                              212 XRE_GetFileFromPath
                                                                                                                                212 XRE_GetFileFromPath
                                                                                                                                  210 XRE_GetFileFromPath
                                                                                                                                    201 XRE_GetFileFromPath
                                                                                                                                      145 XRE_GetFileFromPath
                                                                                                                                        91 XRE_GetFileFromPath
                                                                                                                                          28 XRE_GetFileFromPath
                                                                                                                                            12 XRE_GetFileFromPath
                                                                                                                                              9 XRE_GetFileFromPath
                                                                                                                                                3 XRE_GetFileFromPath
                                                                                                                                                3 XRE_GetFileFromPath
                                                                                                                                                  2 

    286 Thread_1003
      286 _pthread_body
        286 XRE_GetFileFromPath
          286 mach_msg
            286 mach_msg_trap
              286 mach_msg_trap
    286 Thread_1103
      286 _pthread_body
        286 PR_Select
          286 NS_GetComponentRegistrar_P
            286 GetSecurityContext(JNIEnv_*, nsISecurityContext**)
              286 NS_GetComponentRegistrar_P
                286 XRE_GetFileFromPath
                  286 GetSecurityContext(JNIEnv_*, nsISecurityContext**)
                    286 NS_GetComponentRegistrar_P
                      286 XRE_GetFileFromPath
                        286 XRE_GetFileFromPath
                          286 XRE_GetFileFromPath
                            286 PR_Poll
                              286 PR_OpenDir
                                286 poll
                                  286 select
                                    286 select
    286 Thread_1203
      286 _pthread_body
        286 PR_Select
          286 NS_GetComponentRegistrar_P
            286 GetSecurityContext(JNIEnv_*, nsISecurityContext**)
              286 NS_GetComponentRegistrar_P
                286 NS_GetComponentRegistrar_P
                  286 PR_WaitCondVar
                    286 PR_Unlock
                      286 pthread_cond_timedwait
                        286 semaphore_timedwait_signal_trap
                          286 semaphore_timedwait_signal_trap
    286 Thread_1303
      286 _pthread_body
        286 PR_Select
          286 XRE_GetFileFromPath
            286 PR_WaitCondVar
              286 pthread_cond_wait
                286 semaphore_wait_signal_trap
                  286 semaphore_wait_signal_trap
    286 Thread_1403
      286 _pthread_body
        286 PR_Select
          286 XRE_GetFileFromPath
            286 PR_WaitCondVar
              286 pthread_cond_wait
                286 semaphore_wait_signal_trap
                  286 semaphore_wait_signal_trap
    286 Thread_1503
      286 _pthread_body
        286 PR_Select
          286 NS_GetComponentRegistrar_P
            286 GetSecurityContext(JNIEnv_*, nsISecurityContext**)
              286 NS_GetComponentRegistrar_P
                286 NS_GetComponentRegistrar_P
                  286 PR_Wait
                    286 PR_WaitCondVar
                      286 pthread_cond_wait
                        286 semaphore_wait_signal_trap
                          286 semaphore_wait_signal_trap
    286 Thread_1603
      286 _pthread_body
        286 PR_Select
          286 XRE_GetFileFromPath
            286 XRE_GetFileFromPath
              286 PR_WaitCondVar
                286 PR_Unlock
                  286 pthread_cond_timedwait
                    286 semaphore_timedwait_signal_trap
                      286 semaphore_timedwait_signal_trap
    286 Thread_1703
      286 _pthread_body
        286 PR_Select
          286 NS_GetComponentRegistrar_P
            286 GetSecurityContext(JNIEnv_*, nsISecurityContext**)
              286 NS_GetComponentRegistrar_P
                286 NS_GetComponentRegistrar_P
                  286 PR_Wait
                    286 PR_WaitCondVar
                      286 PR_Unlock
                        286 pthread_cond_timedwait
                          286 semaphore_timedwait_signal_trap
                            286 semaphore_timedwait_signal_trap

Total number in stack (recursive counted multiple, when >=5):
        131       XRE_GetFileFromPath
        39       JSJ_RegisterLiveConnectFactory
        32       GetSecurityContext(JNIEnv_*, nsISecurityContext**)
        22       XPT_Do64
        20       CRMF_EncodeCertReqMessages
        17       NS_GetComponentRegistrar_P
        9       gfxFont::Measure(gfxTextRun*, unsigned, unsigned, int, gfxContext*, gfxFont::Spacing*)
        9       gfxTextRun::AccumulateMetricsForRun(gfxFont*, unsigned, unsigned, int, gfxContext*, gfxTextRun::PropertyProvider*, unsigned, unsigned, gfxFont::RunMetrics*)
        9       gfxTextRun::MeasureText(unsigned, unsigned, int, gfxContext*, gfxTextRun::PropertyProvider*)
        8       _pthread_body
        7       PR_Select
        7       __memcpy
        7       std::vector<unsigned short, std::allocator<unsigned short> >::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned short*, std::vector<unsigned short, std::allocator<unsigned short> > >, unsigned long, unsigned short const&)
        7       szone_free
        6       PR_WaitCondVar
        6       free
        6       gfxContext::gfxContext[in-charge](gfxASurface*)
        6       js_Invoke
        6       szone_size
        5       NS_LogTerm_P
        5       gfxContext::~gfxContext [in-charge]()
        5       szone_malloc

Sort by top of stack, same collapsed (when >= 5):
        semaphore_timedwait_signal_trap        858
        semaphore_wait_signal_trap        858
        mach_msg_trap        286
        select        286
        XRE_GetFileFromPath        105
        JSJ_RegisterLiveConnectFactory        28
        gfxFont::Measure(gfxTextRun*, unsigned, unsigned, int, gfxContext*, gfxFont::Spacing*)        23
        XPT_Do64        16
        GetSecurityContext(JNIEnv_*, nsISecurityContext**)        12
        __memcpy        9
        gfxFontCache::DestroyFont(gfxFont*)        8
        CRMF_EncodeCertReqMessages        7
        szone_free        7
        szone_size        6
        NS_LogTerm_P        5
Sample analysis of process 1295 written to file /dev/stdout
Sampling process 1295 each 10 msecs 300 times

The svg file contains javascript which runs every 2.5 seconds. The javascript makes so many changes to the file that it takes more than 2.5 seconds to process the changes. So firefox is essentially running the script all the time which means you can't do anything else.

Note that the script works completely differently for Opera (and any other browser that claims animation support). It does not use javascript to animate the drawing if the browser supports SMIL animation.

There is not much that can be done specifically about this particular example. I expect if and when animation is completely implemented in firefox it will just work.
Something similar happens on both Windows and Linux.
OS: Mac OS X → All
Hardware: Macintosh → All
Keywords: perf
Keywords: hang
Since Firefox 15 we've advertised that we support http://www.w3.org/TR/SVG11/feature#Animation which has fixed this testcase as it now uses the Firefox native SMIL engine rather than the javascript FakeSMIL library.
Blocks: 756988
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [in-the-wild]
You need to log in before you can comment on or make changes to this bug.