About 5 times over the past 6 months, in complex javascripts, I'll get an error in firefox only (IE6, 7, 8, Chrome, Safari, Opera are all fine) whereby nothing in my javascript happens.
There will be no messages in the error console, and according to Firebug, all my scripts are totally blank. Force reloading and clearing the cache does not help. I usually just revert to a previous revision when this happens and start my last edits again.
- It happens most in Firefox 3. It does happen a little in FF2, and FF3.5b but not to the same extent.
- The only common link I found is all the changes had involved modifying code that ran in jQuery's $(document).ready() method.
- On two occasions this caused the browser to lock up and crash.
- None of the other browsers even report a warning in the error log.
Has anyone else noticed this happening? Is there a specific cause? Or is there some firefox bug responsible?
EDIT: The latest firefox killing change
From
var coord_array = jsc.core.coordsFromId($(e.target).attr("id"));
$("#co-ords").html("X:" + coord_array[0] + " Y:" + coord_array[1]);
jsc.data.last_mouse_over = { x: coord_array[0], y: coord_array[1]};
To
var coord_array = jsc.core.coordsFromId($(e.target).attr("id"));
$("#co-ords").html("X:" + coord_array[0] + " Y:" + coord_array[1]);
var cellX = parseInt(coord_array[0], 10);
var cellY = parseInt(coord_array[1], 10);
jsc.data.last_mouse_over = { x: cellX, y: cellY};
As you can see, there's nothing too major changing here. This code works fine on its own, without the rest of my javascript (other than the functions/data it uses), and it works fine in every other browser I have tested aswell.