XUnity.AutoTranslator icon indicating copy to clipboard operation
XUnity.AutoTranslator copied to clipboard

[5.4.2] Not working, Exceptions

Open TokcDK opened this issue 11 months ago • 5 comments
trafficstars

Version 5.4.2 raising exceptions above in the log/console. Versions before 5.4.2 is working. Tried to remove old config with same result. BepInEx 5.4.23.2

init:

[Info   :   BepInEx] Loading [XUnity Auto Translator 5.4.2]
[Error  :XUnity.Common] An unexpected error occurred during plugin initialization.
System.TypeInitializationException: An exception was thrown by the type initializer for XUnity.AutoTranslator.Plugin.Core.UIResize.UIResizeAttachment ---> System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: options
  at System.Text.RegularExpressions.Regex.validate_options (RegexOptions options) [0x00000] in <filename unknown>:0 
  at System.Text.RegularExpressions.Regex..ctor (System.String pattern, RegexOptions options) [0x00000] in <filename unknown>:0 
  at XUnity.AutoTranslator.Plugin.Core.UIResize.UIResizeAttachment..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at XUnity.AutoTranslator.Plugin.Core.UIResize.UIResizeCache..ctor () [0x00000] in <filename unknown>:0 
  at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Initialize () [0x00000] in <filename unknown>:0 
  at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Awake () [0x00000] in <filename unknown>:0 

repeating several times warning a little later:

[Warning:XUnity.Common] An unexpected error occurred.
System.NullReferenceException: Object reference not set to an instance of an object
  at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.TranslateOrQueueWebJobImmediate (System.Object ui, System.String text, Int32 scope, XUnity.AutoTranslator.Plugin.Core.TextTranslationInfo info, Boolean allowStabilizationOnTextComponent, Boolean ignoreComponentState, Boolean allowStartTranslationImmediate, Boolean allowStartTranslationLater, IReadOnlyTextTranslationCache tc, XUnity.AutoTranslator.Plugin.Core.Endpoints.UntranslatedTextInfo untranslatedTextContext, XUnity.AutoTranslator.Plugin.Core.ParserTranslationContext context) [0x00000] in <filename unknown>:0 
  at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.TranslateOrQueueWebJob (System.Object ui, System.String text, Boolean ignoreComponentState, XUnity.AutoTranslator.Plugin.Core.TextTranslationInfo info) [0x00000] in <filename unknown>:0 
  at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Hook_TextChanged (System.Object ui, Boolean onEnable) [0x00000] in <filename unknown>:0 

and error spam after all loaded:

[Error  :XUnity.Common] An error occurred in Update callback. 
System.NullReferenceException: Object reference not set to an instance of an object
  at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Update () [0x00000] in <filename unknown>:0 

TokcDK avatar Dec 03 '24 08:12 TokcDK

https://github.com/bbepis/XUnity.AutoTranslator/pull/626

wqerrewetw avatar Dec 06 '24 19:12 wqerrewetw

What is the unity version of the game? Send a full log.

ManlyMarco avatar Dec 07 '24 08:12 ManlyMarco

Koikatsu studio error even when Bepinex+XUA only but I dont see older versions drop compatibility warning in the XUA5.4.2 release page. Also checked with newer unity game and there is no error. LogOutput.log, Koikatsu studio run

TokcDK avatar Dec 09 '24 05:12 TokcDK

Well, it seems there needs to be some compatibility measures for the compiled flag to work, even tho it has been existing at least since .net framework 2.0 (2008) the whole time.

Lmeks avatar Dec 09 '24 08:12 Lmeks

Aight, it seems not every Unity game supports compiled regexi, lmao, just gotta compile regexi for those games that can do it.

Lmeks avatar Dec 09 '24 13:12 Lmeks