I made it work.
T suppose that I can not use the multiple threats to use devil to load images, so I created a single thread that loads the images, and other threads use this (single) one to load the textures. Therefore, there is only one thread using devil and no more problems appear.
Thanks!