Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on "Searching for game readers" #1451

Closed
Galloant opened this issue Oct 28, 2023 · 4 comments
Closed

Stuck on "Searching for game readers" #1451

Galloant opened this issue Oct 28, 2023 · 4 comments

Comments

@Galloant
Copy link

After having a hard drive failure and restoring the drive partially from a backup, SimHub gets stuck on loading pop-up at "searching for game readers.
I am running the latest release.

After deleting the *:\Program Files (x86)\SimHub Folder and reinstalling SH it starts, but it would mean I'd loose all plug-ins.

Is there any way I can get it too run without deleting everything?

[2023-10-28 15:50:02,505] INFO - Administrator privileges : False 
[2023-10-28 15:50:02,505] INFO - OS version : Microsoft Windows NT 10.0.22621.0, Windows 10.0.22621
[2023-10-28 15:50:02,505] INFO - License status : Free
[2023-10-28 15:50:02,505] INFO - Process priority : Normal
[2023-10-28 15:50:06,272] FATAL - System.TypeInitializationException: The type initializer for 'SimHub.Plugins.PluginFinder' threw an exception. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: A. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at WoteverCommon.JsonExtensions.FromJsonFile[T](String path)
   at SimHub.Plugins.PluginFinder..cctor()
   --- End of inner exception stack trace ---
   at SimHub.Plugins.PluginFinder.GetReaders()
   at ?.?.LoadReaders()
   at ?.?.<>c.<App_Startup>b__13_3()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at ?.?.<App_Startup>d__13.MoveNext()
[2023-10-28 15:50:06,272] ERROR - Unhandled dispatcher errorSystem.TypeInitializationException: The type initializer for 'SimHub.Plugins.PluginFinder' threw an exception. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: A. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at WoteverCommon.JsonExtensions.FromJsonFile[T](String path)
   at SimHub.Plugins.PluginFinder..cctor()
   --- End of inner exception stack trace ---
   at SimHub.Plugins.PluginFinder.GetReaders()
   at ?.?.LoadReaders()
   at ?.?.<>c.<App_Startup>b__13_3()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at ?.?.<App_Startup>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

@SHWotever
Copy link
Owner

Hi ! Seeing where it get stuck, the following file got corrupted :
C:\Program Files (x86)\SimHub\PluginsData\Common\ResolveCache.json
Hopefully it's just a cache file and it can be deleted.
That said this specific file is rarely written, if it got corrupted it's likely some other settings files are too.
It's worth a try, but I doubt you won't hit another wall after it.

@Galloant
Copy link
Author

Damn, I didn't expect a reply this fast. Appreciate it a lot!

It worked, but now I'm stuck in the first startup menu and can't select anything. Screenshot 2023-10-28 163301

[2023-10-28 16:29:19,821] INFO - Administrator privileges : False 
[2023-10-28 16:29:19,821] INFO - OS version : Microsoft Windows NT 10.0.22621.0, Windows 10.0.22621
[2023-10-28 16:29:19,821] INFO - License status : Free
[2023-10-28 16:29:19,821] INFO - Process priority : Normal
[2023-10-28 16:29:23,678] INFO - 86 game readers loaded
[2023-10-28 16:29:23,882] ERROR - Error while loading file PluginsData\PluginsActivation.json, version 0, attempting previous version.
[2023-10-28 16:29:23,882] ERROR - Error while loading file PluginsData\PluginsActivation.json, version 1, attempting previous version.
[2023-10-28 16:29:23,882] ERROR - Error while loading file PluginsData\PluginsActivation.json, version 2, attempting previous version.
[2023-10-28 16:29:23,882] ERROR - Error while loading file PluginsData\PluginsActivation.json, version 3, attempting previous version.
[2023-10-28 16:29:23,882] ERROR - Error while loading file PluginsData\PluginsActivation.json, version 4, attempting previous version.
[2023-10-28 16:29:23,882] ERROR - Error while loading file PluginsData\PluginsActivation.json, version 5, attempting previous version.
[2023-10-28 16:29:23,898] INFO - (Re)Starting IRacing Game Manager and plugin manager
[2023-10-28 16:29:23,898] INFO - Creating IRacing game manager (IRacingReader.IRacingManager)
[2023-10-28 16:29:23,898] ERROR - Error while loading game manager
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: A. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at WoteverCommon.JsonExtensions.FromJsonFile[T](String path)
   at IRacingReader.IRacingManager..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at SimHubWPF.MainWindow.CreateGameManager(SupportedGameManager game, Action`1 status)
   at SimHubWPF.MainWindow.<ChangeGame>d__42.MoveNext()
[2023-10-28 16:29:23,898] ERROR - Error while loading game manager
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: A. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at WoteverCommon.JsonExtensions.FromJsonFile[T](String path)
   at IRacingReader.IRacingManager..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at SimHubWPF.MainWindow.CreateGameManager(SupportedGameManager game, Action`1 status)
   at SimHubWPF.MainWindow.<ChangeGame>d__42.MoveNext()
[2023-10-28 16:29:23,898] WARN - Monitor Device Driver is null

@SHWotever
Copy link
Owner

I fear most of your settings files looks corrupted. As I was fearing it has been hitting the next 2 loaded settings files.

At this point I fear your hard drive crash wasted most if not all settings files. Some settings files have "anti corruption" measures , and I can see in the log that on one of the next settings files loaded is using it, but all the 5 previous versions were also corrupted.

The only solution at this point it to start back from a clean install i'm sorry. If most settings files are corrupted I see no good solutions to recover the few which might still be viable. Simhub uses many of them (as an anti-corruption measure too quite ironically), it would take days to sort them one by one :(

@Galloant
Copy link
Author

Thanks @SHWotever for the reply. I feared that would be the case.
It's slightly annoying, but nothing we can do about. Thanks for the very kind and quick help though. I really appreciate it! :)

Thanks also to @luahan77m for offering help. However, I consider this issue to be closed at this point.

Repository owner deleted a comment from luahan77m Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants