Reporting of Missing Images

I have a couple of issues with the current reporting of missing images in modules.

Currently, in Player mode, a missing image is reported as in the Chat window as:

Bad data found in module or saved game: offboard_boxes-t.png

This is meaningless. Surely something like

Missing Image: offboard_boxes-t.png

is better. Also, a full FileNotFoundException is dumped to the Errorlog which is pointless and clutters up the errorLog, it is already writing a an ‘Image not found: imagename’ message which is sufficient.

In Editor mode, if you start a game that has missing images, you get one Dialog that must be dismissed for each missing image. This is just plain painful, given that if you have to use an old save game that references missing images, you can’t easily ‘fix’ this problem. I would much prefer to see this handled the same as Player mode with just a message in the Chat Window.

Also, why are we still getting Missing Image Bug reports when they should all be reported to the user only either in the Chat Window, or as a Dialog?

B.

Thus spake “Brent Easton”:

Agreed.

Agreed.

I have a solution in mind for all of these, which I’m going to try out in
the next few days.

There is one particular code path where they escape through to an error
dialog. I was looking at this last night. It’s on my list.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

What would be even better is if we could somehow identify which component is referencing the missing image.

Was that this one:

java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.io.FileNotFoundException: ‘images/std-baku-overlay.png’ not found in J:\Vassal\Modules\RsR\RsR_v37.vmod
at VASSAL.tools.opcache.OpCache.getFuture(OpCache.java:311)


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Yes. That might be doable…

Yes.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

On Oct 21, 2008, at 5:39 AM, Brent Easton wrote:

Alternately, if the missing items could just be collected when opening
in the Editor, they could be presented in a single dialog that reports
the problems opening the file. That would serve as notice of
problems, but not involve the painful plethora of pop-up boxes.

Having a List somewhere to collect these would be one way
of providing the information.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake Thomas Russ:

If only we could have components report what images they use, then we
could discover all of these in one go, when the module is loaded. As
it is, we don’t know whether images are missing until we attempt to
load them…


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

On Oct 21, 2008, at 10:17 AM, Joel Uckelman wrote:

Oh. So this happens then during play, instead of just when the module
is loaded?

If it happens during the loading process, it should be possible to
collect them instead of raising the dialog each time, right? In place
of the dialog call, they are just added to a global or passed parameter.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake Thomas Russ:

Yeah.

I am completely with you here. This is exactly what I would like to do,
but it isn’t logically possible to determine what images are missing
if you can’t ask build nodes to report what images the subtrees they root
are using, and be sure that the report you get is exhaustive.

Unfortunately, the only way we can get this information is to add methods
to the Buildable interface, which would probably break every single module
which uses custom code. I do see a solution to this problem on the horizion:
Once we have the new site up and the modules better organized, we’ll have an
almost complete listing of what modules use custom code, and then in the
worst case I’m willing to go fix them all myself, if that’s what it takes
to get Rodney to agree to let us change the Buildable interface.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

One obstacle is that the components in the Palette are built lazily. Building the entire palette recursively significantly slows down startup time for a module like VASL.

Another obstacle is that savefiles from older module versions might reference images that don’t exist, even if the current module version doesn’t use any missing images, so you’ll always have the possibility of encountering missing images at logfile-execution time.

rk

Post generated using Mail2Forum (mail2forum.com)

Another byproduct of this is that references to Dynamic Properties in prototypes generate Module Data error messages when the Palette Widget containing the piece is first displayed.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

xcuse me…
is that why the palette shows pieces with empty labels for DP’s (in b4, in b3 backwards I think it used to show the DP prop name) instead of their starting values, until you move them onto the map?
just a curious onlooker.

Yes, that’s right.

Only units actually visible on the palette need to be totally built. It should be possible to properly build each piece the first time it is displayed. I’ll open an enhancement request for this.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Rodney Kinney”:

How much? Would it still be practical to do as a validity check when saving
the module in the Editor?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake Joel Uckelman:

This is fixed in trunk@4348.

Also here are some other things in this build, mostly to do with logging:

  • Added improved logging classes.
  • Moved uncaught exception handling from ErrorLog to ExceptionHandler.
  • Moved logging from ErrorLog to Logger.
  • Added log viewer in Module Manager help menu.
  • Log module information earlier in the load process.
  • Use Animator for tile fade-in; better performance than the spinner.

nomic.net/~uckelman/tmp/vassal/


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Yes, that would be fine. Actually, I believe the whole palette is built on start-up when you edit a module. It’s only built lazily when playing.

rk

Post generated using Mail2Forum (mail2forum.com)