tags:

views:

12

answers:

1

Our code was written based on the example from Google Gears' own docs. We're using an unmanaged resource store. So we declare the files in an array, create the store, and capture all the files.

Trouble is, the capturing process hangs. It always hangs on a random file (no discernible pattern has emerged), and when you reload the page, it always successfully captures.

We're capturing 48 files. It seems to have nothing to do with the files themselves, as it hangs on every file type. I've seen it hang on the 6th file or the 47th. Windows and Mac. FF, IE, and Safari.

We are not using a WorkerPool, and I'm thinking this may be necessary. Any other ideas why it would hang?

A: 

I discovered that the problem was in the scope of the variable. The code we had used from Google's own example had the creation of the store, and the capture happening in separate functions, and since we were downloading so many files along the way, the object was getting destroyed by the browser's own trash collector.

That's why the callback was producing no errors, and it was instead just hanging.

Gus