1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-14 05:28:55 +00:00
6502bench/SourceGen
Andy McFadden 195c93a94a Reboot sandbox when required
Another chapter in the never-ending AppDomain security saga.

If a computer goes to sleep while SourceGen is running with a project
open, life gets confusing when the system wakes up.  The keep-alive
timer fires and a ping is sent to the remote AppDomain, successfully.
At the same time, the lease expires on the remote side, and the objects
are discarded (apparently without bothering to query the ILease object).
This failure mode is 100% repeatable.

Since we can't prevent sandbox objects from disappearing, we have to
detect and recover from the problem.  Fortunately we don't keep any
necessary state on the plugin side, so we can just tear the whole
thing down and recreate it.

The various methods in ScriptManager now do a "health check" before
making calls into the plugin AppDomain.  If the ping attempt fails,
the AppDomain is "rebooted" by destroying it and creating a new one,
reloading all plugins that were in there before.  The plugin binaries
*should* still be in the PluginDllCache directory since the ping failure
was due to objects being discarded, not AppDomain shutdown, and Windows
doesn't let you mess with files that hold executable code.

A new "reboot security sandbox" option has been added to the DEBUG
menu to facilitate testing.

The PluginManager's Ping() method gets called more often, but not to
the extent that performance will be affected.

This change also adds a finalizer to DisasmProject, since we're relying
on it to shut down the ScriptManager, and it's relying on callers to
invoke its cleanup function.  The finalizer throws an assertion if the
cleanup function doesn't get called.

(Issue #82)
2020-07-19 13:20:18 -07:00
..
AsmGen Data Bank Register management, part 3 2020-07-09 16:52:23 -07:00
Examples Update A2-HP-CDA example 2020-07-10 21:22:18 -07:00
Properties Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
Res SGEC update, part 1 2020-07-15 16:18:02 -07:00
RuntimeData Reboot sandbox when required 2020-07-19 13:20:18 -07:00
Sandbox Reboot sandbox when required 2020-07-19 13:20:18 -07:00
SGTestData Update relocation data handling 2020-07-10 17:41:38 -07:00
Tests Add Navigate > Jump to Operand 2020-06-07 16:37:41 -07:00
Tools Add 20212-reloc-data test 2020-07-05 17:17:44 -07:00
WpfGui Reboot sandbox when required 2020-07-19 13:20:18 -07:00
Anattrib.cs Add Data Bank Register management, part 1 2020-07-08 17:56:27 -07:00
App.config Fix startup issues 2019-07-20 17:36:12 -07:00
App.xaml Improve visualization 2019-12-04 15:59:37 -08:00
App.xaml.cs Version 1.7.0-dev2 2020-07-11 17:09:37 -07:00
AppSettings.cs Improve CPU instruction chart 2020-02-18 13:25:20 -08:00
AutoLabel.cs Label rework, part 1 2019-11-08 21:02:15 -08:00
ChangeSet.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
CodeAnalysis.cs Update relocation data handling 2020-07-10 17:41:38 -07:00
DataAnalysis.cs Update relocation data handling 2020-07-10 17:41:38 -07:00
DefSymbol.cs Prefer narrower project/platform symbols 2020-01-23 10:49:22 -08:00
DisasmProject.cs Reboot sandbox when required 2020-07-19 13:20:18 -07:00
DisplayList.cs Various minor changes 2020-03-30 16:50:52 -07:00
DisplayListSelection.cs Add C64 encodings to instruction and data operand editors 2019-08-15 17:53:12 -07:00
Exporter.cs Data Bank Register management, part 3 2020-07-09 16:52:23 -07:00
ExternalFile.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
FormatDescriptor.cs Fix junk alignment check 2019-10-23 13:25:50 -07:00
FormattedOperandCache.cs Add a string operand cache 2019-08-17 17:03:06 -07:00
HelpAccess.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
LineListGen.cs Data Bank Register management, part 4 2020-07-09 19:42:31 -07:00
LocalVariableLookup.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
LocalVariableTable.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
MainController.cs Reboot sandbox when required 2020-07-19 13:20:18 -07:00
MessageList.cs Check for hidden visualizations 2019-12-25 11:15:22 -08:00
MultiLineComment.cs Tweak line folding code 2019-11-01 19:47:56 -07:00
NavStack.cs Tweak navigation 2019-10-10 11:57:36 -07:00
PlatformSymbols.cs Update comments, remove unused var 2019-10-27 21:29:44 -07:00
ProjectFile.cs SGEC update, part 2 (of 2) 2020-07-15 17:43:08 -07:00
ProjectProperties.cs Data Bank Register management, part 4 2020-07-09 19:42:31 -07:00
PseudoOp.cs Data Bank Register management, part 3 2020-07-09 16:52:23 -07:00
RuntimeDataAccess.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
Sgec.cs SGEC tweaks 2020-07-16 10:14:28 -07:00
SourceGen.csproj SGEC update, part 1 2020-07-15 16:18:02 -07:00
Symbol.cs Fix symbol entry bug in operand editors 2019-12-26 11:04:37 -08:00
SymbolTable.cs Prefer narrower project/platform symbols 2020-01-23 10:49:22 -08:00
SystemDefaults.cs Optionally treat BRKs as two-byte instructions 2019-10-09 14:55:56 -07:00
SystemDefs.cs Progress toward OMF file handling 2020-06-30 08:20:12 -07:00
UndoableChange.cs Add Data Bank Register management, part 1 2020-07-08 17:56:27 -07:00
VisBitmapAnimation.cs Progress toward wireframe animations 2020-03-08 17:05:08 -07:00
Visualization.cs Add Export feature to visualization editor 2020-06-20 17:32:57 -07:00
VisualizationSet.cs Add a progress bar to HTML export 2020-03-15 14:07:05 -07:00
VisWireframeAnimation.cs Add Atari AVG visualizer 2020-04-11 17:24:21 -07:00
WeakSymbolRef.cs Add local variable uniquification 2019-08-31 14:19:50 -07:00
WireframeObject.cs Consolidate wireframe data validation 2020-04-23 11:25:45 -07:00
XrefSet.cs Show "idx" for indexed accesses in References window 2020-05-02 14:09:53 -07:00