Skip to main content
Microsoft Silverlight
Home Forums General Silverlight Programming Visual Studio & Silverlight Development Tools FireFox 3.6.4: Debugging-
22 replies. Latest Post by ChristianPedersen on July 26, 2010.
(0)
memorex
Member
3 points
9 Posts
06-23-2010 3:09 PM |
FF 3.6.4 now isolates plugins in their own process. After upgrading from 3.6.3, I noticed that my breakpoints were no longer being hit and the red circle was the one that tells you that it couldn't attach to the process.
From what I can tell- FF is using "plugin-container.exe" to host the SL plugin and after starting your app, you can Debug|Attach To Process to that process in order to hit breakpoints again.
I'm not sure if there's an automatic way to do this yet.
mott555
Participant
920 points
217 Posts
06-23-2010 3:58 PM |
So that's why I can't debug today. Thanks for sharing.
MisterG...
Contributor
4864 points
770 Posts
06-23-2010 5:23 PM |
There's even more to it. Ever after upgrading to Firefox 3.6.4 a few hours ago, my current Silverlight app crashes every other minute when calling a WCF/RIA service. Sometimes I simply get a "plugin crashed" screen from Firefox that offers me to send in a crash report, sometimes I receive the following error in the callback from the domain context:
"Load operation failed for query 'XYZ'. The input source is not correctly formatted."
The app continues to work without any problems in IE8... extremely annoying. If anyone knows something about this, please let me know.
Edit: After some more research, it got even worse. FF 3.6.4 gives me more weird error messages when I make calls into my other WCF services. Sometimes for example it's something like "The value [very, very long number] cannot be parsed as the type 'DateTime'." I inspected the messages with Fiddler, and they're ok. The values in question (from the error message) are not even in the transferred data. I re-installed Firefox 3.6.3, and who would've thought that - everything's back to normal. I really hope the Mozilla guys will fix this soon.
06-24-2010 7:57 AM |
I've filed a bug to the Mozilla team and provided error reports and call stacks. Hopefully they find that information useful and can do something about it.
Regarding the debugging: I think it would be possible to write a VS plugin or similar to attach to the plugin-container.exe process automatically, however there's a simpler solution. You can disable the new isolation feature in Firefox:
Of course OOPP (that's how it's named) is a useful and good feature. In my opinion the above should only be used to simplify the debugging process for developers, but not recommended to your end users. Also leave it as it is in your testing environment.
06-24-2010 8:42 AM |
I've run into some crashing issues during testing. I have the Firefox web developer toolbar installed and usually when my app crashes the error message will be shown as a scripting error and I can see what happened, but generally the app keeps running. Now I just get the Silverlight Plugin has Crashed error.
Thanks for posting how to change back to the old behavior. While the process isolation is overall a good idea, it just doesn't work for Silverlight development.
JustMer...
4 points
2 Posts
06-24-2010 10:56 AM |
Thanks, worked for me. After 1 1/2 hours cursing MS when it wasn't their fault so shame on me.
06-24-2010 7:06 PM |
Here is some more info about my crashes, maybe it helps someone else too. I found out that Firefox 3.6.4 doesn't like custom HTTP headers in requests to WCF/RIA services. Until now, I've been using IClientMessageInspector to inject my custom meta data HTTP headers into the requests. This is what results in (apparently randomly chosen)...
When I remove the custom HTTP headers or disable the message inspector, the errors and also the crashes are gone.
dinane
16 points
3 Posts
06-25-2010 11:52 AM |
I don't have to be debugging for the plugin-container to crash. Anything that takes a slightly long time causes Firefox to panic. The most frightening one to me is MessageBox.Show. I do have plans to replace all such things with dialogs of my own design, but as it is right now, any time a MessageBox waits for the user to click OK, Firefox kills the plugin for being unresponsive.
I have changed my config to not use the container anymore, but clearly we cannot expect our users to do this. And I have yet to find some way to set a threshhold that says "Honest, this is going to take a while, but that's okay!"
06-26-2010 5:56 AM |
I also use child windows for message boxes, simply because they integrate better and look less ugly. You're right in that we cannot expect users to turn off that (or any other) feature, so at the moment I'm trying to work around any issue that comes across to make it work with a default FF configuration.
dinane:And I have yet to find some way to set a threshhold that says "Honest, this is going to take a while, but that's okay!"
If you just want to do that using Firefox's configuration, then the setting is "dom.ipc.plugins.timeoutSecs" (also accessible throught the built-in "about:config" page). By default it is set to 10 seconds, and this also is a problem when you debug and step through your code. Firefox kills the plug-in when you inspect your object's states for too long etc. Maybe it's a new way of motivation for devs to debug faster /sarcasm :).
X_Dror
11 points
42 Posts
06-26-2010 1:23 PM |
Thanks for the Solution MisterGoodcat!
I just noticed this after doing some big changes in a project, and I thought I screwed something up :P
06-27-2010 12:20 PM |
Firefox 3.6.6 increases the timeout value mentioned above to a 45 seconds default.
rodneyj...
52 points
59 Posts
06-28-2010 10:40 AM |
Wow, that cost me about an hour of time... the solution by MisterG fixed it (I upgraded to 3.6.6 but the problem remained until I did that)
Thanks!
shooloom
82 points
45 Posts
06-29-2010 1:13 PM |
I have the same issue. With Firefox 3.6.4 or 3.6.6, calling MessageBox.Show() just completely freezes Firefox. In my case, Firefox becomes totally unresponsive "immediately". I had to kill it using Task Manager.
I won't expect my users would do any config changes. This sucks.
pillappa
89 points
28 Posts
06-30-2010 11:31 AM |
I posted the instructions at http://forums.silverlight.net/forums/p/189397/435701.aspx#435701.
06-30-2010 2:04 PM |
Actually, there are other issues with Firefox 3.6.4 or 3.6.6 as well.
The most critical one I'm experiencing right now is that with Firefox 3.6.4 or 3.6.6, calling MessageBox.Show() just completely freezes Firefox. In my case, Firefox becomes totally unresponsive "as soon as" I call MessageBox.Show(). I had to kill it using Task Manager.
Of course my application has been working fine till 3.6.4. It's still working fine with IE7/8 and Safari 4/5.
Anyone having this problem?
06-30-2010 2:13 PM |
I noted the same issue. My current plan is to eliminate MessageBox.Show from my project. I do not know if anyone has reported this as a bug to Firefox and/or Microsoft. It is definitely a problem. It was already on my roadmap to eliminate use of that dialog, however, since it doesn't match our UI.
06-30-2010 3:48 PM |
MisterG, can you point me to a repro for the WCF/RIA issue; that could help us debug the issue? We have received a similar bug from Mozilla, it would really help if we got more details about the problem.
beefster23
07-07-2010 8:42 AM |
Thanks man, I needed that.
07-07-2010 10:44 AM |
Hi pillappa!
Sorry, I didn't see your request until now. I believe that bug report you received is mine :).Back on topic:I've found a very reliable way of reproducing the issue with a very simple project. All you have to do is the following:For the server:
For the client:
With that setup, I did not manage to make ONE SINGLE successful call into the service with Firefox 3.6.6. I did at least receive an exception on the client-side. The error messages were different from what I've posted above, but still very weird (e.g. "Unexpected end of file. Following elements are not closed: ..."). In at least one out of five attempts, the Silverlight plug-in crashes. Until the configured timeout in Firefox is triggered, the whole browser just hangs and is unresponsive, CPU load for both Firefox.exe and plugin-container.exe is very high (so much for the increased stability).Additional notes:
If you need my sample project, ready to go, please send me a private message, or I'll upload it somewhere.
wolkenj...
44 points
12 Posts
07-15-2010 12:17 PM |
We have the same problem in our project. IE8 works fine, but with FF or Chrome just about any query fails with 'Load operation failed for query 'FooBar'. The input source is not correctly formatted.'
Observed with:
-Firefox 3.6.6
-Chrome 5.0.375.99
What we have in common with MisterGoodCat is that we inject a custom HTTP header at the client. The server is not doing anything out of the ordinary. Fiddler shows that the query returns with 200 OK and we cannot see any difference in the responses sent back to IE or to FF/Chrome. The custom header is also present in the HTTP request as it should. Leaving out the HTTP header causes everything to work fine again.
The following code shows what we do at the client - we add some code to a WCF RIA domain context partial class that does the HTTP header injection:
public sealed partial class MyDomainContext { partial void OnCreated() { WebDomainClient<IMyDomainServiceContract> webDomainClient = (WebDomainClient<IMyDomainServiceContract>)DomainClient; ContextFlowEndpointBehavior contextFlowEndpointBehaviour = new ContextFlowEndpointBehavior(); webDomainClient.ChannelFactory.Endpoint.Behaviors.Add(contextFlowEndpointBehaviour); } } public class ContextFlowEndpointBehavior : IEndpointBehavior { public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { } public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { clientRuntime.MessageInspectors.Add(new ContextFlowMessageInspector()); } public void ApplyDispatchBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.EndpointDispatcher endpointDispatcher) { } public void Validate(ServiceEndpoint endpoint) { } } public class ContextFlowMessageInspector : IClientMessageInspector { public void AfterReceiveReply(ref System.ServiceModel.Channels.Message reply, object correlationState) {} public object BeforeSendRequest(ref System.ServiceModel.Channels.Message request, IClientChannel channel) { HttpRequestMessageProperty property = (HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name]; property.Headers["MyCustomHeaderName"] = "FooBar; return null; } }
07-15-2010 12:46 PM |
Exactly what I'm doing too. I hope there will be a solution soon so I can stop using workarounds for that.
07-24-2010 12:11 AM |
this might be a temp workaround: if I globally switch to the Silverlight http stack the problems seem to disappear.
Execute the following line before doing any RIA calls. Eg in the ctor of your main page:
WebRequest.RegisterPrefix("http://", System.Net.Browser.WebRequestCreator.ClientHttp)
Christi...
2 points
07-26-2010 11:10 AM |
That's an awesome post! Thanks for sharing!
I, too, am guilty of cursing MS when it was indeed FF causing this one. I've disabled OOPP as instructed and the VS debugger now attaches Silverlight projects completely as normal again, saving me the trouble of having to debug SL in IE, which I'd really, really rather not.