Skip to content
New issue

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

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

Already on GitHub? # to your account

Update not working properly and HDT crashing afterwards (v1.4.22) #56

Closed
sfisc opened this issue Nov 30, 2024 · 4 comments
Closed

Update not working properly and HDT crashing afterwards (v1.4.22) #56

sfisc opened this issue Nov 30, 2024 · 4 comments

Comments

@sfisc
Copy link

sfisc commented Nov 30, 2024

Thanks for the update! Unfortunately, it broke things for me. After updating with the update button, my HDT still shows a popup about new version and the old version number in the plugins section. When I try to open PityTimers, HDT crashes

@Navaash-F
Copy link

For reference, this is the exception being thrown by PT 1.4.22 with HSDT v1.37.4:

System.Windows.Markup.XamlParseException: Field not found: 'Hearthstone_Deck_Tracker.Config.SelectedLanguage'. ---> System.MissingFieldException: Field not found: 'Hearthstone_Deck_Tracker.Config.SelectedLanguage'.
at PackTracker.View.PackNameConverter.Convert(Int32 packId, Locale lang)
at PackTracker.View.PackNameConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture) in D:\a\PackTracker\PackTracker\PackHistorian\View\PackNameConverter.cs:line 36
at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
at System.Windows.Data.BindingExpression.Activate(Object item)
at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
at System.Windows.Data.BindingExpression.AttachOverride(DependencyObject target, DependencyProperty dp)
at System.Windows.Data.BindingExpressionBase.OnAttach(DependencyObject d, DependencyProperty dp)
at System.Windows.StyleHelper.GetInstanceValue(UncommonField`1 dataField, DependencyObject container, FrameworkElement feChild, FrameworkContentElement fceChild, Int32 childIndex, DependencyProperty dp, Int32 i, EffectiveValueEntry& entry)
at System.Windows.FrameworkTemplate.ReceivePropertySet(Object targetObject, XamlMember member, Object value, DependencyObject templatedParent)
at System.Windows.FrameworkTemplate.<>c__DisplayClass45_0.b__3(Object sender, XamlSetValueEventArgs setArgs)
at System.Xaml.XamlObjectWriter.OnSetValue(Object eventSender, XamlMember member, Object value)
at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteEndObject()
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)

This almost certainly has something to go with this patch note in the latest HSDT:

• The card language setting has been removed. The language used for cards now automatically matches the language of the Hearthstone installation.
• The UI language setting has been moved to Options > Tracker > General.

@swilkins1337
Copy link

I updated manually, but it's still completely broken. Touching anything to do with the plugin either crashes HDT or disables the plugin automatically. I'm guessing it's an HDT bug that the exception isn't always caught.

@remcogerlich
Copy link

remcogerlich commented Nov 30, 2024

Looking at the recent HDT commits ( https://github.com/HearthSim/Hearthstone-Deck-Tracker/commits/master/ , in particular HearthSim/Hearthstone-Deck-Tracker@a8fb90f ), it seems Config.SelectedLanguage was removed and there is now Config.Localization, which is also an enum instead of a string. That was then released as 1.37.4. That was two days ago and that is also when the problems started for me.

Going back to HDT 1.37.3 is a temporary fix, make sure to turn off checking for updates in the settings. Windows download link for it is https://github.com/HearthSim/HDT-Releases/releases/download/v1.37.3/HDT-Installer.exe .

@beheh
Copy link

beheh commented Nov 30, 2024

Hey there! That's correct, we recently removed Config.Instance.SelectedLanguage in HDT because it's determined from the game now. We didn't realize plugins relied on this setting.

To restore this plugin we'll add the field back to HDT, albeit hardcoded to enUS, in HearthSim/Hearthstone-Deck-Tracker@2759ab9. The next HDT version will include this and PackTracker should at least start working again, and then the next PackTracker update will have to start using the new method.

Sidenote: Ideally we would've proxied this with a property to the new method so it would've had full backwards-compatibility instead of hard-coding a language, but we can't do that in this specific case because Config uses fields instead of properties.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants