Bug 361909

Summary: Moonlight hangs browser
Product: [Mono] Moonlight Reporter: Miguel de Icaza <miguel>
Component: pluginAssignee: Swamp Workflow Management <swamp>
Status: RESOLVED FIXED QA Contact: Swamp Workflow Management <swamp>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 385839    
Bug Blocks:    
Attachments: stack trace of crash

Description Miguel de Icaza 2008-02-14 18:36:58 UTC
Moonlight hangs the browser when going to:

www.microsoft.com/silverlight/sharethelove/Default.html

The last error on the console is:

MediaElement::TryOpen (): download is not complete, but media was opened successfully and we'll now start buffering.

Stack trace when it hangs:
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e057ec in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb7e344c5 in pt_TimedWait (cv=0x95bcbd4, ml=0x899bdb0, timeout=10) at ptsynch.c:280
#3  0xb7e352f1 in PR_WaitCondVar (cvar=0x95bcbd0, timeout=10) at ptsynch.c:407
#4  0xb7e3a50f in PR_Sleep (ticks=10) at ptthread.c:790
#5  0x083b347b in nsXMLHttpRequest::Send (this=0xa77be30, aBody=0xa9a52d0) at nsXMLHttpRequest.cpp:1683
#6  0xb7ee8f71 in XPTC_InvokeByIndex () from /usr/lib/firefox/libxpcom_core.so
#7  0x080a9e4d in XPCWrappedNative::CallMethod (ccx=@0xbfb8af5c, mode=XPCWrappedNative::CALL_METHOD) at xpcwrappednative.cpp:2169
#8  0x080ad05d in XPC_WN_CallMethod (cx=0x933cec0, obj=0xa78dd08, argc=1, argv=0xa793428, vp=0xbfb8b080) at xpcwrappednativejsops.cpp:1455
#9  0xb7f3a70a in js_Invoke (cx=0x933cec0, argc=1, flags=0) at jsinterp.c:1375
#10 0xb7f41d4e in js_Interpret (cx=0x933cec0, pc=0xa7922aa ":", result=0xbfb8b498) at jsinterp.c:3944
#11 0xb7f3a772 in js_Invoke (cx=0x933cec0, argc=1, flags=2) at jsinterp.c:1394
#12 0x080a67f8 in nsXPCWrappedJSClass::CallMethod (this=0x8f71f18, wrapper=0xa7e7b90, methodIndex=3, info=0x8b4fba0, nativeParams=0xbfb8b76c)
    at xpcwrappedjsclass.cpp:1453
#13 0x080a3c8b in nsXPCWrappedJS::CallMethod (this=0xa7e7b90, methodIndex=1, info=0x8b4fba0, params=0xbfb8b76c) at xpcwrappedjs.cpp:467
#14 0xb7ee9ac6 in PrepareAndDispatch (methodIndex=<value optimized out>, self=0xa7e7b90, args=0xbfb8b814) at xptcstubs_gcc_x86_unix.cpp:100
#15 0x083bb21e in nsEventListenerManager::HandleEventSubType (this=0xa810788, aListenerStruct=0xa8107f0, aListener=0xa7e7b90, 
    aDOMEvent=0xa75b6f0, aCurrentTarget=0xa875ee8, aSubType=1, aPhaseFlags=7) at nsEventListenerManager.cpp:1655
#16 0x083bc370 in nsEventListenerManager::HandleEvent (this=0xa810788, aPresContext=0xa236708, aEvent=0xbfb8bacc, aDOMEvent=0xbfb8ba84, 
    aCurrentTarget=0xa875ee8, aFlags=7, aEventStatus=0xbfb8baf8) at nsEventListenerManager.cpp:1759
#17 0x0839a2d3 in nsGenericElement::HandleDOMEvent (this=0xa80e6d8, aPresContext=0xa236708, aEvent=0xbfb8bacc, aDOMEvent=0xbfb8ba84, 
    aFlags=<value optimized out>, aEventStatus=0xbfb8baf8) at nsGenericElement.cpp:2232
#18 0x0850bbe8 in nsHTMLScriptElement::ScriptEvaluated (this=0xa80e6d8, aResult=0, aElement=0xa80e6f8, aIsInline=0, aWasPending=1)
    at nsHTMLScriptElement.cpp:593
#19 0x083a7e3a in nsScriptLoadRequest::FireScriptEvaluated (this=0xa811010, aResult=0) at nsScriptLoader.cpp:172
#20 0x083a804d in nsScriptLoader::FireScriptEvaluated (this=0x97d5a60, aResult=0, aRequest=0xa811010) at nsScriptLoader.cpp:751
#21 0x083a87fc in nsScriptLoader::ProcessRequest (this=0x97d5a60, aRequest=0xa811010) at nsScriptLoader.cpp:712
#22 0x083a9db5 in nsScriptLoader::OnStreamComplete (this=0x97d5a60, aLoader=0xa812b88, aContext=0xa811010, aStatus=0, stringLen=2940, 
    string=0xa77c298 "// Copyright (c) Microsoft Corporation.  All rights reserved. \r\n// Use of this code is governed by the Terms of Use located at: http://dev.live.com/contactscontrol/gadgettou.aspx\r\n// and http://dev"...) at nsScriptLoader.cpp:1090
