The Tournament Director Forums

Main => Help Me => Topic started by: Corey Cooper on November 06, 2017, 05:25:45 PM

Title: Black screens and application slow down
Post by: Corey Cooper on November 06, 2017, 05:25:45 PM
There are some topics and replies posted, and some of you have reported directly to me, about the application showing "black screens".  I've also been receiving error reports where the main issue is "out of memory".  I believe these are the same issue and that the application can behave unexpectedly when it no longer has the memory it needs to continue operating normally.  This doesn't mean your PC doesn't have enough memory.  It's how much memory IE allocates for the TD, and how IE allocates and uses that memory.

I now believe this is happening almost exclusively with Internet Explorer 11 and Windows 10.  Previously I was unable to reproduce this issue because I had forced my development PCs to stop updating Internet Explorer at version 10, and I wasn't developing on Windows 10 yet.  After performing testing on Windows 10 and IE 11, I can reproduce this issue quite easily.  Simply opening the Buy-in Players dialog or Bust-out Players dialog 50 to 100 times will cause the memory footprint of the application to increase to a size that will slow the application's responsiveness down noticeably, and eventually will lead to black screens and unexpected (and seemingly unrelated) errors, and ultimately crash the application.

As an example, and for some hard numbers, with IE 10 installed version 3.4.1 will start with a memory size of around 100 to 110 MB (megabytes) of memory.  After busting out 100 players, the memory size will increase to about 160 MB.  While it would be awesome if it didn't increase at all, this is actually fine.  If the memory consumption is consistent, 1000 players could be busted out without an issue.

With IE 11 installed, the same actions increase the memory size to over 700 MB.  The application noticeably slows, and ultimately it will freeze for 5 to 30 seconds, and then will continue working.  At this point, IE has done some memory "garbage collection" and the memory size has dropped to around 250 to 300 MB.  While that's good, the application still responds "sluggishly" and it is only a matter of time before it increases back to an unsustainable level and the black screens and ultimate crashing occurs.

Interestingly, the behavior is the same for version 3.3 and version 3.2, so I'm not sure why this wasn't a bigger issue before now, but it might just be that more and more people are moving to Windows 10.  Earlier versions didn't seem to exhibit this problem to the same extreme, but I've been unsuccessful in pinpointing any particular change from 3.11 to 3.2 that could have caused an issue.

So what can be done?

Well, for the long term I'm moving the applicaton to a modern framework.  I'm currently investigating Electron.  The model is very different, so it's going to be a lot of work, but I see this as really the only viable way forward for the TD application.

In the short term, here are some suggestions for working around this very annoying issue.  These are mostly good ideas to follow anyway to save you from losing information and/or time during a tournament should something go wrong.

1) Always use "Auto-save".  Always.  This should make it easy to get started right back where you left off if this should something happen.  That can be enabled on the Game tab.

2) Enable "Make backups when saving tournaments".  This is on the Preferences tab in the "Loading / Saving" section.  When this is enabled, every time auto-save kicks in and saves your tournament, instead of simply writing over the tournament file with the new version, it renames the tournament file first with a time stamp.  That would allow you to even go back to an earlier copy of the tournament if necessary.  In the extremely rare case that the TD application crashed while it was saving the tournament (rendering the saved tournament useless), you could go back to a previously saved version.  You might have to bust a player out again or move the clock forward a bit, but at least you wouldn't be starting from scratch.

3) On this same Preferences page, select "Automatically enable Auto-save".  This is really just an extra precaution.  This will help in case you forget to enable Auto-save.

4) On this same Preferences page, check the box next to "Upon application start, continue where I left off".  With this enabled, when you start the TD application the same tournament file you had loaded when you last exited the TD application will automatically be loaded again.  This makes continuing quick and easy.

5) Don't be afraid to exit the Tournament Director and restart it if you think there's an issue.  By using the previous settings, you can exit the TD at ANY time, restart it, and simply continue right where you left off.  This can be done in a matter of seconds.  Restarting the application will free all memory it is using and start it over "fresh".

6) Internet Explorer 11 is a problem with the TD.  For most people it is fine, but it uses a LOT more memory than Internet Explorer 10.  If you have the chance to move BACK to Internet Explorer 10, I would recommend it, especially if you're having an issue like this.  If you're using Windows 10, this is not an option, as you cannot use any version of IE except 11.  If you're using Windows 7 or 8 ([edit: not Windows 8.1], you can move back to IE 10.  I would do this.  You won't lose any functionality and you'll make it less likely you'll run into issues like this.  Here are steps for doing that if you want to try it:

tl;dr: This is a memory issue that is, I believe, exclusive to IE 11 (and possible Windows 10).  I'm trying to get away from IE entirely, but it will be a long time until that happens.  Roll back to IE 10 if you can (you can't if you're using Windows 10 [edit: or Windows 8.1]).  Use the above steps to help alleviate the pain of this problem if you must use IE 11.  I don't think going back to version 3.3 will help, but you're welcome to try it.  Some people have had success doing this.  Earlier versions of the application are available on the TD website: http://www.thetournamentdirector.net/downloadVersion2.html

Edit (03/09/2018): As many have discovered by now, version 3.4.3 was released a few days ago, and it contains a fix for the memory leak issue.  Only time will tell how effective that fix is, but I encourage anyone using version 3.4 or later to upgrade: http://www.thetournamentdirector.net/download
Title: Re: Black screens and application slow down
Post by: Silver Owl on November 07, 2017, 08:11:04 AM
Corey, It seems that the tournament size affects this ... is that correct? I run small tournaments with 14-15 players max. and cannot use version 3.4 without getting the black screens but do not have any problems with 3.3.

This is on windows 10 and IE 11.
Title: Re: Black screens and application slow down
Post by: RichieD on November 07, 2017, 11:51:00 AM
I regularly run tournaments with 30 to 50 people... on a Windows 7 virtual machine, so far v3.4 has been well behaved and hasn't locked-up or given a black screen [Kiss of death!!]
Earlier versions had issues with memory exhaustion which Corey seems to have nailed down to the way screen transitions were being performed.

I'd be inclined to go with Corey on this one and "blame" IE11 and Windows 10 !
Title: Re: Black screens and application slow down
Post by: Corey Cooper on November 07, 2017, 12:24:13 PM
Corey, It seems that the tournament size affects this ... is that correct? I run small tournaments with 14-15 players max. and cannot use version 3.4 without getting the black screens but do not have any problems with 3.3.

This is on windows 10 and IE 11.

It's certainly possible.  Different actions can cause memory problems.  If I buy-in 100 players all at once (just opening the Add Players dialog once), start the tournament and just let it run (not busting players out), it would run for hours and hours with no appreciable memory increase.  Because most actions tend to involve opening dialog windows, I focused on that.  Once you start opening dialogs (even opening and closing the Settings window), memory tends to increase.

Of course, your mileage may vary.  I do not know what is causing the memory increase, other than to say it happens with IE11 and doesn't seem to happen with IE10.  And people tend to operate the application differently.  The way you operate it could be using code paths that tend to cause IE 11 to accumulate memory.
Title: Re: Black screens and application slow down
Post by: thlayli on November 07, 2017, 03:05:02 PM
I started looking at ways to force mshta.exe to emulate IE 10, rather than IE 11. And came across these: https://msdn.microsoft.com/en-us/library/ee330730(VS.85).aspx
https://deploywindows.info/2010/08/20/force-ie8-mode-in-hta/

I have set my registry for both 32bit and 64bit IE versions, and will be testing later to see if I still have the memory leaks.

Title: Re: Black screens and application slow down
Post by: officeghana on November 09, 2017, 12:39:11 PM
Corey,

So I've gone ahead and change the settings as per your "short term" solution.  I've simulated tournaments for the last 2 days with a pool of 30 players (each time for 4 to 6 hours).  I've only gotten the black screen once.

I'll be hosting a tournament this Sunday.  I'll give you feedback once that is done.
Title: Re: Black screens and application slow down
Post by: officeghana on November 17, 2017, 08:20:53 AM
Apologies for the delay in replying. Black screen popped up the moment we had to bust out a player.  This was about 50 mins into the tournament. My solution was to just wait til the next break, then I restarted the PC and resumed from where it left off.  Tournament ran for 5 hours and black screen didnt pop up again.

I know this isnt the best solution but as Corey mentioned, it is only a short term solution.
Title: Re: Black screens and application slow down
Post by: mm48 on November 17, 2017, 10:43:20 AM
What do you mean by "short term" solution ?
Thank's
Title: Re: Black screens and application slow down
Post by: Corey Cooper on November 17, 2017, 04:20:18 PM
I think officeghana is referring to the steps you can take that I outlined in the main topic, as opposed to the long term solution that I'm working on:

Quote
Well, for the long term I'm moving the applicaton to a modern framework.  I'm currently investigating Electron.  The model is very different, so it's going to be a lot of work, but I see this as really the only viable way forward for the TD application.
Title: Re: Black screens and application slow down
Post by: tandemrx on November 26, 2017, 10:01:54 PM
Corey,

