GX and threading
November 10, 2010 10:18AM

i'm currently coding a ui framework. This framework is event oriented (not like libwiigui wich is a "real time" framework).
So, i've the main thread wich is the UI thread. If we need to execute tasks, the best practice is to create a subthread (in order to don't freeze the ui) with events to report task progression (ie for increment progression bar, display logs etc...).

The pb is that when i execute a task in the ui thread (i do it by sequencing the task and executing one sequence on each screen update) all is ok. But when i put it in a thread, i've a memory corruption.

To add, the UI is thread safe (i've coded an invoker mechanism), So i think my pb doesn't comes from here. I suspect an error in the memory management in the subthread (heap limit excedeed without a null return with malloc, stack overflow... I don't really know what happen).

Someone as encounter the same pb as me here: [wiibrew.org]

So, do you have any clues about the resolution of this pb?
Re: GX and threading
November 11, 2010 12:32AM
can you post some code?
Re: GX and threading
November 16, 2010 10:27AM
Sorry, i can't because the code is too big (it's a full framework).

But, i've noticed that in fact the bug only happen with the latest libogc (i've threaded the task and updated the libogc at the same time). I will search in that direction.
Re: GX and threading
November 18, 2010 07:46PM
Problem solved : it was due to queue(bad use) and recursive mutex :)
Sorry, only registered users may post in this forum.

Click here to login