startnine/start9

Pressing Start on the Taskbar causes a Crash

dominichayesferen opened this issue · 15 comments

Version: Just pulled it off of this Repo

Pretty much self-explanatory, clicked Start on New Taskbar = Crash

oh 🅱️rap

Hmmm works for me. I'll implement some sort of a crash logging soon:tm: so we can look into exactly what is causing this

UPDATE 2: It does it on Normal Windows 7 Boot:
InstalledTransientModules[0].HandleCommand(command);
............................................ ^ System.ArgumentOutOfRangeException

"Index was out of range. Must be non-negative and less than the size of collection."
File: IModule.cs

Hmmm... do you have both of the modules installed in %appdata%\Start9\Modules?

Oh... that might be the issue. 🤦‍♂️

Erm, is that Start9/Modules/*, or module files in the Modules folder?

...with them as Modules/TestFixedModule and Modules/TestTransientModule, it still throws the exception

image
So you have these files?

TestFixed: Yes
TestTransient: No

Ahh that's the problem. The start menu is TestTransient

Can I have a copy of TestTransient over Discord DMs? It isn't in DLL and PDB file form here

Fixed over TeamViewer (so others would have to ask Reflectron about how he fixed my one)...

Alright, we looked into the issue and it seems like it's a simple fix:

Firstly, feren did not have the TestTransientModule [this is the Start Menu]. Thus the InstalledTransientModules collection was empty and ArgumentOutOfRangeException was raised.

This fixed that issue - however, another issue cropped up. Code Access Security (CAS) policy does not trust assemblies downloaded from the internet, and when they are loaded NotSupportedException is thrown. To remedy this, an app.exe.config file must be included with the following contents:

<configuration>  
   <runtime>  
      <loadFromRemoteSources enabled="true"/>  
   </runtime>  
</configuration>

This allows assemblies from remote sources (downloaded from the net, etc.) to be loaded. I will update the build settings for the Start9 project to include an app.exe.config enabling loadFromRemoteSources in a future commit.