Friday, 25 November 2011

Trying to debug problems with google maps page

I spent quite a while trying to debug why a page on my site wasn't working properly in FF on Ubuntu. However, when I opened firebug I found that it was too slow to do anything. Checking the CPU usage for my VM, I found that the VM was using between 20-50% CPU (40-100% of one core), usually it is 0-3%. So I tried to figure what it was on my webpage that was causing CPU usage to spike so high.

Eventually, after a few hours and much trial and error, I discovered the problem was actually a different site I had open in a different tab: http://net.tutsplus.com/tutorials/wordpress/how-to-create-a-better-wordpress-options-panel/

It gave a constant stream of the following error message:

Warning: reference to undefined property window.Dialog
Source File: http://static.ak.fbcdn.net/rsrc.php/v1/y6/r/naNy-PS2iP8.js
Line: 54

I had always thought that when you opened firebug, it would attach itself to the current tab, and only report errors etc. from that tab. It seems I was wrong.

Now I finally have that sorted, I can get down to the job of figuring out why my site isn't working properly!

I'm having a lot of trouble debugging the problem with my site, specifically the problem is with a Google Maps page. At first the info window would open when you clicked on a marker (correct behaviour), but then immediately close (incorrect behaviour). Then when trying to debug that, it happened that the marker window wouldn't open at all. Trying to debug that, the markers stopped showing up. And trying to debug that, now the map doesn't even load and I just get a grey page.

And annoyingly, the original problem is only showing in Firefox on Ubuntu (well at least it's not showing in Chrome and Firefox on Win 7), so I can't try debugging the problem in a different browser.

It also seems like Firebug might be having trouble, as later doing some debugging I got error messages like

A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Script: file:///home/djeyewater/.mozilla/firefox/f8kz0h7v.default/extensions/firebug@software.joehewitt.com/modules/firebug-service.js:266

and the VM started using 50% of CPU (100% of one core).

I noticed that whenever I ran the mouse cursor over the map, the error console would fill up with errors like

reference to undefined property a[pc]
 (53 out of range 43)
main.js (line 53)
reference to undefined property a[oo]
 (68 out of range 43)
main.js (line 68)
reference to undefined property this[a]
 var tf=sf(-fa,-fa,fa,fa),uf=sf(0,0,0,0...his.set(b,c)}};I.setOptions=V[C][Eb];
main.js (line 26)
reference to undefined property this[a]
 var tf=sf(-fa,-fa,fa,fa),uf=sf(0,0,0,0...his.set(b,c)}};I.setOptions=V[C][Eb];
main.js (line 26)

In the end, I still haven't worked out what the problem is yet. Maybe tomorrow...

No comments: