Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Darkstalkers Chronicle: The Chaos Tower
#16
Yes I find it
Code:
Task Level0 E[HLE]: hle\scekernelthread.cpp:695 Unable to remove thread 326 from queue 50 - was not there user_main N[HLE]: hle\scekernelthread.cpp:1777 Removed thread 326 from ready queue 50 for delete


Attached Files
.zip   ppssppdebugm2log.zip (Size: 352.66 KB / Downloads: 1,000)
I want to be a crash fixer
PM me if you want to me look a game
Reply
#17
So suddenly it's at 50? Hmm. Oh wait.

326=sceKernelCreateThread(name=Task Level0, entry=0885575c, prio=32, stacksize=12288)
sceKernelStartThread(thread=326, argSize=0, argPtr=00000000)
Unable to remove thread 326 from queue 50 - was not there <-- I thought this was wrong but it isn't, 0x32 = 50.

...

sceKernelChangeThreadPriority(326, 63) <-- at this point it should be 63 no matter what.
Unable to remove thread 326 from queue 63 - was not there <-- okay, good

...

Unable to remove thread 326 from queue 63 - was not there <-- okay, still fine
sceKernelTerminateThread(326)
Unable to remove thread 326 from queue 50 - was not there <-- what this means is that initPriority was 50
Kernel: Bad object handle 326 (00000146)
ACK ACK ACK ACK Invalid thread id 326 on thread queue <-- so then, where is it on the queue?

I'm guessing it must somehow have managed to get back onto the queue somewhere, but not sure how?

This calls for more drastic changes. Change __KernelNextThread() to:

Code:
Thread *__KernelNextThread() { SceUID bestThread; u32 popped_prio; // If the current thread is running, it's a valid candidate. Thread *cur = __GetCurrentThread(); if (cur && cur->isRunning()) { bestThread = threadReadyQueue.pop_first_better(cur->nt.currentPriority, popped_prio); if (bestThread != 0) __KernelChangeReadyState(cur, currentThread, true); } else bestThread = threadReadyQueue.pop_first(popped_prio); // Assume threadReadyQueue has not become corrupt. if (bestThread != 0) { u32 errorIgnored; Thread *t = kernelObjects.Get<Thread>(bestThread, errorIgnored); if (t == NULL && bestThread != 0) { NOTICE_LOG(HLE, "ACK ACK ACK ACK Invalid thread id %d on thread queue at %d", bestThread, popped_prio); // popped_prio is the interesting thing here. DebugBreak(); // Try, try again? t = __KernelNextThread(); } if (t == NULL) { NOTICE_LOG(HLE, "ACK ACK ACK ACK Thread queue empty"); DebugBreak(); // Just brute force it, hopefully... return kernelObjects.Get<Thread>(threadIdleID[0], errorIgnored); } return t; } else { return 0; } }

And then, change these:

Code:
inline SceUID pop_first() { Queue *cur = first; while (cur != invalid()) { if (cur->end - cur->first > 0) return cur->data[cur->first++]; cur = cur->next; } _dbg_assert_msg_(SCEKERNEL, false, "ThreadQueueList should not be empty."); return 0; } inline SceUID pop_first_better(u32 priority) { Queue *cur = first; Queue *stop = &queues[priority]; while (cur < stop) { if (cur->end - cur->first > 0) return cur->data[cur->first++]; cur = cur->next; } return 0; }

To:

Code:
inline SceUID pop_first(u32 &popped_priority) { for (int i = 0; i < NUM_QUEUES; ++i) { if (queues[i].data == NULL) continue; Queue *cur = &queues[i]; popped_priority = i; if (cur->end - cur->first > 0) return cur->data[cur->first++]; } _dbg_assert_msg_(SCEKERNEL, false, "ThreadQueueList should not be empty."); return 0; } inline SceUID pop_first_better(u32 priority, u32 &popped_priority) { return pop_first(popped_priority); }

This should identify which queue priority level the thread id came from (it'll be slower but won't matter much on desktop.)

If it's 50 or 63, then I guess somehow it's being added back to the queue somewhere after being terminated? If it's something else... then gotta figure out when it's added to that level.

-[Unknown]
Reply
#18
@Unknown
Your change make black screen (even release build)

Fast test of my saved build
good
v0.9.5-47-g52eb46c

bad
v0.9.5-81-g86514ec
I want to be a crash fixer
PM me if you want to me look a game
Reply
#19
@Unknown
   
Do
ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos, fpr.V(sreg));
change to
ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos);
is correct compile fix for win32 build ?
I want to be a crash fixer
PM me if you want to me look a game
Reply
#20
Should be, ABI_CallFunctionA.

