vbousquet/flexdmd

ArgumentOutOfRangeException for a specific table when loading a VPX image via NewImage

Lovinity opened this issue · 2 comments

I am working on an original VPX table, and no matter what I try, FlexDMD.NewImage throws the following when trying to load an image in VPX (that does, in fact, exist):

[1] 2023/06/27 23:30:36.404 ERROR | Exception while resolving image: 'VPX.d_border' System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at OpenMcdf.StreamView.Read(Byte[] buffer, Int32 offset, Int32 count)
at FlexDMD.VPXFile.VPXReader.ReadUInt32()
at FlexDMD.VPXFile.ReadImage(CFStream stream, Boolean nameOnly)
at FlexDMD.VPXFile.<.ctor>g__visitor|3_0(CFItem item)
at OpenMcdf.CFStorage.<>c__DisplayClass13_0.b__0(IRBNode targetNode)
at RedBlackTree.RBTree.DoVisitTreeNodes(Action1 action, IRBNode walker) at RedBlackTree.RBTree.DoVisitTreeNodes(Action1 action, IRBNode walker)
at RedBlackTree.RBTree.DoVisitTreeNodes(Action1 action, IRBNode walker) at RedBlackTree.RBTree.DoVisitTreeNodes(Action1 action, IRBNode walker)
at RedBlackTree.RBTree.DoVisitTreeNodes(Action1 action, IRBNode walker) at RedBlackTree.RBTree.DoVisitTreeNodes(Action1 action, IRBNode walker)
at OpenMcdf.CFStorage.VisitEntries(Action`1 action, Boolean recursive)
at FlexDMD.AssetManager.FileExists(String path, String siblingPath)
at FlexDMD.FlexDMD.ResolveImage(String filename)

I've tried all of the following to get it to work, to no success:
re-importing the images, renaming them, using standalone Subs / Dims (as originally from JP DMD) instead of within a Class like I'm doing now, using images from a working FlexDMD table as a test [The Matrix] (Flex loads them in the Matrix fine, but again failed to load them in the table on which I'm working), restarting VPX, using VPX 10.7.3, setting FlexDMD.NewImage to a separate variable before adding it to the actor, literally deleting all of the images in the manager and then importing them again, deleting all but one image and trying to load just that one image, moving the VPX table file to ensure it is in the same Tables folder as the VPX folder (when testing across VPX versions).

I have given up trying to figure this out. I'm obviously stupid and doing something wrong because this is the only table I have this issue. But I'm too stupid to figure out what it is I'm doing wrong.

VPX version: 10.7.4-beta (also tested with 10.7.3 and 10.8-beta)
FlexDMD Version: 1.8 I think? (whatever came with Baller Installer)

Side note, this is not related to #28 . All images are PNGs.

The issue was an unrelated corrupt BMP in the image editor (which was not used by FlexDMD but broke it anyhow) which did not seem to get caught in all the tests I tried to do; someone else found it. Removing the BMP fixed the issue.