-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glimpse loading twice because of MvcTurbine #13
Comments
Hi @gligoran, I haven't had time to play with Glimpse so I'm unaware of the symptom you're describing. When you say it "loads" twice, what's the component that's actually loading? |
Javier, it sounds like Goran can make use of your new HttpModuleRegistry. This is just a guess (I haven't worked with Glimpse yet), but I'd bet Goran is setting up Glimpse the proper way, and then MVC Turbine comes in after-the-fact and loads it in again using conventions. Maybe? |
@darrencauthon it could be. @gligoran you can use the following configuration to disable this piece - https://gist.github.com/1073711 |
It seems that Darren was right, because Javier's
line of code fixes the double Glimpse overlay. Glimpse.Core now works fine, but there still seems to be a problem with Glimpse.Mvc3. Somewhere MvcTurbine and a component of Glimpse.Mvc3 get mixed and it creates an infinite loops which eventually throws a StackOverflowException. I've tested by adding MvcTurbine projects from GitHub and it turns out that if I add Glimpse as a filter to the CommonAssemblyFilter it works find. So I guess MvcTurbine grabs something and wants to resolve dependencies in a loop. So how can I add an AssemblyFilter without having to make my own version of MvcTurbine? |
OK, I've managed to get it working with this: https://gist.github.com/1078530 It does the job, but it seems like a very hackish workaround. Is there a better way to add an assembly filter? |
Close actually. You can specify the AssemblyFilter for the application to use the same way you specified the AutoRegistrator. Here's your gist with my changes to register a GlimpseFilter - https://gist.github.com/1078700 |
Out of curiosity what IoC container are you using for your Turbine application? |
At the moment I'm using Unity. I was using Ninject for previous projects, but then I saw Darren's benchmarking results and switched. I wanted to switch to StructureMap, but something was not working and I just took the next on the list. Darren hasn't yet put Hiro on NuGet at that time, but now I'm looking into it. |
Cool, no problem. I ask so I can test the pieces with your IoC and see if I run into the same issues. At times it's hard to pin point when it's a "turbine issue" or a "environment (vs, container, etc.)" so I like to get as much insight as I can to provide the right support. |
Cool. It looks like you really invest a lot of time and effort in MvcTurbine. That's probably why it's so great :) On the other note, the gist you posted earlier doesn't seem to work. I get a load of errors that MvcTurbine couldn't load Glimpse assemlies.
Not really sure why it chose Elmah for Glimpse first, but if I remove that dependency it loops itself into the before mentioned StackOverflow exception which crashes the development server. |
I'll have to take a look at that to see what's going on underneath the scenes. Is this private or public code that I may see? |
At this time is private and actually just local on my machine. I'll try to reproduce the behaviour on a mvc 3 starter application and upload it to GitHub tomorrow (it's getting late in europe). I'm quite certain it won't be difficult as I've been testing for specific errors on those starter apps to see if maybe it's just a bug/discrepancy in my code somewhere, but until now I've been able to reproduce those errors. I'll post back once it's done. |
OK, I've finally managed to put up a project that encompasses everything we talked about. You can find the project here: https://github.com/gligoran/GlimpseWithTurbine/ There's also a separate branch for when I include Glimpse.Mvc3, so you can investigate the HttpHandler and the AssemblyFilter/AutoRegistrator errors separately. I've added you as a collaborator on the project if you feel like committing and better solutions. |
thanks man! I'll look at it today and get back to you. |
Hi!
I've run into a little trouble using MvcTurbine alongside Glimpse (http://getglimpse.com/). It seems that MvcTurbine picks it up and makes it load twice, one on top of the other. This is visible if you resize the top instance of glimpse and see the other one behind it. The top instance doesn't seem to work either. And also breaks the bottom one. I've tried it with a clean MVC 3 application and just the most basic MvcTurbine implementation and it confirmed that MvcTurbine is at fault. Also, here's a picture how it looks like: http://i.imgur.com/QRBCY.png. The glimpse instances go all the way to the bottom of the page, where Firebug starts. Firebug also shows the duplicate glimpse stuff.
How can I fix this? I saw that MvcTurbine has a class called AssemblyFilter, but I can figure out how or where to do an assembly to it from my MvcApplication.
Glimpse would probably be a good candidate for the CommonAssemblyFilter.
Thanks,
Goran
The text was updated successfully, but these errors were encountered: