Grasshopper's "PluginLoading.txt"

I was searching and couldn’t find enough info about this, so a bit of context first.

When Grasshopper is loading, a file called PluginLoading.txt gets created in %appdata%\Grasshopper\ for every .gha file being loaded, when the plugin loads successfully this file is deleted. This can be seen in the image below.

The problem arises when this process is long and you have two instances (or more) loading at the same time! You start getting those errors about “Potential Plugin Crash Protection” or you get “Access to the path %appdata%\Grasshopper\PluginLoading.txt is denied”.

To reproduce just the error message simple create this file %appdata%\Grasshopper\PluginLoading.txt inside paste this C:\Program Files\Rhino 6\Plug-ins\Grasshopper\Components\CurveComponents.gha then Launch Rhino and Grasshopper.

@DavidRutten is there a fix or a workaround for this? Can I opt-out of this protection? = )

It’s not optional. But you can delete the file with a program as soon as it’s created. It won’t be hard to make it optional.

I tried doing that the following way, but not really working.

$nl = [Environment]::NewLine
$action = {
Remove-Item $Event.SourceEventArgs.FullPath -Force
$Object  = "$nl{0} was deleted at {1}" -f $Event.SourceEventArgs.FullPath, $Event.TimeGenerated
Write-Host -Object $object
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path  = "$env:APPDATA\Grasshopper"
$watcher.Filter  = "PluginLoading.txt"
Register-ObjectEvent -InputObject $watcher  -EventName Created  -Action $action
Register-ObjectEvent -InputObject $watcher  -EventName Changed  -Action $action

@DavidRutten So as a work around I disable write access to the folder before launching the instances, that works pretty well for Rhino 7, but fails miserably for Rhino 6 as nothing ends up loading, only params, display components and few others but nothing else.