First I want to thank everyone involved into the development of RemoteMaster for this great piece of software!

Then I'd like to mention that I'm not sure if this is the ideal place for the following kind of information/topic. In case it isn't please feel free to move that posting.
During working on a new RDF file we discovered that there is a problem saving read data when the EepromSize is not divideable by 16. As of now, this new RDF seems to be the first requiring a EepromSize which is not divideable by 16.
In the new RDF file the EepromSize has an unusual 0xFFC, which works nicely reading the data from the remote. But RemoteMaster fails with an Exception on trying to save that data to disk. Output in rmmaster.err:
Error in write task: 4092
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 4092
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at javax.swing.SwingWorker.get(SwingWorker.java:602)
at com.hifiremote.jp1.RemoteMaster$WriteTask.done(RemoteMaster.java:3561)
at com.hifiremote.jp1.RemoteMaster$SaveTask.done(RemoteMaster.java:3634)
at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4092
at com.hifiremote.jp1.Hex.toString(Hex.java:558)
at com.hifiremote.jp1.Hex.toString(Hex.java:681)
at com.hifiremote.jp1.RemoteConfiguration.save(RemoteConfiguration.java:7911)
at com.hifiremote.jp1.RemoteMaster$SaveTask.doInBackground(RemoteMaster.java:3617)
at com.hifiremote.jp1.RemoteMaster$WriteTask.doInBackground(RemoteMaster.java:1)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
RemoteMaster.windowClosing() entered
Having a look into the code, I discovered the following section (lines 7909-7912) in the file controlremote-code/km/com/hifiremote/jp1/RemoteConfiguration.java:
for ( int i = 0; i < getDataEnd( dataToSave ); i += 16 )
{
pw.print( String.format( "%04X", i + base ), Hex.toString( dataToSave, i, 16 ) );
}
So the above mentioned function will, run in that case, into:
i = 4080, which is < getDataEnd( dataToSave ) beeing 4092, and will then call Hex.toString with the instruction to do it for 16 bytes.
Which will result in an "java.lang.ArrayIndexOutOfBoundsException: 4092" triggered exactly at 4092 which is 0xFFC.
To solve this issue I already tried to modify that function to either use 4 instead of 16 which actually fixes the above listed exception in that use-case and writes the data properly to disk. This "solution" is not perfect, but helped to verify if this code block is the one causing the problem.
I'd highly appreciate if EepromSizes which are not divideable by 16 could in future versions of RemoteMaster be saved properly to disk.
Many thanks & best regards,
Harald