I am getting the black screen with IE 11 on Windows 8.1 FWIW,

Seems like it happens when I open and close the control window often (going back and forth with layout changes). 

Is it hard to go back to IE 10?  Any way  to force TD to use Chrome browser (and would that help or hinder?)
Title: Re: Black screens and application slow down
Post by: Corey Cooper on November 27, 2017, 12:22:09 PM
Quote
Is it hard to go back to IE 10?  Any way  to force TD to use Chrome browser (and would that help or hinder?)

Should be easy to roll back to IE10.  I don't have any Windows 8 PCs readily available to test at the moment, however.  But you should be able to simply uninstall IE11 from the Control Panel (Add / Remove programs) to get back to IE10.

No way to use any browser other than the IE that's already installed on your PC.  I'm working towards porting the application to Chromium (the framework on which the Chrome browser is built).
Title: Re: Black screens and application slow down
Post by: tandemrx on November 28, 2017, 09:54:13 AM
So, based on windows support it seems IE 11 is default program web browser for Windows 8.1 and you can't unstill an upgrade since IE11 was native install (and when I look for upgrades to install using your steps above I find none).

Seems there is a way to emulate IE 10 following the steps below (I copied and pasted entire response to rolling back to IE10 on windows 8.1 machine - in red).  Do you think this will work??


You cannot go back to Internet Explorer 10 on Windows 8.1. Internet Explorer 11 is the default web browser for Windows 8.1. However you can use Internet Explorer developer tool and use Internet Explorer 10 on Internet Explorer 11 by following these steps:

 

1.       Open Internet Explorer 11

2.       Press F12 on the keyboard

3.       Click Emulation button or press Ctrl + 8.

4.       Under Mode change “User agent string” to Internet Explorer 10.

5.       You can use IE11 as IE10.

 

You can also add the site to Compatibility View. For more information refer this link:

http://windows.microsoft.com/en-in/internet-explorer/use-compatibility-view#ie=ie-11

 

Hope this helps. If you need further assistance with Windows, let us know and will be glad to help.

John Rubdy
Forum Moderator | Microsoft Community
Title: Re: Black screens and application slow down
Post by: Corey Cooper on November 28, 2017, 10:02:45 AM
Interesting, since most people upgrade to Windows 8.1 and previously had Windows 8, which had IE 10 initially.  Unfortunate, too.

No, "emulating" IE 10 is not the issue.  There's no feature(s) in 10 that we need (or in 11 for that matter).  It's the browser itself.  IE 11 causes the memory issue we are seeing, whereas IE 10 does not.
Title: Re: Black screens and application slow down
Post by: tandemrx on November 28, 2017, 10:12:51 AM
That is what threw me because I am pretty sure (not positive) that my laptop started with windows 8 and I upgraded to 8.1 so I did think that IE10 would be around.

But somewhat convinced since programs and features for uninstall upgrades has NO internet explorer items at all.

Ugh.
Title: Re: Black screens and application slow down
Post by: tandemrx on November 28, 2017, 04:30:08 PM
Corey,

I just tested a tournament with only 16 players and went about 2 rounds with about 5 bustouts and 3 rebuys and then got the black screens.

I used all your other fixes regarding auto-save.  Just not the enable backups when saving and not starting where I left off (I will try those and certainly see the benefit of the start where left off).

Would it make it worse/better to set the auto-save time frame at shorter interval?

Again will mention this is with Windows 8.1 and the IE11 that I seem to be stuck with.

makes me worried to use for a tourney.  Would hate to not bust out people and do that manually as then my prizes won't calculate for rebuys.   Hmmmmm.  Well, I have a couple weeks to continue testing. :-\

I will try the trick of saving tourney possibly between rounds and restarting the software.

Title: Re: Black screens and application slow down
Post by: Corey Cooper on November 29, 2017, 10:21:55 AM
Would it make it worse/better to set the auto-save time frame at shorter interval?

The auto-save interval is almost irrelevant, as long as you have the Auto-save after significant events preference enabled.  The only thing auto-saving per an interval gets you is the closer to the exact time on the clock if something goes wrong.

I just tested a tournament with only 16 players and went about 2 rounds with about 5 bustouts and 3 rebuys and then got the black screens.

