View Issue Details

IDProjectCategoryLast Update
0019150AI War 2Crash/ExceptionJun 3, 2017 8:32 pm
ReporterChris_McElligottPark Assigned Tokeith.lamothe  
Severityminor 
Status resolvedResolutionfixed 
Product Version0.400 Usability and the GUI Pipeline 
Summary0019150: Bug in the setup of the input field on the start new game screen.
DescriptionSo, I finally figured out why a few bad things have been happening with the GUI -- some non-threadsafe things have been called from worker threads, and in some cases before an object is fully initialized. Eek!

I've put in safeguards to prevent this, but the side effect is that now there are cases where a secondary thread (or even the primary thread, in theory) tries to write to some control, fails, and thus the control is blank. This happens with the map seed when you load the start new game window for the first time. And it can also happen when you resize the window while on the map screen.

To see it and the stacktrace, comment out the !this.IsConsideredInitialized checks in ArcenUI_Text and ArcenUI_Input.

I'm not sure what is causing the secondary thread to try to write to these controls at that specific time, but it needs to basically never try to write to those controls unless they have been initialized. I think I see that ArcenUIWrapperedUnityText is there as a buffer between the two thread contexts, and that's awesome, but that can only be initialized from the main thread at the moment.

One way to solve this, I suppose, would be to make it so that ArcenUIWrapperedUnityText could be "partially initialized" from secondary threads, and then during the real Initialize() call on ArcenUI_Input and similar it fills in the non-threadsafe information if a partial initialization has already happened. I kind of worry about race conditions and thread contention in those contexts, though, so simply having the secondary thread know "don't bug me yet!" when things aren't initialized would be good.

Frankly I'm not sure exactly why that's not initialized yet anyhow, since it seems to be intent on initializing all the controls in all the windows on program start. Is it doing a clear/wipe of the controls when you hit start new game? The lag at the start suggests maybe?

Anyway, I leave this one to you. ;)
TagsNo tags attached.

Relationships

related to 0019152 resolvedkeith.lamothe Buttons blank in the savegame load menu and the commands menu. 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
Jun 2, 2017 9:16 pm Chris_McElligottPark New Issue
Jun 2, 2017 9:16 pm Chris_McElligottPark Status new => assigned
Jun 2, 2017 9:16 pm Chris_McElligottPark Assigned To => keith.lamothe
Jun 2, 2017 9:56 pm Chris_McElligottPark Relationship added related to 0019152
Jun 3, 2017 8:32 pm keith.lamothe Status assigned => resolved
Jun 3, 2017 8:32 pm keith.lamothe Resolution open => fixed