avan06 / PS4CheaterNeo

PS4CheaterNeo is a program to find game cheat codes, and it is based on ps4debug and .Net Framework 4.8.
62 stars 6 forks source link

Bug Fix: Random crash doing normal scan operations #32

Open JeymyAV opened 1 year ago

JeymyAV commented 1 year ago

A new bug in the last version.

1º I did a scan of some hex value in the executable and found 2 entries and this is ok, See below: image

2º I click in the button refresh and after I click the button Next SCAN: image

As you can see this is wrong because the same 2 entries should be found cause I didn't change anything.

3º I continue click in the buttons Next SCAN and Refresh and after a few interactions: image

The full log: System.AggregateException: One or more errors occurred. ---> System.Exception: System.Exception: baseKey must be less than key, baseKey:109241798, key:109239156 at PS4CheaterNeo.BitsDictionary.Add(UInt32 key, Byte[] data) at PS4CheaterNeo.Query.Comparer(Byte[] buffer, Section section, Int32 scanStep, UInt64 AddrMin, UInt64 AddrMax, BitsDictionary bitsDict, Boolean isCompareFirst, BitsDictionary bitsDictFirst) at PS4CheaterNeo.Query.<>c__DisplayClass33_3.b__5()

System.AggregateException: One or more errors occurred. ---> System.Exception: baseKey must be less than key, baseKey:109241798, key:109239156 at PS4CheaterNeo.Query.<>cDisplayClass33_3.b5() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at PS4CheaterNeo.Query.<>cDisplayClass33_0.b0() ---> (Inner Exception #0) System.Exception: baseKey must be less than key, baseKey:109241798, key:109239156 at PS4CheaterNeo.Query.<>c__DisplayClass33_3.b__5() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()<---

at PS4CheaterNeo.Query.<>cDisplayClass33_0.b0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at PS4CheaterNeo.Query.d33.MoveNext() --- End of inner exception stack trace --- ---> (Inner Exception #0) System.Exception: System.Exception: baseKey must be less than key, baseKey:109241798, key:109239156 at PS4CheaterNeo.BitsDictionary.Add(UInt32 key, Byte[] data) at PS4CheaterNeo.Query.Comparer(Byte[] buffer, Section section, Int32 scanStep, UInt64 AddrMin, UInt64 AddrMax, BitsDictionary bitsDict, Boolean isCompareFirst, BitsDictionary bitsDictFirst) at PS4CheaterNeo.Query.<>c__DisplayClass33_3.b5()

System.AggregateException: One or more errors occurred. ---> System.Exception: baseKey must be less than key, baseKey:109241798, key:109239156 at PS4CheaterNeo.Query.<>cDisplayClass33_3.b5() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at PS4CheaterNeo.Query.<>cDisplayClass33_0.b0() ---> (Inner Exception #0) System.Exception: baseKey must be less than key, baseKey:109241798, key:109239156 at PS4CheaterNeo.Query.<>c__DisplayClass33_3.b__5() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()<---

at PS4CheaterNeo.Query.<>c__DisplayClass33_0.b0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at PS4CheaterNeo.Query.d33.MoveNext()<---

JeymyAV commented 1 year ago

More information about this bug: I did the same test with the version PS4CheaterNeo-0.9.9.3 and this bug no happen, works correctly, so seems your last changes have broke something...

avan06 commented 1 year ago

Hi, JeymyAV

Thank you for reporting the issue. It has been fixed in version 0.9.9.6-beta. Thank you.

JeymyAV commented 1 year ago

Most better but I have got yet the below crash following these steps:

1º First Scan 2º Refresh 3º Next Scan 4º Refresh + Next Scan + Stop and wait to finish. No results are returned. Correct until now, but then 5º Next Scan button and the system raise error again. Below the crash log (but if you click ok on the button Window-Log, the correct results are returned and the program continue working well):

System.AggregateException: One or more errors occurred. ---> System.Exception: System.Exception: baseKey must be less than key, baseKey:109471542, key:109468900 at PS4CheaterNeo.BitsDictionary.Add(UInt32 key, Byte[] data) at PS4CheaterNeo.Query.Comparer(Byte[] buffer, Section section, Int32 scanStep, UInt64 AddrMin, UInt64 AddrMax, BitsDictionary bitsDict, Boolean isCompareFirst, BitsDictionary bitsDictFirst) at PS4CheaterNeo.Query.<>c__DisplayClass33_3.b__5()

System.AggregateException: One or more errors occurred. ---> System.Exception: baseKey must be less than key, baseKey:109471542, key:109468900 at PS4CheaterNeo.Query.<>cDisplayClass33_3.b5() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at PS4CheaterNeo.Query.<>cDisplayClass33_0.b0() ---> (Inner Exception #0) System.Exception: baseKey must be less than key, baseKey:109471542, key:109468900 at PS4CheaterNeo.Query.<>c__DisplayClass33_3.b__5() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()<---

at PS4CheaterNeo.Query.<>cDisplayClass33_0.b0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at PS4CheaterNeo.Query.d33.MoveNext() --- End of inner exception stack trace --- ---> (Inner Exception #0) System.Exception: System.Exception: baseKey must be less than key, baseKey:109471542, key:109468900 at PS4CheaterNeo.BitsDictionary.Add(UInt32 key, Byte[] data) at PS4CheaterNeo.Query.Comparer(Byte[] buffer, Section section, Int32 scanStep, UInt64 AddrMin, UInt64 AddrMax, BitsDictionary bitsDict, Boolean isCompareFirst, BitsDictionary bitsDictFirst) at PS4CheaterNeo.Query.<>c__DisplayClass33_3.b5()

System.AggregateException: One or more errors occurred. ---> System.Exception: baseKey must be less than key, baseKey:109471542, key:109468900 at PS4CheaterNeo.Query.<>cDisplayClass33_3.b5() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at PS4CheaterNeo.Query.<>cDisplayClass33_0.b0() ---> (Inner Exception #0) System.Exception: baseKey must be less than key, baseKey:109471542, key:109468900 at PS4CheaterNeo.Query.<>c__DisplayClass33_3.b__5() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()<---

at PS4CheaterNeo.Query.<>c__DisplayClass33_0.b0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at PS4CheaterNeo.Query.d33.MoveNext()<---

avan06 commented 1 year ago

I remember this error. After clicking the stop button, if you continue with the Next button, it may cause an error. However, if you click the Undo button after stopping, you should be able to continue the Next search. For now, please try this workaround, and I'll look into improving it when I have the time. Thank you.

JeymyAV commented 1 year ago

Yes, you are right, checked and the workaround works... Anyway, I understand that this bug can be resolved when you can... I will close this when it has been fixed.