I was doing a few adjustments to Iridium, specially on the image thumbnail generation, which is done via PIL, which has its share of problems.
First is the problem with "corrupted" image files, it could be either truthfully corrupted files or a file that hasn't been completely uploaded (very unlikely), PIL has some funny behaviors with those files and verifying the file is not simple, see django bug #3848 patch on this.
PIL usually trows exceptions, however, given that the function that handles file upload and thumbnailing is called Async (ajax) django won't trow the usual error page, debugging with breakpoints usually pin points the offending line, but you will not get any messages or exceptions (they are lost), at least with WingIDE, which makes debugging this kind of code with an IDE as useful as a bunch of print statements.
Once this was done I changed a few javascript lines to verify that the file has a thumbnail, the whole thing started misbehaving from there, steeping trough the javascript code with firebug revealed interesting behaviors, firefox was doing whatever it wanted with my code, including traversing trough wrong code paths (not respecting ifs), which was strange as it was working a few minutes ago, what was the problem? it was only a few lines, no typos, the only difference between last successful run was... Firebug, which I had tested before and find it useful, I had installed the new version (1.4) just a few minutes ago...
In the end I disabled firebug and reloaded, everything worked as it should be, looking at the firebug page there is a bunch of negative comments on the quality of this version, now I see why, either the thing didn't installed right, a bug or plainly this version sucks.
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario