Rank: Member
Groups: Approved
Joined: 9/25/2019(UTC) Posts: 10 Thanks: 1 times
|
Hi Rob, Not sure when this started for me, but when I click on Global Action --> Load/Unload Scripts or the Mouse Events I get an Object Ref not set error. I don't see anyone else saying anything about it, so it must be something on my pc. Any ideas?
Mouse Events partial error message:
************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at StrokesPlus.net.Controls.ActionStepsScript.LoadSteps() at StrokesPlus.net.Controls.ActionStepsScript.LoadStepsScript(BaseAction action) at StrokesPlus.net.Forms.frmMain.AssignScriptControl(Control target, BaseAction baseAction) at StrokesPlus.net.Controls.tabGlobalActions.tabMouseEventScripts_SelectedIndexChanged(Object sender, EventArgs e) at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e) at System.Windows.Forms.TabControl.WmSelChange() at System.Windows.Forms.TabControl.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Load/Unload Scripts full error message:
************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at StrokesPlus.net.Controls.ActionStepsScript.LoadSteps() at StrokesPlus.net.Controls.ActionStepsScript.LoadStepsScript(BaseAction action) at StrokesPlus.net.Forms.frmMain.AssignScriptControl(Control target, BaseAction baseAction) at StrokesPlus.net.Controls.tabGlobalActions.tabLoadUnload_SelectedIndexChanged(Object sender, EventArgs e) at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e) at System.Windows.Forms.TabControl.WmSelChange() at System.Windows.Forms.TabControl.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.3928.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
StrokesPlus.net Assembly Version: 0.3.4.5 Win32 Version: 0.3.4.5 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/StrokesPlus.net.exe
System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.3928.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
ManagedWinapi Assembly Version: 0.3.0.0 Win32 Version: 0.3 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/ManagedWinapi.DLL
System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.3928.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
WindowsInput Assembly Version: 1.0.4.0 Win32 Version: 1.0.4.0 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/WindowsInput.DLL
ClearScript Assembly Version: 5.5.5.0 Win32 Version: 5.5.5.0 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/ClearScript.DLL
System.Security Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
System.Windows Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Windows.dll
System.Net Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.dll
System.Net.Http Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
System.Speech Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Speech/v4.0_4.0.0.0__31bf3856ad364e35/System.Speech.dll
ClearScriptV8-64 Assembly Version: 5.5.5.0 Win32 Version: 5.5.5.0 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/ClearScriptV8-64.DLL
Microsoft.CSharp Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
TestPlugIn Assembly Version: 1.0.0.0 Win32 Version: 0.3.4.5 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/StrokesPlus.net.exe
System.Dynamic Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
Anonymously Hosted DynamicMethods Assembly Assembly Version: 0.0.0.0 Win32 Version: 4.8.3928.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
TestPlugIn Assembly Version: 1.0.0.0 Win32 Version: 0.3.4.5 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/StrokesPlus.net.exe
Common Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/Common.DLL
ScintillaNET Assembly Version: 3.6.3.0 Win32 Version: 3.6.3.0 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/ScintillaNET.DLL
ScintillaNET FindReplaceDialog Assembly Version: 1.4.0.31177 Win32 Version: 1.4.0 CodeBase: file:///C:/Program%20Files/StrokesPlus.net/ScintillaNET%20FindReplaceDialog.DLL
************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
<configuration> <system.windows.forms jitDebugging="true" /> </configuration>
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Send me your config file, just so I can take a look at the properties to see what's going on, rob@strokesplus.netUltimately something is wrong in those properties. Did you do any settings imports? Play around with modifying sp_config via scripts? When did you notice this started happening?
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Quote:Not sure when this started for me Heh, disregard my last question. My best guess is that you loaded/imported/copied a config file from prior to some changes to the BaseAction class I made a while back. It's supposed to pre-initialize any newer properties to avoid null refs like this, but I'm guessing that didn't happen which is why I want to see the state of those objects in your config and update my code accordingly. Or perhaps the objects themselves are missing from your config, which would be far more concerning/confusing.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Very odd...that whole block of objects are just null. I thought it might be the steps which were messed up based on the call stack (steps are not an implemented feature...yet). Put this into an action then close the Settings window and execute that gesture/action. This will create the missing objects. Code:sp_config.OnLoadAction = new BaseAction();
sp_config.OnCloseAction = new BaseAction();
sp_config.LeftClickAction = new BaseAction();
sp_config.MiddleClickAction = new BaseAction();
sp_config.RightClickAction = new BaseAction();
sp_config.X1ClickAction = new BaseAction();
sp_config.X2ClickAction = new BaseAction();
sp_config.VerticalWheelTickAction = new BaseAction();
sp_config.HorizontalWheelTickAction = new BaseAction();
sp_config.StrokeReleaseAction = new BaseAction();
sp_config.Save();
sp.Reload();
I'm really not sure how this could've happened. Did you import settings from an export? I will continue researching how this could happen, but any insight at all you can think of would be helpful.
|
|
|
|
Rank: Member
Groups: Approved
Joined: 9/25/2019(UTC) Posts: 10 Thanks: 1 times
|
That fixed it. I can't remember exactly what I did - but I certainly did an export and an import at some point. I will keep an eye on it because I routinely do exports to share my changes with my colleagues. Edited by user Wednesday, October 2, 2019 2:34:21 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Okay thanks, that's about the only case where I could see it happening.
Also, in the next release I'm adding checks in the InitializeNewerSettings code to create the BaseActions for those if they're null, so that should prevent it from happening again.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Yep, that's it. If you import from an export where you didn't select all nodes...and didn't select any of those above options during the export, they end up null. I'll also be fixing that and reviewing the objects during import overall to ensure no other ones are being missed. This would result in effectively wiping out any scripts you had in those nodes, replacing them with null...even the fix code just makes it functional again, but data would still be lost. EDIT: Actually no it shouldn't do that...will continue research and testing... Edited by user Wednesday, October 2, 2019 3:53:17 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Found it, fixed in 0.3.4.6.
It was a copy/paste/inversion of logic failure. The issue affected you as the exporter when you didn't check to export Options but did check the affected items (from earlier) to export. It was setting your values to null instead of setting the export's corresponding values to your settings...oops :/
I don't think many people use that and it's tedious to test the variety of scenarios, so it slipped by for quite a long time as I haven't touched that code in like 2 years!
I also found that right click wouldn't export either, again due to copy/paste of left action code..
Anyway, keep an eye on things now and let me know if you run into issues, either with exporting/importing or anything else.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close