#23 0x0813e76c in nsStreamLoader::OnStopRequest (this=0xa812b88, request=0xa812674, ctxt=0xa811010, aStatus=0) at nsStreamLoader.cpp:134
#24 0x081795a9 in nsHttpChannel::OnStopRequest (this=0xa812648, request=0xa813890, ctxt=0x0, status=0) at nsHttpChannel.cpp:4120
#25 0x0812cacc in nsInputStreamPump::OnStateStop (this=0xa813890) at nsInputStreamPump.cpp:563
#26 0x0812cd09 in nsInputStreamPump::OnInputStreamReady (this=0xa813890, stream=0xa813750) at nsInputStreamPump.cpp:400
#27 0xb7ebbe4d in nsInputStreamReadyEvent::EventHandler (plevent=0xa81392c) at nsStreamUtils.cpp:120
#28 0xb7ed3a90 in PL_HandleEvent (self=0xa81392c) at plevent.c:688
#29 0xb7ed3d19 in PL_ProcessPendingEvents (self=0x8a51070) at plevent.c:623
#30 0xb7ed532d in nsEventQueueImpl::ProcessPendingEvents (this=0x8a51028) at nsEventQueue.cpp:448
#31 0x082503aa in event_processor_callback (source=0x8efa378, condition=G_IO_IN, data=0x1) at nsAppShell.cpp:67
#32 0xb7886d2d in ?? () from /usr/lib/libglib-2.0.so.0
Comment 1 Rolf Kvinge 2008-02-21 00:43:07 UTC
Works like a charm here.
Comment 2 Rusty Howell 2008-02-25 19:31:25 UTC
Works fine on build 96579 w/ ffmpeg.
Comment 3 Rusty Howell 2008-03-25 18:00:36 UTC
Still works fine on build 97599 w/ ffmpeg. There are some issues with the text boxes. (bug 362546) But the site itself is stable. Miguel, are you still having an issue with this?
Comment 4 Miguel de Icaza 2008-03-25 20:43:20 UTC
Sometimes it crashes, and sometimes it hangs.

Click on the "note" and select from the lsit of songs offered, click on all of them, eventually something hangs or crashes, here is the last crash:

