Author Topic: Black screens and application slow down  (Read 20948 times)

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Black screens and application slow down
« on: November 06, 2017, 05:25:45 PM »
Edit Feb 21, 2020: Version 3.7 has been released.  This should no longer be an issue.  Please upgrade if you haven't already!

https://www.thetournamentdirector.net/download.html


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 (it's IE 11 on any version of Windows).  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 ultimately 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.  (Progress can be followed here: http://www.thetournamentdirector.net/forums/index.php?topic=5447.0)

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:
  • Click on the "Start" button and type "Programs and Features" in the search box (or type "Programs and Features" in the search charm if you're running Windows 8 )
  • Click on the "View installed updates" in the left pane of the menu
  • Go over to the "Uninstall an update" screen and scroll down to the "Microsoft Windows" section
  • Select Internet Explorer 11 and click "Uninstall"
  • Restart your PC

tl;dr: This is a memory issue that is, I believe, exclusive to IE 11 (and possibly 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 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

Edit (07/13/2018): Anyone interested can follow version 3.5 progress here: http://www.thetournamentdirector.net/forums/index.php?topic=5447.0

Edit (10/14/2019): Version 3.7 BETA 1 has been released.  https://www.thetournamentdirector.net/forums/index.php?topic=5923.0
« Last Edit: February 21, 2020, 12:09:46 PM by Corey Cooper »

Silver Owl

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: Black screens and application slow down
« Reply #1 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.

RichieD

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Black screens and application slow down
« Reply #2 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 !

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Black screens and application slow down
« Reply #3 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.

thlayli

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Black screens and application slow down
« Reply #4 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.


officeghana

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Black screens and application slow down
« Reply #5 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.

officeghana

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Black screens and application slow down
« Reply #6 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.

mm48

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: Black screens and application slow down
« Reply #7 on: November 17, 2017, 10:43:20 AM »
What do you mean by "short term" solution ?
Thank's

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Black screens and application slow down
« Reply #8 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.

tandemrx

  • Sr. Member
  • ****
  • Posts: 347
    • View Profile
Re: Black screens and application slow down
« Reply #9 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?)

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Black screens and application slow down
« Reply #10 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).

tandemrx

  • Sr. Member
  • ****
  • Posts: 347
    • View Profile
Re: Black screens and application slow down
« Reply #11 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

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Black screens and application slow down
« Reply #12 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.

tandemrx

  • Sr. Member
  • ****
  • Posts: 347
    • View Profile
Re: Black screens and application slow down
« Reply #13 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.

tandemrx

  • Sr. Member
  • ****
  • Posts: 347
    • View Profile
Re: Black screens and application slow down
« Reply #14 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.