Very recently with 3.5.1 and a snapshot version, I’ve been getting this error message:
Bad Data in Module: Image not found (No Image)
It’s maddening because it does not identify which image it is! I finally found out how to cause it. It requires a few edits. Do this:
- Edit a module. In an at-start stack, create a piece. In the “Basic Piece” trait, insert an image.
- At this point I save and exit. I don’t know if it’s required.
- Edit the module. Edit the piece, and remove the image from “Basic Piece,” setting it to null. (Usually I may do this if I decide to move the image to a layer trait.) Save and exit.
- Run the module. The error appears.
I think Vassal now complains if I give a piece an image and then take it away. It’s like a dog with a bone.
I put a small vmod in my dropbox to demo. https://www.dropbox.com/s/ropjiee3d0ila8a/buggy.vmod?dl=0
I’ve also included in it another bug that dates back to Vassal’s Mesozoic Age. It’s a magic trick! If you edit the module, you will see that Main Map has a deck of cards in its viewable area. Exit. Now run the module, and look at the main page. No deck! Where did it go? You can applaud my trick now. If you edit it again, the deck still there, smiling back at you.
Okay, okay, so how do I make it visible? Edit the module. Notice the deck has its board set to “any.” Change it to “board.” Save. Exit. Run. And there is the deck! You can now edit it again and set it back to “any” if you like. Doesn’t matter. It will still appear when you run it. All’s right in the world.
And how did I do it? There are two ways. Both happen if Vassal sets the board name to “any” itself, not me. First way. Change Main Map’s board name to anything but “board.” Second way. There’s a second map in the mod whose board name is not “board.” Cut and paste the deck to that second map. In both cases, Vassal will change on its own the deck’s board name to “any.” But it’s not just any “any.” It’s an “any” in the 4th dimension. I went mad trying to solve this one.
Oops. My first reply was to a different question. I don’t know when this last worked. I don’t save old versions, so it would be difficult for me to test. I do know in the recent past that I’ve moved an image from the basic piece to a layer and NOT seen a problem, so it must be pretty recent, but that’s the best I can say.
You don’t need to save old versions for that. They’re all available on GitHub back to 3.2.17: github.com/vassalengine/vassal/releases
Try 3.5.2-SNAPSHOT-5b35dd994: vassalengine.org/~uckelman/tmp/
Does that fix the problem for you?
No. Not in 3.5.2 either. I get the message when I first open a specific secondary map window for the first time, and then I never see it again. It does not seem to harm anything.
To be honest, at this point I’m not sure what exactly is causing it. Earlier the error was in a different window, and it seemed to be related to removing an image from a basic name trait. However, it may be elsewhere too. To find it, I’ll need to check every piece in that window, so it may take some time. I’m trying to finish a module, so I’d need to take a timeout to investigate.
Try this as a workaround:
Extract your buildfile.xml from the module, edit it and locate the text ‘(No Image)’. See which counter it is connected to. Edit the module, edit the counter, change the image, then clear it again.
To be clear, the change in 5b35dd994 is to prevent the problem from occurring, not to fix a module where the problem has already occurred.
Brent, that is a great idea, and I’ll try it in a little while when I go back to work. Joel, that occurred to me about an hour after I quit for the night. I did create a new test case where I removed an image from a piece, and I didn’t get the error. (Good job!) I still have the error in another window, and if I find the culprit, I may end up fixing that one too. I will check on it when I start to work again. Thanks both of you.
Okay, I fixed the problem. Brent, your suggestion of looking in the build file isolated it. There were two similar pieces that had no images for the basic name trait. To fix it I either had to provide an image, which I did, or create a new identical piece where I don’t touch the empty basic name image.
One thing that might prove useful in the future: This error message provides no helpful information. It would be more useful if it contained something about its context, e.g. where it is in the module.
Unfortunately, the error message is being generated deep, deep, down inside the image processing core of Vassal and the only context information available is the image name.