PlaylistEntry::~PlaylistEntry ()
[Thread 0xb0261b90 (LWP 17662) exited]
*** glibc detected *** /usr/lib/firefox/firefox-bin: corrupted double-linked list: 0x0a899778 ***
======= Backtrace: =========
/lib/libc.so.6[0xb71cb4b6]
/lib/libc.so.6[0xb71cce4a]
/lib/libc.so.6(cfree+0x89)[0xb71cd179]
/usr/lib/libglib-2.0.so.0(g_free+0x31)[0xb7786d61]
/mono/lib/libmoon.so.0(_ZN14ASFFrameReaderD0Ev+0xa3)[0xb1084281]
/mono/lib/libmoon.so.0(_ZN10ASFDemuxerD0Ev+0x85)[0xb10c46c5]
/mono/lib/moon/plugin/libmoonplugin.so(_ZN11EventObject5unrefEv+0xac)[0xb169ebd2]
/mono/lib/libmoon.so.0(_ZN5MediaD0Ev+0x169)[0xb10cbe9b]
/mono/lib/moon/plugin/libmoonplugin.so(_ZN11EventObject5unrefEv+0xac)[0xb169ebd2]
/mono/lib/libmoon.so.0(_ZN12MediaElement12ReinitializeEv+0x4f)[0xb10b6cdf]
/mono/lib/libmoon.so.0(_ZN12MediaElement17SetSourceInternalEP10DownloaderPKc+0x99)[0xb10b89c1]
/mono/lib/libmoon.so.0(_ZN12MediaElement9SetSourceEP16DependencyObjectPKc+0x99)[0xb10b8c19]
/mono/lib/libmoon.so.0(_ZN12MediaElement17OnPropertyChangedEP24PropertyChangedEventArgs+0xa7)[0xb10b8cf9]
/mono/lib/libmoon.so.0(_ZN16DependencyObject8SetValueEP18DependencyPropertyP5Value+0x4b7)[0xb109d343]
/mono/lib/libmoon.so.0(_ZN12MediaElement8SetValueEP18DependencyPropertyP5Value+0x15e)[0xb10b5b98]
/mono/lib/libmoon.so.0(xaml_set_property_from_str+0x75)[0xb10ff7d7]
/mono/lib/moon/plugin/libmoonplugin.so[0xb16a3fec]
/mono/lib/moon/plugin/libmoonplugin.so(_ZN31MoonlightDependencyObjectObject11SetPropertyEiPvPK10_NPVariant+0x6d)[0xb16a41f5]
/mono/lib/moon/plugin/libmoonplugin.so[0xb16ad87e]
/usr/lib/firefox/firefox-bin[0x824bdde]
/usr/lib/firefox/libmozjs.so(js_NativeSet+0x127)[0xb7eb5485]
/usr/lib/firefox/libmozjs.so(js_SetProperty+0x4a0)[0xb7eb698d]
/usr/lib/firefox/libmozjs.so(js_Interpret+0x63ee)[0xb7ea834c]
/usr/lib/firefox/libmozjs.so(js_Invoke+0xa00)[0xb7ea1bd9]
/usr/lib/firefox/libmozjs.so[0xb7e9c8b9]
/usr/lib/firefox/libmozjs.so(js_Invoke+0x998)[0xb7ea1b71]
/usr/lib/firefox/libmozjs.so(js_Interpret+0x724c)[0xb7ea91aa]
/usr/lib/firefox/libmozjs.so(js_Invoke+0xa00)[0xb7ea1bd9]
/usr/lib/firefox/libmozjs.so(js_InternalInvoke+0xa1)[0xb7ea102a]
/usr/lib/firefox/libmozjs.so(JS_CallFunctionValue+0x2e)[0xb7e78b17]
/usr/lib/firefox/firefox-bin[0x824bf2c]
/usr/lib/firefox/firefox-bin[0x824bfae]
/usr/lib/firefox/firefox-bin[0x8248176]
/mono/lib/moon/plugin/libmoonplugin.so(NPN_InvokeDefault+0x3c)[0xb169fcec]
/mono/lib/moon/plugin/libmoonplugin.so(_ZN18EventListenerProxy28proxy_listener_to_javascriptEP11EventObjectP9EventArgsPv+0x157)[0xb16a6b29]
/mono/lib/libmoon.so.0(_ZN11EventObject4EmitEiP9EventArgs+0x1d6)[0xb109da5c]
/mono/lib/libmoon.so.0(_ZN9UIElement23EmitMouseLeftButtonDownEP9_GdkEvent+0x52)[0xb10f440c]
/mono/lib/libmoon.so.0[0xb10d4578]
/mono/lib/libmoon.so.0(_ZN7Surface15EmitEventOnListEPFbP9UIElementP9_GdkEventEP4ListS3_i+0x72)[0xb10d4462]
/mono/lib/libmoon.so.0(_ZN7Surface16HandleMouseEventEPFbP9UIElementP9_GdkEventEbbbS3_+0x2b3)[0xb10d4b57]
/mono/lib/libmoon.so.0(_ZN7Surface21button_press_callbackEP10_GtkWidgetP15_GdkEventButtonPv+0xc1)[0xb10d69dd]
/usr/lib/libgtk-x11-2.0.so.0[0xb7afb8a4]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x129)[0xb7800919]
/usr/lib/libgobject-2.0.so.0[0xb78139ed]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x617)[0xb7815367]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29)[0xb7815989]
/usr/lib/libgtk-x11-2.0.so.0[0xb7c1a197]
/usr/lib/libgtk-x11-2.0.so.0(gtk_propagate_event+0xc1)[0xb7af4b01]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x3c2)[0xb7af5e72]
/usr/lib/libgdk-x11-2.0.so.0[0xb796ea2a]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x176)[0xb777f5d6]
/usr/lib/libglib-2.0.so.0[0xb7782972]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1e7)[0xb7782d57]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xb4)[0xb7af6244]
/usr/lib/firefox/firefox-bin[0x825f156]
/usr/lib/firefox/firefox-bin[0x8675a56]
/usr/lib/firefox/firefox-bin[0x808ac8f]
/usr/lib/firefox/firefox-bin[0x8086aa4]
/lib/libc.so.6(__libc_start_main+0xe0)[0xb717afe0]
/usr/lib/firefox/firefox-bin[0x8086a21]
Comment 5 Sebastien Pouliot 2008-05-14 13:50:19 UTC
I only got hangs so far, but I noticed the same things (hang) happens at the same time using Windows/Firefox/Silverlight
Comment 6 Sebastien Pouliot 2008-06-06 19:15:48 UTC
Rusty, is this app part of your test plan ?

Because it works now, like last time, and I'm pretty sure the original (hang) problem is not moonlight related (since I could see it on Windows at the same time). But it would be nice to keep an eye on it (in case I'm wrong) otherwise I don't know what else we can do... expect trying regularly ;-)
Comment 7 Rusty Howell 2008-06-10 16:44:32 UTC
Created attachment 221313 [details]
stack trace of crash
Comment 8 Rusty Howell 2008-06-10 16:46:15 UTC
This is still crashing for me :( See stack trace from my previous comment. 
That was tested with r105025 on 10.3 i386 with FF3 RC2
Comment 9 Rusty Howell 2008-06-10 16:46:46 UTC
oops, accidentally marked as closed. Reopening.
Comment 10 Sebastien Pouliot 2008-07-03 21:07:22 UTC
Rusty, 

Geoff just closed another bug about a crash on this site. Can you re-check if it's fixed (I never could duplicate your crash). If not then you'll need to run the site under valgrind to give us some clues. Thanks
Comment 11 Rusty Howell 2008-07-24 22:31:45 UTC
This works great with FF3 and Moonlight r108070
Comment 12 Rusty Howell 2008-07-24 22:32:21 UTC
Marking as fixed.