Unhandled expection after installing NightVisionAddin

Bug #2047274 reported by grofaty
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Committed
Undecided
Unassigned

Bug Description

I have installed latest Pinta 2.2-dev from master repository https://github.com/PintaProject/Pinta/actions/runs/7304075740/artifacts/1131944714 on Ubuntu 23.10.

1. On top rigth. Click on "humburger" menu.
2. Add-ins | Add-ins Manager
3. On left panel select "Night Vision Effect" and install it.
4. Close down Pinta and reopen. Error message appears with detailed message:

System.TypeLoadException: Method 'get_IsTileable' in type 'NightVisionAddin.NightVisionEffect' from assembly 'NightVisionAddin, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at NightVisionAddin.NightVisionExtension.Initialize()
   at Pinta.MainWindow.OnExtensionChanged(Object s, ExtensionNodeEventArgs args)
   at Mono.Addins.ExtensionNode.add_ExtensionNodeChanged(ExtensionNodeEventHandler value) in /Users/runner/work/1/s/Mono.Addins/Mono.Addins/ExtensionNode.cs:line 228
   at Mono.Addins.ExtensionContext.AddExtensionNodeHandler(String path, ExtensionNodeEventHandler handler) in /Users/runner/work/1/s/Mono.Addins/Mono.Addins/ExtensionContext.cs:line 739
   at Mono.Addins.ExtensionContext.AddExtensionNodeHandler(Type instanceType, ExtensionNodeEventHandler handler) in /Users/runner/work/1/s/Mono.Addins/Mono.Addins/ExtensionContext.cs:line 784
   at Mono.Addins.AddinManager.AddExtensionNodeHandler(Type instanceType, ExtensionNodeEventHandler handler) in /Users/runner/work/1/s/Mono.Addins/Mono.Addins/AddinManager.cs:line 778
   at Pinta.MainWindow.Activate()
   at Pinta.MainClass.<>c__DisplayClass1_0.<OpenMainWindow>b__0(Application _, EventArgs _)
   at GObject.Signal`1.<>c__DisplayClass11_0.<Connect>b__0(Value returnValue, Value[] parameters)
   at GObject.Closure.InternalCallback(IntPtr closure, IntPtr returnValuePtr, UInt32 nParamValues, ValueData[] paramValuesData, IntPtr invocationHint, IntPtr userData)

5. Clicking on OK button and on new image icon and the error appears with unhandled expection. It looks like Pinta gets into "corrupted" unusable state.
6. To get Pinta of of unusable state I have uninstalled NigthVision plug-in and restarted Pinta.

Conclusions:
a) It looks like Night Vision Effect is not adjusted to Pinta 2.2 version.
b) Pinta 2.2 should somehow recognize this add-in is not compatible with current version and not allow to install it in the first place. Do we have some version compatibility info at each of add-ins to check?

Revision history for this message
Cameron White (cameronwhite91) wrote :

Yeah, it looks like it would be good to add some better error handling to avoid having the unhandled exception put Pinta into a bad state

In this particular case, the issue is that the Night Vision effect (and other add-ins) were updated earlier in the Pinta 2.2 development cycle when I was restoring support for add-ins, but there have been changes since that cause incompatibility. I'll upload new builds of the addins once the translations are updated
Add-ins can specify a dependency on a specific version of Pinta (in this case, the Night Vision Effect's latest version requires Pinta 2.2), but development builds can have problems. The release checklist requires updating all the addins for the latest release so this shouldn't be an issue for normal users though

Changed in pinta:
milestone: none → 2.2
status: New → Triaged
Revision history for this message
Cameron White (cameronwhite91) wrote :

I've improved the error handling in https://github.com/PintaProject/Pinta/commit/21bf7ef06107468584a09d306da7f39cb64512bd and also updated the night vision add-in. The Block Brush and Demo extensions will get updated after the translation fixes from #992420 are applied for those projects

Changed in pinta:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.