soywiz/cspspemu — Issue #8: Problem Vsync 
Author: maximu
Created: 2011-12-19 23:38:12+00:00
State: open

I Tested on Cube.cso test

If you turn off Vsync stops working rendering DisplayScreen crash

System.InvalidOperationException: Queue empty.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resour
ce)
at System.Collections.Generic.Queue`1.Dequeue()
at CSPspEmu.Core.Gpu.GpuProcessor.DequeueFreeDisplayList() in C:\Users\MaXiMu
\Desktop\emuladores\pspemu\pspemugit\cspspemu\CSPspEmu.Core.Gpu\GpuProcessor.cs:
line 143
at CSPspEmu.Hle.Modules.ge.sceGe_user._sceGeListEnQueue(UInt32 InstructionAdd
ressStart, UInt32 InstructionAddressStall, Int32 CallbackId, PspGeListArgs* Args
, Action`1 Action) in C:\Users\MaXiMu\Desktop\emuladores\pspemu\pspemugit\cspspe
mu\CSPspEmu.Hle.Modules\ge\sceGe_user.DisplayList.cs:line 21
Error on thread HleThread(Id=2, Name='user_main', Status=Ready, WaitCount=1008)
CSharpUtils.Threading.GreenThreadException: GreenThread Exception ---> System.Ex
ception: ERROR calling sceGe_user.sceGeListEnQueue! ---> System.InvalidOperation
Exception: Queue empty.
at CSPspEmu.Hle.Modules.ge.sceGe_user._sceGeListEnQueue(UInt32 InstructionAdd
ressStart, UInt32 InstructionAddressStall, Int32 CallbackId, PspGeListArgs* Args
, Action`1 Action) in C:\Users\MaXiMu\Desktop\emuladores\pspemu\pspemugit\cspspe
mu\CSPspEmu.Hle.Modules\ge\sceGe_user.DisplayList.cs:line 45
at CSPspEmu.Hle.Modules.ge.sceGe_user.sceGeListEnQueue(UInt32 InstructionAddr
essStart, UInt32 InstructionAddressStall, Int32 CallbackId, PspGeListArgs* Args)
in C:\Users\MaXiMu\Desktop\emuladores\pspemu\pspemugit\cspspemu\CSPspEmu.Hle.Mo
dules\ge\sceGe_user.DisplayList.cs:line 61
at (CpuThreadState )
at CSPspEmu.Hle.HleModuleHost.<>c__DisplayClass9.b__7(CpuThreadState CpuThreadState) in C:\Users\MaXiMu\Desktop\emuladores\pspem
u\pspemugit\cspspemu\CSPspEmu.Hle\HleModuleHost.cs:line 282
--- End of inner exception stack trace ---
at CSPspEmu.Hle.HleModuleHost.<>c__DisplayClass9.b__7(CpuThreadState CpuThreadState) in C:\Users\MaXiMu\Desktop\emuladores\pspem
u\pspemugit\cspspemu\CSPspEmu.Hle\HleModuleHost.cs:line 294
at CSPspEmu.Hle.Loader.ElfPspLoader.<>c__DisplayClass2.b__1(C
puThreadState CpuThreadState) in C:\Users\MaXiMu\Desktop\emuladores\pspemu\pspem
ugit\cspspemu\CSPspEmu.Hle\Loader\ElfPspLoader.cs:line 342
at CSPspEmu.Hle.Managers.HleModuleManager.b__4(Int32 Cod
e, CpuThreadState CpuThreadState) in C:\Users\MaXiMu\Desktop\emuladores\pspemu\p
spemugit\cspspemu\CSPspEmu.Hle\Managers\HleModuleManager.cs:line 36
at CSPspEmu.Core.Cpu.CpuProcessor.Syscall(Int32 Code, CpuThreadState CpuThrea
dState) in C:\Users\MaXiMu\Desktop\emuladores\pspemu\pspemugit\cspspemu\CSPspEmu
.Core.Cpu\CpuProcessor.cs:line 54
at (CpuThreadState )
at CSPspEmu.Hle.HleThread.MainLoop() in C:\Users\MaXiMu\Desktop\emuladores\ps
pemu\pspemugit\cspspemu\CSPspEmu.Hle\HleThread.cs:line 261
at CSharpUtils.Threading.GreenThread.<>c__DisplayClass1.
b__0() in C:\Users\MaXiMu\Desktop\emuladores\pspemu\pspemugit\csharputils\CSharp
Utils\CSharpUtils\Threading\GreenThread.cs:line 85
--- End of inner exception stack trace ---
at CSharpUtils.Threading.GreenThread.SwitchTo() in C:\Users\MaXiMu\Desktop\em
uladores\pspemu\pspemugit\csharputils\CSharpUtils\CSharpUtils\Threading\GreenThr
ead.cs:line 133
at CSPspEmu.Hle.Managers.HleThreadManager.StepNext() in C:\Users\MaXiMu\Deskt
op\emuladores\pspemu\pspemugit\cspspemu\CSPspEmu.Hle\Managers\HleThreadManager.c
s:line 143
at CSPspEmu.Runner.Components.Cpu.CpuComponentThread.Main() in C:\Users\MaXiM
u\Desktop\emuladores\pspemu\pspemugit\cspspemu\CSPspEmu.Runner\Components\Cpu\Cp
uComponentThread.cs:line 266
r 0(zr) : 0x00000000, r 1(at) : 0x08900000, r 2(v0) : 0x08A10D88, r 3(v1) : 0x08
A10000
r 4(a0) : 0x48909860, r 5(a1) : 0x48909860, r 6(a2) : 0x00000001, r 7(a3) : 0x00
000000
r 8(t0) : 0x48909860, r 9(t1) : 0x00000000, r10(t2) : 0x00000000, r11(t3) : 0x00
000004
r12(t4) : 0x0AFFEEC0, r13(t5) : 0x00000000, r14(t6) : 0x00000000, r15(t7) : 0x00
000000
r16(s0) : 0x08A10EBC, r17(s1) : 0x08A10000, r18(s2) : 0x08A10000, r19(s3) : 0x08
000104
r20(s4) : 0x00000001, r21(s5) : 0x00000013, r22(s6) : 0x00000000, r23(s7) : 0x00
000000
r24(t8) : 0x00000000, r25(t9) : 0x00000000, r26(k0) : 0x0B000000, r27(k1) : 0x00
000000
r28(gp) : 0x08911820, r29(sp) : 0x0AFFEF40, r30(fp) : 0x0AFFEF58, r31(ra) : 0x08
901FFC

f 0 : 0x3F800000, 1, f 1 : 0x3F800000, 1, f 2 : 0x3F800000, 1, f 3 : 0x3EDD6FD9,
0.432494
f 4 : 0x3E91A05A, 0.2844265, f 5 : 0x41000000, 8, f 6 : 0x00000000, 0, f 7 : 0x0
0000000, 0
f 8 : 0x00000000, 0, f 9 : 0x00000000, 0, f10 : 0x00000000, 0, f11 : 0x00000000,
0
f12 : 0xC0200000, -2.5, f13 : 0x00000000, 0, f14 : 0x3F000000, 0.5, f15 : 0x447A
0000, 1000
f16 : 0x00000000, 0, f17 : 0x00000000, 0, f18 : 0x00000000, 0, f19 : 0x00000000,
0
f20 : 0x00000000, 0, f21 : 0x00000000, 0, f22 : 0x00000000, 0, f23 : 0x00000000,
0
f24 : 0x00000000, 0, f25 : 0x00000000, 0, f26 : 0x00000000, 0, f27 : 0x00000000,
0
f28 : 0x00000000, 0, f29 : 0x00000000, 0, f30 : 0x00000000, 0, f31 : 0x00000000,
0

Last registered PC = 0x8905E98, RA = 0x8901FFC
HleThread(Id=1, Name='Thread-1', Status=Killed, WaitCount=0)
HleThread(Id=2, Name='user_main', Status=Ready, WaitCount=1008)
HleThread(Id=3, Name='update_thread', Status=Waiting, WaitCount=1, CurrentWaitTy
pe=None, WaitDescription=sceKernelSleepThread)
Executable had relocation: True