I'm trying to use threads to load my textures, so that I can display an animation during loading.
But I have a warning when the thread is exiting, and I'd like to know your opinion.
I'm using the last KOS SVN version (Rev 606)
Here is the example :
1) In the function which launches the thread :
Code: Select all
...
kthread_t * process_loading;
process_loading=thd_create(loadTextures,0);
thd_wait(process_loading);
...
Code: Select all
void loadTextures() {
newText[0] = pvr_mem_malloc(512*512*2);
png_to_texture("/cd/newText.png", newText[0], PNG_FULL_ALPHA);
thd_exit();
}
Code: Select all
Thread 4/8c08bf52 freeing block @ 8c162aa8
pre-magic is wrong at index 26 (6677656e)
Thread 4/8c08bf52 freeing block @ 8c162aa8
pre-magic is wrong at index 27 (2e646e6f)
Thread 4/8c08bf52 freeing block @ 8c162aa8
pre-magic is wrong at index 28 (00636f70)
Thread 4/8c08bf52 freeing block @ 8c162aa8
pre-magic is wrong at index 29 (67006300)
DAMAGED BLOCK DURING FREE
Do you have any ideas to help me ? Do someone has already seen these warnings ? Are these warnings annoying, namely can I have a crash after different loadings ? Is the function png_to_texture not thread-friendly ?
Thanks for your help !