1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-01 22:50:35 +00:00
6502bench/SourceGen/WpfGui
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
..
AboutBox.xaml Bump a couple of copyright dates 2020-03-11 17:02:37 -07:00
AboutBox.xaml.cs Minor updates 2019-10-25 18:16:09 -07:00
CodeListItemStyle.xaml Fix proportions for animated GIFs 2019-12-25 10:28:40 -08:00
DataFileLoadIssue.xaml Minor fixes 2019-09-21 18:49:03 -07:00
DataFileLoadIssue.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
DiscardChanges.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
DiscardChanges.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
EditAddress.xaml Allow setting the start/end address for a block 2019-12-25 18:17:50 -08:00
EditAddress.xaml.cs Allow setting the start/end address for a block 2019-12-25 18:17:50 -08:00
EditAppSettings.xaml Data Bank Register management, part 3 2020-07-09 16:52:23 -07:00
EditAppSettings.xaml.cs Data Bank Register management, part 3 2020-07-09 16:52:23 -07:00
EditBitmapAnimation.xaml Fix proportions for animated GIFs 2019-12-25 10:28:40 -08:00
EditBitmapAnimation.xaml.cs Progress toward wireframe animations 2020-03-07 17:05:08 -08:00
EditComment.xaml Minor UI tweaks 2019-09-18 18:11:48 -07:00
EditComment.xaml.cs Add file slicer tool 2019-12-29 17:59:35 -08:00
EditDataBank.xaml Data Bank Register management, part 5 2020-07-10 13:29:36 -07:00
EditDataBank.xaml.cs Data Bank Register management, part 3 2020-07-09 16:52:23 -07:00
EditDataOperand.xaml Change PETSCII keyboard shortcut 2020-05-05 21:40:42 -07:00
EditDataOperand.xaml.cs Improve data operand editor 2020-02-18 13:57:35 -08:00
EditDefSymbol.xaml Set initial focus to appropriate field for project properties 2020-04-23 11:01:07 -07:00
EditDefSymbol.xaml.cs Set initial focus to appropriate field for project properties 2020-04-23 11:01:07 -07:00
EditInstructionOperand.xaml Change PETSCII keyboard shortcut 2020-05-05 21:40:42 -07:00
EditInstructionOperand.xaml.cs Add note about label-edit weirdness 2020-02-28 16:11:35 -08:00
EditLabel.xaml Label rework, part 7 (of 7) 2019-11-18 17:45:41 -08:00
EditLabel.xaml.cs Add file slicer tool 2019-12-29 17:59:35 -08:00
EditLocalVariableTable.xaml Allow explicit widths in project/platform symbols, part 2 2019-10-01 19:11:54 -07:00
EditLocalVariableTable.xaml.cs Label rework, part 2 2019-11-12 17:44:51 -08:00
EditLongComment.xaml Tweak line folding code 2019-11-01 19:47:56 -07:00
EditLongComment.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
EditLvTableLocation.xaml Add a "move table" button 2019-09-01 16:40:54 -07:00
EditLvTableLocation.xaml.cs More progress on visualization 2019-11-26 18:54:42 -08:00
EditNote.xaml Allow custom colors in Notes 2020-03-13 13:58:52 -07:00
EditNote.xaml.cs Allow custom colors in Notes 2020-03-13 13:58:52 -07:00
EditProjectProperties.xaml Data Bank Register management, part 4 2020-07-09 19:42:31 -07:00
EditProjectProperties.xaml.cs Data Bank Register management, part 4 2020-07-09 19:42:31 -07:00
EditStatusFlags.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
EditStatusFlags.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
EditVisualization.xaml Add Export feature to visualization editor 2020-06-20 17:32:57 -07:00
EditVisualization.xaml.cs Add Export feature to visualization editor 2020-06-20 17:32:57 -07:00
EditVisualizationSet.xaml Implement wireframe animation 2020-03-09 13:56:20 -07:00
EditVisualizationSet.xaml.cs Implement wireframe animation 2020-03-09 13:56:20 -07:00
Export.xaml Add visualization sets to exported HTML 2019-12-13 17:15:38 -08:00
Export.xaml.cs Tweak column widths for clipboard and Export default 2020-07-16 10:48:03 -07:00
ExportVisualization.xaml Add Export feature to visualization editor 2020-06-20 17:32:57 -07:00
ExportVisualization.xaml.cs Add Export feature to visualization editor 2020-06-20 17:32:57 -07:00
FindBox.xaml Add "find previous" 2019-10-09 17:47:07 -07:00
FindBox.xaml.cs Add "find previous" 2019-10-09 17:47:07 -07:00
FontPicker.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
FontPicker.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
FormatAddressTable.xaml Rename FormatSplitAddress to FormatAddressTable 2019-09-15 13:37:38 -07:00
FormatAddressTable.xaml.cs Default to source bank in Format Address Table 2020-07-16 13:26:13 -07:00
GotoBox.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
GotoBox.xaml.cs Fix crashing bug in Goto 2020-01-24 15:25:01 -08:00
MainWindow.xaml Reboot sandbox when required 2020-07-19 13:20:18 -07:00
MainWindow.xaml.cs Reboot sandbox when required 2020-07-19 13:20:18 -07:00
NewProject.xaml Remove "Atari Arcade Cabinet" system definition 2020-07-01 11:06:23 -07:00
NewProject.xaml.cs Fix startup issues 2019-07-20 17:36:12 -07:00
ProjectLoadIssues.xaml Fix visibility binding 2019-10-27 10:38:29 -07:00
ProjectLoadIssues.xaml.cs Open damaged projects in read-only mode 2019-10-26 13:20:54 -07:00
ShowWireframeAnimation.xaml Implement wireframe animation 2020-03-09 13:56:20 -07:00
ShowWireframeAnimation.xaml.cs Add Atari AVG visualizer 2020-04-11 17:24:21 -07:00