I used to get script errors, but whenever I went to debug them the problem seemed to disappear (isn't that how it always is). But, since your site still had the problem, I was able to track it down. After a long hunt, the problem is that your machine is to fast :-) heh.
I'm guessing that you created the directories for your gallery by hand (not by using the add album option in the gallery), and then went to the gallery module and had it resync or look for those folders. The code looks for all of the new directories that have been created and assigns an "ID" to each of them stored in its configuration file (_metadata.resources). The problem is that this ID is created by creating a random number, with the random number seeded off the systems current time--for every request. And when you ask for a random number seeded by a clock that only changes every 1ms?? you can get the same value more than once.
Short Term Fix #1: Remove the images/folders from your gallery (might have to do by hand). Then recreate the albums one at a time either with the menu option or by creating one directory at a time and then resyncing the gallery.
Short Term Fix #2: Go into the configuration file (_metadata.resources) and change the folders/directories that have duplicate ID's. Doesn't matter what you change it to as long as it is unique (just change 1 or 2 digits)
<?xml version="1.0"?>
<files>
<file name="2006.03.19">
<id>1039157190</id> <-- This id
Medium Term Fix: I changed the code to only seed the random number generator once, and then keep asking it for random numbers--which should then be random. It will be in my next patch release. Probably within a week or so.
Long Term Fix: The gallery team is moving all of this info into the database, so in the future it will be the databases job to create a random number.
As always.. you can get it here: www.Jegers.com
For those interested... try running the below code.. you will get the same number for most.
for i as integer = 1 to 10
dim R as new random <- By default this seeds with a clock value
debug.writeline(r.next)
next