I’m using jQuery+jQuery Mobile+Cordova for a mobile phone app and need to dynamically change a picture. Of course this isn’t a challenge and I simply use
$('myElement').attr('src', 'img/myImage' + someIndex + '.png');
But whenever this gets executed, I get an Unknown Chromium Error: -6 in my LogCat. The image(s) are still being displayed just fine, but I’m wondering where this is coming from? Commenting this line out makes the error go away, so it has to be this.
I just happened to realize what the problem was. I was displaying, say,
nimages, but I only showedk < nof them (i.e. 3 of 5 total). The ones not being displayed accidentally were set to have a non-existing image, causing the error. Since they weren’t being displayed, there was no visible problem.