Bug - Corrupted Master during saving / closing process

Description

23:12:47.909 INFO html-sheet-thread CharacterFacadeImpl:2635 Finished export at serial 192 to D:\pcgen\pcgen_dev\Trunk\pcgen\preview\companions\compact_com
panion.htm
23:12:49.431 INFO AWT-EventQueue-1 CharacterManager:355 Saving character Xander - D:\pcgen\pcgen_dev\Trunk\pcgen\characters\characters\1. Merced Group\01.
GM - Andrew\Online\Quest of the Sword\Xander.pcg
23:12:49.826 SEVERE AWT-EventQueue-1 PCGen_Frame1:2939 Uncaught error - ignoring
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at pcgen.util.FileHelper.findRelativePath(FileHelper.java:89)
at pcgen.io.PCGVer2Creator.appendFollowerLines(PCGVer2Creator.java:1515)
at pcgen.io.PCGVer2Creator.createPCGString(PCGVer2Creator.java:439)
at pcgen.io.PCGIOHandler.write(PCGIOHandler.java:328)
at pcgen.io.IOHandler.write(IOHandler.java:176)
at pcgen.gui2.facade.CharacterFacadeImpl.save(CharacterFacadeImpl.java:2776)
at pcgen.system.CharacterManager.saveCharacter(CharacterManager.java:364)
at pcgen.gui2.PCGenFrame.saveCharacter(PCGenFrame.java:655)
at pcgen.gui2.PCGenFrame.closeCharacter(PCGenFrame.java:729)
at pcgen.gui2.PCGenActionMap$CloseAction.actionPerformed(PCGenActionMap.java:565)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at pcgen.gui.PCGen_Frame1$WaitCursorEventQueue.dispatchEvent(PCGen_Frame1.java:2934)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Environment

I made a companion for a character. I was on the companion page when I was trying to save the master, after closing the companion. I had intended to reload the sources. After the reload the character was corrupt and the log showed OutOfBounds.

Activity

Show:
James Dempsey
October 11, 2012, 5:35 AM

Put in more robust management and checking of companion file names. Also ensured that files are only saved once per click of the save button.

Fixed

Assignee

James Dempsey

Reporter

Andrew Maitland

Labels

None

Theme

None

Epic/Theme

None

Pending User Input

None

Fix versions

Affects versions

Priority

Minor
Configure