But what does it say in the log? It should still say e.g.:

ACK ACK ACK ACK Invalid thread id 326 on thread queue

But with which priority level, which is what I'm after. Or does it not say that anymore?

-[Unknown]
Reply
#21
git bisect result
   
this commit https://github.com/hrydgard/ppsspp/commi...eb6b9f8373

I just test it to revent the commit in current master.And NEED turn off fast memory to fix it.

1 more quesion:You said "This calls for more drastic changes. Change __KernelNextThread() to:"
Do you mean change from "Thread *__KernelNextThread() {" ?

I think it still need correct fix.
Code:
08:05:971 Task Level4 W[MM]: MemmapFunctions.cpp:131 WriteToHardware: Invalid address 00000014 08:05:971 Task Level4 W[MM]: MemmapFunctions.cpp:131 WriteToHardware: Invalid address 00000018


Attached Files
.txt   ppssppm5log.txt (Size: 29.27 KB / Downloads: 947)
.zip   ppssppm5debuglog.zip (Size: 311.37 KB / Downloads: 955)
I want to be a crash fixer
PM me if you want to me look a game
Reply
#22
Yes, I meant that gunc.

-[Unknown]
Reply
#23
I decide to run the code 1 day.Hope not black screen
I want to be a crash fixer
PM me if you want to me look a game
Reply
#24
@unknown ,I hope you can find out your change why black screen (from this debug log)


Attached Files
.zip   ppssppm6debuglog.zip (Size: 123.87 KB / Downloads: 1,046)
I want to be a crash fixer
PM me if you want to me look a game
Reply
#25
Aha. I found it, I'm stupid.

-[Unknown]
Reply
#26
Thanks unknown ,now the game do not crash
Can you see why it is "Missing menu options" ?


Attached Files Thumbnail(s)
       

.txt   ppssppinfolog.txt (Size: 31.72 KB / Downloads: 933)
.zip   ppssppdebuglogv0.9.6-389.txt.zip (Size: 693.29 KB / Downloads: 963)
I want to be a crash fixer
PM me if you want to me look a game
Reply
#27
Just enable Read Framebuffers to Memory(either CPU or GPU) and you should see the missing elements. Note that this can lower the speed of the game(especially the music), and you'll still experience odd things happening in the background occasionally, while characters can block the pause menu. Would the game's status be considered playable at this point, or would that have to wait until setting Read Framebuffers to Memory is no longer required?
OS: Windows 8.1
Video chipset: AMD Radeon HD 8400
Processor: AMD A6 5200 2.0Ghz quad core.
Reply
#28
I'd say it's definitely not playable just yet,it takes like 30 seconds just for one punch to finish plus it's either have background and no characters or have characters and no background but at least it's getting farther.Hopefully with a few more updates it will be more playable then now.
Reply
#29
on 0.9.7.2-233-gfc65068,by enabling the framebuffers to gpu,the game is perfectly playable,with background,characters and all.i played some reounds in arcade mode and spent some time in training mode,and no issues or slowdown whatsoever
Reply
#30
Moved Smile
♦ Intel Core i7-6700HQ | 16 GB RAM | NVIDIA GeForce GTX 960M | Debian Testing
♦ Intel Core i7-2630QM | 4 GB RAM | NVIDIA GeForce GT 540M | Debian Testing
♦ PSP-3004 | 6.60 PRO-C2
Reply


Forum Jump: