| View previous topic :: View next topic |
| Author |
Message |
pegasus2000
Joined: 12 Jul 2006 Posts: 160
|
Posted: Sat Dec 13, 2008 10:52 am Post subject: ndPocketSphinx hangs in secondary thread |
|
|
This is a strange problem.
I've created a porting of the software for voice recognition Sphinx
under Nanodesktop. The software is very complex and it uses
only a thread.
If I try to execute the program in the main psp thread, I have no
error.
But I need to execute this program in a secondary thread, different
from the main thread. So, I've created a thread with a stack of
65536 byte, attributes USER|VFPU and this secondary thread must
launch the Sphinx code.
Well, the program hangs.
So, I have two questions:
a) Can anyone check what type of exception is present in this program? If the answer is yes, I can send to him a copy of the homebrew;
b) Which are the differences between the main thread and a secondary thread of the psp ? In theory, the two threads must be identical, but in
the main thread the program works, in secondary thread it fails. |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Sat Dec 13, 2008 10:59 am Post subject: |
|
|
Don't know if it helps, or is relevent,
but for some reason Flite didn't work in it's own thread until I used a semaphore to start and stop it. _________________ If not actually, then potentially. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sat Dec 13, 2008 10:59 am Post subject: |
|
|
From what you've said, the difference is the stack size. The default stack size for the main thread is 256K. Try that for the secondary thread. 64K sounds a bit small for something like voice recog routines.
Also, remember that the PSP uses cooperative multitasking. Until you call some system routine to make a thread wait, no other threads run. Once they DO run, then they keep running until they also call a sys routine that waits. |
|
| Back to top |
|
 |
pegasus2000
Joined: 12 Jul 2006 Posts: 160
|
Posted: Sat Dec 13, 2008 11:25 am Post subject: |
|
|
| J.F. wrote: | From what you've said, the difference is the stack size. The default stack size for the main thread is 256K. Try that for the secondary thread. 64K sounds a bit small for something like voice recog routines.
Also, remember that the PSP uses cooperative multitasking. Until you call some system routine to make a thread wait, no other threads run. Once they DO run, then they keep running until they also call a sys routine that waits. |
Thank you Joseph. I've tried to increase the amount of stack, but
without result. Can you test my homebrew with PSPLink ? So I can
see what type of error is the cause of the hang.
P.S. Have you any news about ndPiKeyDriver.Prx ? |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sat Dec 13, 2008 1:24 pm Post subject: |
|
|
I don't use psplink as I use linux - many people have trouble getting it to work in linux. I just use the traditional logging for debugging.
Haven't had the chance to get back on that driver yet. I've been looking for a cheap used phat so I can do some keyboard testing. |
|
| Back to top |
|
 |
|