sceUtilityLoadNetModule, audio and thread issue
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.2k
- Forks
- 183
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
I have noticed a problem with sceUtilityLoadNetModule.
If I load PSP_NET_MODULE_COMMON and PSP_NET_MODULE_INET and then I call pspAudioInit(), I will not be able to create a thread with sceKernelCreateThread. If a thread already exists in my game, it will be stopped.
sceKernelCreateThread will always return a negative thread id.
sceUtilityLoadNetModule(PSP_NET_MODULE_COMMON);
sceUtilityLoadNetModule(PSP_NET_MODULE_INET);
pspAudioInit();
SceUID thd_id = sceKernelCreateThread("thread1", thread1, 0x38, 0x10000, 0, NULL);
if (thd_id >= 0)
{
sceKernelStartThread(thd_id, 0, 0);
}
else
{
pspDebugScreenPrintf("Bad thread id\n");
}
This should prints Bad thread id.
I don't have a PSP 2000/3000 to test but I have the problem on my PSP 1000 and Street. My FW version is 6.61.
I think there is an issue with sceUtilityLoadNetModule or something else about network because most of network samples do not work on my PSP 1000, see: https://github.com/pspdev/pspsdk/issues/45#issuecomment-1611225348
Small compilable sample code with the issue (there is a precompiled EBOOT too): No_Thread_Issue.zip
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by building and running the attached No_Thread_Issue.zip sample on the reported PSP 1000 or Street setup with firmware 6.61. Trace the sequence through sceUtilityLoadNetModule, pspAudioInit, and sceKernelCreateThread, then compare it with the linked network-sample discussion. Done means identifying the cause and verifying that the sample can create and start its thread after audio and network initialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100