Uh oh, locking up the editor

V3.7.16…I am in the process of making a module when I edited one of my prototype definitions…when I ran the module, I got the “infinite error” but ( “VASSAL.tools.RecursionLimitException” and I was able to quit the module). Now when I go and try and Edit the module, it will lock up every time before I can do much of anything. I know where my error lies, but now I cant even remove the bad prototype definitions. Im kind of stuck.

Edit: I can Edit the module, but as soon as I try and click on the problem prototype definition, it locks it up.

Mad Dog

Have you tried with a newer version of Vassal? Say 3.7.24?

Another option:

  • Unpack the module - say MyModule.vmod
     $ mkdir tmp
     $ cd tmp
     $ unzip ../MyModule.vmod
    
  • Open buildFile.xml in your favorite text editor
  • Find the offending prototype definition by searching for its name - say “Offending Prototype”
  • Remove element
     <VASSAL.build.module.PrototypeDefinition name="Offending Prototype" description="...">...</VASSAL.build.module.PrototypeDefinition>
    
    You may want to copy that to some other file, for future reference.
  • Save the buildFile.xml
  • Pack up the module again
    $ zip ../MyModuleEdited.vmod *
    

If you need more help, you should probably post your module so that people may take a look at it.

Also, remember to mark the solution to your problem so that others may more easily find the solution to their problems.

This should really go in the Module Design sub-forum. Technical Support & Bugs is more for bugs in Vassal or technical issues running Vassal. See also here and How to report problems.

Yours,
Christian

(I dont see a way to move this myself, sorry to keep it going here)

The manual edit worked. I poked through the build file and took a stab at removing the specific element within the bad prototype definition…I think. For example there is a section within the buildfile: \\\ prototype;unit\\\. Assuming the “Prototype Unit” is the bad actor, do I delete the “\\\” before or after, or both ?

thanks,

Mad Dog

What you are referring to is the place in a piece (or prototype) definition where the prototype unit is being used. This happens in an encoded fashion, and is therefore hard to edit by hand (you could use my Python module pywargame to do it). You should therefore not edit that part as that will likely cause other errors. Instead, I would recommend that you remove the entire prototype by removing the XML element

<VASSAL.build.module.PrototypeDefinition name="unit" description="...">...</VASSAL.build.module.PrototypeDefinition>

That is from the starting < to the final > in a line like the above.

Then, you can open the module in the Vassal editor and recreate the unit prototype without the infinite loop.

Note that there’s a fix in 3.7.23 that may help you fix your problem without the manual edit.

Yours,
Christian