EDCD / EDDI

Companion application for Elite Dangerous
Other
444 stars 81 forks source link

VoiceAttack Plugin lags and crashes. #639

Closed rodan123 closed 6 years ago

rodan123 commented 6 years ago

EDDI version in which issue found

3.0.1-rc1

Steps to reproduce

  1. Launch Voiceattack w/ EDDI plugin
  2. Expected

    No crashes, no lag.

Observed

Voice commands execution lag by 15-30 seconds making VA unusable VA crashes when closed.

Investigation

Reverting to the VoiceAttackPlugin.cs before the VoiceAttackVariables.cs file split and recompiling EDDI restores normal operation with no lag or errors. So, I think not an issue with the database. I am going to blame PR#625, as I didn't have this issue prior to today and had just pulled and compiled with the latest commits.

Relevant log entries; 2018-06-11T04:47:59 VoiceAttackPlugin:VA_Init1 [I] EDDI VoiceAttack plugin initialization complete 2018-06-11T04:47:59 StarMapService:Sync [I] EDSM sync completed 2018-06-11T04:48:53 EDDI:eventFileHeader [I] On live 2018-06-11T04:49:50 VoiceAttackPlugin:VA_Exit1 [I] EDDI VoiceAttack plugin exiting 2018-06-11T04:49:50 StarSystemSqLiteRepository:GetStarSystem [W] Problem reading data from database, attempting to re-obtain from source: System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken) at System.Resources.ResourceManager.GetFirstResourceSet(CultureInfo culture) at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) at System.Resources.ResourceManager.GetString(String name) at EddiDataDefinitions.ResourceBasedLocalizedEDName1.get_localizedName() at EddiDataDefinitions.ResourceBasedLocalizedEDName1.<>c__DisplayClass19_0.<FromName>b__0(T v) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate) at EddiDataDefinitions.ResourceBasedLocalizedEDName1.FromName(String from) at EddiDataDefinitions.MaterialPresence..ctor(String material, Decimal percentage) at Void .ctor(System.String, System.Decimal)(Object[] ) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor1 creator, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at EddiDataProviderService.StarSystemSqLiteRepository.GetStarSystem(String name, Boolean refreshIfOutdated)

Tkael commented 6 years ago

PR submitted against unreleased code. And we are not observing similar issues in any of our internal testing.

rodan123 commented 6 years ago

Huh? What PR? Unreleased code? It's committed in the develop branch from where I imagine the next release will spawn. OK- Never mind then. The issue is definitely there. Good luck with it. I will stop opening reports about the code in the dev branch.

Tkael commented 6 years ago

Do you follow the Discord? VerticalBlank posted this just the other day:

A reminder that just because we are open source doesn't mean that you should be pulling our work-in-progress and speculative branches and running them, still less opening issue tickets against them. 

Doing so is impolite and I have had devs tell me that it makes them less comfortable about sharing work-in-progress. That is something that I really want to avoid.

I know you are trying to help but it is in fact an impediment if it makes the devs uncomfortable.

 PLEASE GIVE US THE SPACE TO WORK IN THE OPEN.

Going forward, issues referencing unreleased code will be immediately closed as invalid.

We make no warranty or claim to stability for code in the develop branch. You probably haven't looked at this way, but by opening a ticket you are essentially asking us to support code that we haven't even released.

You are still welcome to build, install, and test. If you run into issues then sending a PM or posting a question on Discord is probably going to better received then opening a ticket.

This snippet

Problem reading data from database, attempting to re-obtain from source: System.Threading.ThreadAbortException: Thread was being aborted.

makes it look like something unrelated (in VoiceAttack or EDDI) caused the thread to abort... the thread seems to have been humming along just fine before it was interrupted. Unfortunately, whatever interrupted it wasn't captured. If we had a clear protocol for replicating the error then we could isolate the issue better, but right now I don't think there's anything actionable we can use here.

rodan123 commented 6 years ago

No, I don't follow the discord. Don't know why anyone would feel "uncomfortable" or feel it is "impolite" IMO, If the code is committed to the develop branch, testing should be welcomed as it will catch issues before they are sent out in a bug-ridden release to everyone, I have never even looked at an in-progress branch, like feature\xxxx unless asked to. He's right though, I thought I was being helpful. Silly me. Suit yourselves, I am content to run my build, fix the issues that I find, and keep it to myself.

The issue above is with the revised VoiceAttackPlugin code. Not outside EDDI. Guess we'll see if others have the same issue when the build is released.