In my testing, I didn't see any issues until busting out at least 50 players, or more (I can't recall off the top of my head).  I feel like it was closer to 100.  Of course, it's not just buying players in and busting players out.  Other actions affect memory as well.  So whatever you did before you started the tournament contribute as well.  Regardless, that seems like a very small number of actions to cause this issue.
Title: Re: Black screens and application slow down
Post by: danDTGB on January 08, 2018, 06:42:39 PM
So, we've been fighting with the black screen for a while. We typically run between 125-150 players every Monday.

We've been using 2 laptops to just keep the flow going well. One crashes we keep going on the other, etc.

We just had a new problem that I am trying to attach to this post. Hopefully all can see it.


Just wondering on if anyone has any luck getting around this problem?

Title: Re: Black screens and application slow down
Post by: Corey Cooper on January 09, 2018, 08:04:47 AM
Typical IE error message with no meaning.  Any idea when this is happening?  Maybe when it is auto-saving?
Title: Re: Black screens and application slow down
Post by: begodon on January 10, 2018, 11:19:02 AM
Hi Corey, i've been getting the Black Screens for a while now and it does not look that i have any pattern for the error to happen, it's not after x players or after x bust outs, it happens randomly, sometimes with just a few like, 12, 13 players, sometimes takes longer and goes well into 30 players or more. Then when it crashes, i close TD and open again during the tournament, what was suposed to clean the memory and fix it, but it lasts for just a few actions until it send me black screens again, like, 1h of clock running and 2 or 3 bust outs will be enought to give me black screens again.
When the memory starts to fill up, my layout also starts to randomly change the spacing between elements until eventually some of them goes missing from the screen, like the actual blind for example...

I Don't know what to do to fix it, since you've said that rolling back to 3.3 will not fix this, any suggestion?
Title: Re: Black screens and application slow down
Post by: Corey Cooper on January 10, 2018, 11:40:16 AM
You can certainly try to roll back to 3.3.  My testing of 3.3 and 3.4 shows their memory consumption to be almost identical.  But the fact remains that I get far, far more automated "out of memory" error reports from version 3.4 than version 3.3.  Anecdotally, users of the software report more "out of memory" type issues with 3.4 as well.  So I can't explain why, but 3.3 might work better for you.
Title: Re: Black screens and application slow down
Post by: Silver Owl on January 11, 2018, 08:59:01 AM
Rolling back to 3.3 worked for me. I've never had the black screen with 3.3.
Title: Re: Black screens and application slow down
Post by: danDTGB on January 15, 2018, 02:05:09 PM
I thought I had already responded on here. Evidently not.

As for when the error message comes up, not fully sure. It's the first time I've seen that particular one - which caused it to crash immediately after.

We typically operate split screen. The TV shows the tournament clock. We run the tournament via the table page and remove players from there. So, not sure if the issues are when it auto-saves.

Our tournaments typically range from 50-70 players for one game and 120-140 players for the other. We have definitely had more issues with the larger game than the smaller. Problems occur earlier and more often.

In fact, it's forced us to use 2 laptops to run the same event. In doing this, when one crashes we can keep the clock running on the other and try to get times coordinated.

I can say that we've been working with Corey via email for quite some time on the problem and he's been awesome helping us. Unfortunately, the program still has the problem. In fact, I hate to say it but it appears to be getting worse.

We've been using TD for a number of years. Overall pretty pleased. This is my only complaint and I hope a fix is coming soon.
Title: Re: Black screens and application slow down
Post by: Corey Cooper on January 15, 2018, 05:11:32 PM
I do believe this is a memory issue specifically with IE 11.  Googling "internet explorer 11 memory leak" gives a ton of other applications experiencing the issue.  I think the biggest problem stems from the fact that Microsoft appears to be "done" with IE, so there's unlikely to be a fix, and at the same time Microsoft is forcing everyone to use IE 11.  I'm definitely working on it.  I'm hoping to find a smoking gun - some change in the TD application that exposed the IE 11 memory leak, but I'm afraid it's going to end up being a lot of little things that have accumulated over time.

As an example of a smoking gun, memory usage increased quite a bit from version 3.1 to 3.2.  That makes it a good place to look for things in the application that changed.  I found a big one: I added jQuery in version 3.2 (I didn't actually use it yet but it's loaded with the rest of the code).  When I removed it in my test, the memory size decreased a lot.  Not all the way back to 3.1 levels, but nevertheless a serious improvement.  The problem is, since I wasn't using jQuery I removed it from the application in a later version.  Yet we're still here with a big memory issue.  So while it felt like a smoking gun, it turns out it's not.
Title: Re: Black screens and application slow down
Post by: jodybingo on January 20, 2018, 10:49:37 PM
Gonna add my two cents...
I have TD running on 2 computers (both W10). I do all the usual on one and on the other I am currently using it to display information on a tv screen for my players (upcoming events, entry cost etc). It is on this second machine where TD gets the black screen (and sometimes white). I get the out of memory message and the attached screen cap popped up tonight and oddly I couldn't even kill TD through the Task Manager (a reboot was needed). My first machine sometimes runs into a problem when I send receipts to my Epson. I have to shut down TD and my printer before they work properly again, but this is a minor issue as I rarely have this happen once the clock is running.

As a side note, my main machine that doesn't run into memory problems is a T7500 Xeon with 18GB of RAM. My other machine that crashes is an Intel Core2 with 4GB of RAM
Title: Re: Black screens and application slow down
Post by: Corey Cooper on February 08, 2018, 02:44:25 PM
One thing I'm working on now, and I can't believe I forgot to mention earlier, is the Points for Playing formula.  Since tournament state is recomputed constantly, the Points for Playing formula is evaluated again and again throughout the tournament, for every player.  Similar evaluations are happening for determining when to fire events and for which screens and cells and cell properties to display.  When I prevented the evaluation of formulas, memory use dropped dramatically.  So in version 3.4 I added some code to skip formula evaluation when your Points for Playing formula is empty.  It's a cheap attempt to workaround the problem, but it might help.

So I recommend, if you're using version 3.4 or later, clear out the Points for Playing formula before your next tournament.  You won't see points accumulated during the tournament, but you can always put the formula back after the tournament ends and points will instantly be computed for every player.  Hopefully this will help with the memory issue while your tournament is running.

In my testing this dramatically improved the memory size.  For example, with a 300 player tournament, the memory size got to 1GB by the time 120 players were busted out.  By the time 140 players busted out, it was over 1.5GB and usually the application crashed.  I was able to refactor the way formulas are evaluated.  After the change, the tournament was able to bust out all 300 players with the memory size reaching around 350MB.  The application remained completely responsive and didn't appear to slow at all.  Not perfect results but a really big improvement.  This will be in version 3.4.3.  I hope my results are not isolated and this helps everyone.  In the meantime, try removing your points formula as described above.
Title: Re: Black screens and application slow down
Post by: tandemrx on February 08, 2018, 03:50:53 PM
great find, Doesn't seem to help me.

I played a 10 person tourney last month and towards the end (only 1 rebuy), my system was clearly slowing down (such as responding to space bar presses to pause the clock, etc), but I didn't get black screens.  I pressed on towards the end as I was dealing and didn't want stop and close TD and restart it - though I should do this at a break I guess just to be safe.

The only thing in the points formula box is the default wording "The number of points a player receives . . . " that disappears when you click in the box.

I assume there is no other setting I need to turn off if I don't have a formula in their to begin with.
Title: Re: Black screens and application slow down
Post by: Corey Cooper on February 09, 2018, 01:42:28 PM
I honestly do not expect this to fix the issue for everyone, because of the varied experiences, and I seriously doubt this is the only place in the code that is exposing this memory leak in IE.  I just hope this helps some.  It could still help if you're already using an empty formula, potentially, since it effects all expression/formula evaluations, which as I mentioned is done for events and the layout.

What happens when IE runs out of memory almost seems random to me.  For example, the last 3 tests I ran where I continued until IE ran into trouble, I repeated the exact same test (it was automated) and got 3 different results.  First time I got a dialog window that said "Out of memory".  I couldn't do anything with the application, because every click made a "ding" from Windows like there was an open modal dialog over the application.  I had to kill it with the task manager.  Next time the application simply exited.  No warning, no errors, no nothing.  Just gone.  The third time, Windows showed an error message noting that the TD crashed and that Windows was going to restart it automatically (which it did).

Title: Re: Black screens and application slow down
Post by: tandemrx on February 09, 2018, 03:41:18 PM
So you are saying that as long as I am using 3.4 & no formula then I am good as far as this helps?

Nothing else I need to do in regards to 3.4 as long as I don't include a formula in the "points for playing" box in the game tab? (No preference or anything else I need to check or uncheck so that the points box is ignored?).
Title: Re: Black screens and application slow down
Post by: Corey Cooper on February 09, 2018, 10:02:26 PM
Correct.  That's all I know that will help at this time with version 3.4 or later (that and the steps outlined in the main post in this topic).  Version 3.4.3 will have a refactor of the evaluation code, which in my testing helps a lot, but your mileage may vary.