Author Topic: Weird Installation Problem  (Read 7096 times)

0 Members and 1 Guest are viewing this topic.

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11658
  • Thanked: 20379 times
Weird Installation Problem
« on: April 03, 2020, 12:52:44 PM »
I've encountered a very weird issue. In debug mode, Aurora takes about 10 seconds before the tactical map comes up and it runs. I've built an install program and installed Aurora on a laptop. However, it now takes about five minutes before the tactical map appears. Once running, it is fine. However, I have no idea why the change from debug to release mode changes that startup from 10 seconds to five minutes.

On the other hand, I'm new to creating C# install programs :)

Anyone seen anything similar before?
 

Offline Yonder

  • Registered
  • Lt. Commander
  • ********
  • Y
  • Posts: 278
Re: Weird Installation Problem
« Reply #1 on: April 03, 2020, 12:59:08 PM »
Do you see this when you run from your IDE in release mode as well? Or is it still around 10 seconds there?
« Last Edit: April 03, 2020, 01:06:08 PM by Yonder »
 

Offline Inglonias

  • Lieutenant
  • *******
  • I
  • Posts: 170
  • Thanked: 69 times
Re: Weird Installation Problem
« Reply #2 on: April 03, 2020, 01:04:39 PM »
At the risk of stating the obvious, does it behave the same way on a different computer?
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11658
  • Thanked: 20379 times
Re: Weird Installation Problem
« Reply #3 on: April 03, 2020, 01:05:24 PM »
Do you see this when you run from your IDE in release mode as well? Or is it still around 10 seconds there?

Running from IDE in Release mode takes about 10 seconds as well.
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11658
  • Thanked: 20379 times
Re: Weird Installation Problem
« Reply #4 on: April 03, 2020, 01:05:43 PM »
At the risk of stating the obvious, does it behave the same way on a different computer?

Yes, tried my PC and a laptop.
 

Offline Yonder

  • Registered
  • Lt. Commander
  • ********
  • Y
  • Posts: 278
Re: Weird Installation Problem
« Reply #5 on: April 03, 2020, 01:06:16 PM »
Five minutes is a really long time. It's long enough that my immediate suspicion isn't that any actual work is happening, but instead some sort of timeout is occurring. Given that you don't have any web code I think the most likely culprit would be some sort of database connection happening (or attempting to happen) on startup that it's waiting for.

I don't know what you ended up using for your DB handling, is it possible that Entity Framework or whatever else is initialized to have different behavior in debug or release mode? I'd look through your startup.cs or program.cs or whatever initialization with a really fine eye for any configuration differences based on the Environment.

I don't know what sort of logging you've implemented, unfortunately several standard solutions for that aren't fully initialized during early program initialization, but in cases like this you can hack in a temporary file writer to write out trace statements before the rest of your logging comes on line. It's not ideal but for this sort of thing I've done the same.
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11658
  • Thanked: 20379 times
Re: Weird Installation Problem
« Reply #6 on: April 03, 2020, 01:10:36 PM »
I've started adding popup messages during startup. The problem is happening once the DB starts to load.

Anyway, time for food and wine - will come back to it later :)
 

Offline Yonder

  • Registered
  • Lt. Commander
  • ********
  • Y
  • Posts: 278
Re: Weird Installation Problem
« Reply #7 on: April 03, 2020, 01:12:46 PM »
Ok, once you've pinned it down that far it's probably best to switch to SQL Server Profiling.

Given that at this point you shouldn't have a lot of activity if there is a request that hangs for a long time you'll hopefully be able to spot it without too much trouble. Hopefully.
 

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Weird Installation Problem
« Reply #8 on: April 03, 2020, 01:24:19 PM »
Dumb question, but it's always best to be bone-headed with this kind of thing: I take it this is happening before you've attempted obfuscation? So that's not likely to be part of the problem?
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11658
  • Thanked: 20379 times
Re: Weird Installation Problem
« Reply #9 on: April 03, 2020, 01:34:20 PM »
Dumb question, but it's always best to be bone-headed with this kind of thing: I take it this is happening before you've attempted obfuscation? So that's not likely to be part of the problem?

Yes, decided to take a break from testing Diplomacy and work on the install. I'll tackle obfuscation once I can successfully install and run, so I can identify any obfuscation-specific issues.
 

Offline Bughunter

  • Bug Moderators
  • Rear Admiral
  • ***
  • Posts: 929
  • Thanked: 132 times
  • Discord Username: Bughunter
Re: Weird Installation Problem
« Reply #10 on: April 03, 2020, 01:35:27 PM »
Any sort of anti-virus, real-time protection etc kicking in?

When running the game from your IDE you probably have the exe, db etc in your project folder under your user directory and maybe the process is also running under your IDE process.

After installing it you have it somewhere under C:Program.. and maybe it is also writing to there. That could possibly trigger some kind of lookup trying to compare your newly commissioned exe against various malware signatures from the cloud or whatever antiviruses do these days.
 

Offline Yonder

  • Registered
  • Lt. Commander
  • ********
  • Y
  • Posts: 278
Re: Weird Installation Problem
« Reply #11 on: April 03, 2020, 01:37:26 PM »
Oh, if you have forgotten to mark any resources to "publish when built" or whatever that setting is, then they could also not have come along to the new directory, which could cause a timeout when trying to locate them.
 

Offline Tikigod

  • Lieutenant
  • *******
  • Posts: 195
  • Thanked: 55 times
Re: Weird Installation Problem
« Reply #12 on: April 03, 2020, 01:42:28 PM »
I've started adding popup messages during startup. The problem is happening once the DB starts to load.

Anyway, time for food and wine - will come back to it later :)

Really random and "Out there" thought, but if it's potentially a DB related issue after the installation process, given debug and IDE release profile attempts are fine, what happens when you simply take the DB from a environment that works fine and cut it out into a release build that has gone through the installation process?

On the off chance that the installation process is smegging up the DB somehow in some bizarre obscure way, does the DB need to be bundled in to the process or can it be provided individually without having gone through the process?
The popular stereotype of the researcher is that of a skeptic and a pessimist.  Nothing could be further from the truth! Scientists must be optimists at heart, in order to block out the incessant chorus of those who say "It cannot be done. "

- Academician Prokhor Zakharov, University Commencement
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11658
  • Thanked: 20379 times
Re: Weird Installation Problem
« Reply #13 on: April 03, 2020, 01:46:30 PM »
The problems seem to be DB-related. The program is simply progressing very slowly through all the queries that load tables into object structures. I need to figure out why that is taking so much longer in release than debug. Its an SQLite database.

Anyway, it will probably have to wait until tomorrow now. Programming ability decreases at an exponential rate vs linear alcohol consumption :)
 
The following users thanked this post: unkfester

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11658
  • Thanked: 20379 times
Re: Weird Installation Problem
« Reply #14 on: April 03, 2020, 01:47:23 PM »
I've started adding popup messages during startup. The problem is happening once the DB starts to load.

Anyway, time for food and wine - will come back to it later :)

Really random and "Out there" thought, but if it's potentially a DB related issue after the installation process, given debug and IDE release profile attempts are fine, what happens when you simply take the DB from a environment that works fine and cut it out into a release build that has gone through the installation process?

On the off chance that the installation process is smegging up the DB somehow in some bizarre obscure way, does the DB need to be bundled in to the process or can it be provided individually without having gone through the process?

I'll try that tomorrow. As far as I can tell though, the install program is just placing the DB file in the installation directory.