PowerPointLabs / PowerPointLabs

This is the project for PowerPointLabs, a productivity add-in for PowerPoint
http://powerpointlabs.info
GNU General Public License v2.0
187 stars 103 forks source link

EffectsLab undo exception #1971

Open yuhongherald opened 5 years ago

yuhongherald commented 5 years ago

Bug Report

image

Environment

Windows 10, PowerPoint 2016, dev release v5.2.0.0

Steps to replicate

  1. Select 2 shapes
  2. Apply blur selected - 40%
  3. Undo
  4. Click the EffectsLab Ribbon. The error dialog appears on step 4.

Error details: System.Runtime.InteropServices.COMException Selection (unknown member) : Failed. Stack Trace: at Microsoft.Office.Interop.PowerPoint.Selection.get_ShapeRange() at PowerPointLabs.Utils.ShapeUtil.IsSelectionAllShapeWithArea(Selection selection) in C:\Users\Herald\Documents\PowerPointLabs\PowerPointLabs\PowerPointLabs\Utils\ShapeUtil.cs:line 345 at PowerPointLabs.ActionFramework.EffectsLab.AddSpotlightEnabledHandler.GetEnabled(String ribbonId) in C:\Users\Herald\Documents\PowerPointLabs\PowerPointLabs\PowerPointLabs\ActionFramework\EffectsLab\Spotlight\AddSpotlight\AddSpotlightEnabledHandler.cs:line 17 at PowerPointLabs.ActionFramework.Common.Interface.EnabledHandler.Get(String ribbonId) in C:\Users\Herald\Documents\PowerPointLabs\PowerPointLabs\PowerPointLabs\ActionFramework\Common\Interface\EnabledHandler.cs:line 14

yuhongherald commented 5 years ago

I also get this error when using placeholders. image

I think it might be a good idea to introduce a SafeGroup method that converts Placeholders into lookalikes before grouping

yuhongherald commented 5 years ago

This might be related to #1948

yuhongherald commented 5 years ago

This time I got an AccessViolationException on line 837 of ThisAddIn. Before step 3, make sure the 2 shapes are selected.

yuhongherald commented 5 years ago

The bug doesnt seem replicatable, it might have been fixed in dev-release 5.3