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

Fix ruby generator not work in the release build. #1321

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andy840119
Copy link
Member

Closes issue #1319

Should add missing dlls for fixing this issue.

@andy840119 andy840119 added bug Something isn't working ILMerge Got no idea why there's so much merge tools i need to try. labels May 14, 2022
@andy840119 andy840119 self-assigned this May 14, 2022
@andy840119
Copy link
Member Author

andy840119 commented May 14, 2022

Got no idea why still got related issue even if i already pack the Lucene.Net.Analysis.Kuromoji.dll.

Here's the log(System.IO.FileNotFoundException: Not in assembly: Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary$targetMap.dat):

2022-05-14 14:04:38 [error]: An unhandled error has occurred.
2022-05-14 14:04:38 [error]: System.TypeInitializationException: The type initializer for 'SingletonHolder' threw an exception.
2022-05-14 14:04:38 [error]: ---> System.Exception: Cannot load TokenInfoDictionary.
2022-05-14 14:04:38 [error]: ---> System.IO.FileNotFoundException: Not in assembly: Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary$targetMap.dat
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.BinaryDictionary.GetTypeResource(Type clazz, String suffix)
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.BinaryDictionary..ctor()
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary..ctor()
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary.SingletonHolder..cctor()
2022-05-14 14:04:38 [error]: --- End of inner exception stack trace ---
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary.SingletonHolder..cctor()
2022-05-14 14:04:38 [error]: --- End of inner exception stack trace ---
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary.GetInstance()
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.JapaneseTokenizer..ctor(AttributeFactory factory, TextReader input, UserDictionary userDictionary, Boolean discardPunctuation, JapaneseTokenizerMode mode)
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.JapaneseTokenizer..ctor(TextReader input, UserDictionary userDictionary, Boolean discardPunctuation, JapaneseTokenizerMode mode)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.Generator.RubyTags.Ja.JaRubyTagGenerator.<>c.<.ctor>b__1_0(String fieldName, TextReader reader)
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Analyzer.AnonymousAnalyzer.CreateComponents(String fieldName, TextReader reader)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.Generator.RubyTags.Ja.JaRubyTagGenerator.CreateRubyTags(Lyric lyric)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.Generator.RubyTags.RubyTagGeneratorSelector.GenerateRubyTags(Lyric lyric)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Lyrics.LyricRubyTagsChangeHandler.<AutoGenerate>b__2_0(Lyric lyric)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.HitObjectChangeHandler`1.<>c__DisplayClass7_0.<PerformOnSelection>b__0(HitObject h)
2022-05-14 14:04:38 [error]: at osu.Game.Screens.Edit.EditorBeatmap.PerformOnSelection(Action`1 action)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.HitObjectChangeHandler`1.PerformOnSelection(Action`1 action)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Lyrics.LyricRubyTagsChangeHandler.AutoGenerate()
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.Lyrics.Extends.RubyRomaji.RubyTagAutoGenerateSection.RubyTagAutoGenerateSubsection.Apply()
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.Lyrics.Extends.Components.AutoGenerateSubsection.<>c__DisplayClass1_0.<load>b__1(LyricEditorSelectingAction e)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.Lyrics.States.LyricSelectionState.EndSelecting(LyricEditorSelectingAction action)
2022-05-14 14:04:38 [error]: at osu.Game.Rulesets.Karaoke.Edit.Lyrics.ApplySelectingArea.<>c__DisplayClass5_0.<load>b__2()
2022-05-14 14:04:38 [error]: at osu.Framework.Graphics.Containers.ClickableContainer.OnClick(ClickEvent e)
2022-05-14 14:04:38 [error]: at osu.Game.Graphics.UserInterface.OsuButton.OnClick(ClickEvent e)
2022-05-14 14:04:38 [error]: at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
2022-05-14 14:04:38 [error]: at osu.Framework.Input.ButtonEventManager`1.PropagateButtonEvent(IEnumerable`1 drawables, UIEvent e)
2022-05-14 14:04:38 [error]: at osu.Framework.Input.MouseButtonEventManager.handleClick(InputState state, List`1 targets)
2022-05-14 14:04:38 [error]: at osu.Framework.Input.MouseButtonEventManager.HandleButtonUp(InputState state, List`1 targets)
2022-05-14 14:04:38 [error]: at osu.Framework.Input.InputManager.HandleMouseButtonStateChange(ButtonStateChangeEvent`1 e)
2022-05-14 14:04:38 [error]: at osu.Framework.Input.UserInputManager.HandleInputStateChange(InputStateChangeEvent inputStateChange)
2022-05-14 14:04:38 [error]: at osu.Framework.Input.StateChanges.ButtonInput`1.Apply(InputState state, IInputStateChangeHandler handler)
2022-05-14 14:04:38 [error]: at osu.Framework.Input.InputManager.Update()
2022-05-14 14:04:38 [error]: at osu.Framework.Input.PassThroughInputManager.Update()
2022-05-14 14:04:38 [error]: at osu.Framework.Graphics.Drawable.UpdateSubTree()
2022-05-14 14:04:38 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2022-05-14 14:04:38 [error]: at osu.Framework.Platform.GameHost.UpdateFrame()
2022-05-14 14:04:38 [error]: at osu.Framework.Threading.GameThread.processFrame()
2022-05-14 14:04:38 [error]: An unhandled error has occurred. (inner)
2022-05-14 14:04:38 [error]: System.Exception: Cannot load TokenInfoDictionary.
2022-05-14 14:04:38 [error]: ---> System.IO.FileNotFoundException: Not in assembly: Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary$targetMap.dat
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.BinaryDictionary.GetTypeResource(Type clazz, String suffix)
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.BinaryDictionary..ctor()
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary..ctor()
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary.SingletonHolder..cctor()
2022-05-14 14:04:38 [error]: --- End of inner exception stack trace ---
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary.SingletonHolder..cctor()
2022-05-14 14:04:38 [error]: An unhandled error has occurred. (inner) (inner)
2022-05-14 14:04:38 [error]: System.IO.FileNotFoundException: Not in assembly: Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary$targetMap.dat
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.BinaryDictionary.GetTypeResource(Type clazz, String suffix)
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.BinaryDictionary..ctor()
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary..ctor()
2022-05-14 14:04:38 [error]: at Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary.SingletonHolder..cctor()

image
Seems missing the file in here.

@andy840119
Copy link
Member Author

image
But the dotpeek says this dll contains the resource file(Lucene.Net.Analysis.Ja.Dict.TokenInfoDictionary$targetMap.dat).
weird.

@andy840119
Copy link
Member Author

andy840119 commented May 14, 2022

image
Should works only if copy those files into ruleset folder.
Packing seems not working.

@andy840119
Copy link
Member Author

image
Seems that it will get wrong assembly name...

@andy840119 andy840119 force-pushed the fix-cannot-generate-ruby-in-release-build branch from 937e7b3 to d4635ec Compare May 15, 2022 08:40
@andy840119
Copy link
Member Author

This shit does not resolved after upgrade the Lucene.Net package to the latest.

@andy840119
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ILMerge Got no idea why there's so much merge tools i need to try. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant