Exception when reading a saved layout in preferences : Unknown format for version

Hello,

The behavior I am describing is linked to this thread, for which the solution implied to switch from version 1.1.0 to version 1.1.1.

I am storing the layout in the preferences with a call to :

CControl.getResources().writePreferences();

When the user starts the application, I read the preferences with

CControl.getResources().readPreferences();

And I am getting this exception :

Unknown format for version
bibliothek.util.Version.read(Version.java:121)
bibliothek.gui.DockFrontend.readBlop(DockFrontend.java:1909)
bibliothek.gui.DockFrontend.read(DockFrontend.java:1896)
bibliothek.gui.DockFrontend.read(DockFrontend.java:1884)
bibliothek.gui.dock.common.CControl$9.read(CControl.java:880)
bibliothek.gui.dock.support.util.ApplicationResourceManager.readStream(ApplicationResourceManager.java:144)
bibliothek.gui.dock.support.util.ApplicationResourceManager.readArray(ApplicationResourceManager.java:232)
bibliothek.gui.dock.support.util.ApplicationResourceManager.readPreferences(ApplicationResourceManager.java:255)

A debug session says that at Version.java:121, version is 3 instead of 1…

Any clue ?

Note that CControl.getResources().readPreferences(); 1.1.1 can read preferences written by CControl.getResources().writePreferences(); 1.1.0, but not by CControl.getResources().writePreferences(); 1.1.1.

You seem to be the first person using the binary format since a long time… (either nobody is using the framework, or they all are using the xml format).

I’ve uploaded a new version 1.1.2p1d with which the binary format should once again be working.

Sorry for the inconvenience, I’m still lacking some decent unit tests to prevent this kind of mistakes.

Thank you. Everything is working fine now.

Sorry to resurrect an old thread.

The release of version 1.1.1 is shown as 1.Sep.2012 on the main page, however the previous posts are dated ~Jun 2012.
Is the currently available version 1.1.1 made before that date?

Also just want to add my voice to the usage of serialization via the binary mechanism.

I have just been with version 1.1.0, as I tend to upgrade slowly. DockingFrames is a great package.

The dates you see in the download section are always the exact same dates of when the build was made. I’m not quite certain how to understand your question, but version 1.1.1 really is from the 1.Sep.2012. The „preview versions“, like 1.1.1p2, are older than the „final version“.

I have no plans in changing the current system of saving layouts - it has worked for a long time without many incidents - no need to change a running system :wink:

I always suggest to jump directly to the newest build. All the versions have roughly the same quality, and there are many bugfixes in 1.1.2p8e that are missing in 1.1.1. The API between 1.1.2 and 1.1.1 does not have many changes.

Does that help? Please let me know if you have any more questions, or if one of my answers were not satisfying :wink:

Thank you for your response. You understood my question correctly. Sorry for the confusion.

That does help and I am glad the binary serialization version is not going away. :slight_smile:

I have updated to a much later version - 1.1.2 (preview).

One thing that I notice which differs is there is now animation on drag operations for the Smooth theme.

Before I updated, the last version I used was 1.1.0. Is there a quick way I can disable the drag animations?

You can customize these animations :wink: They are produced by something that is called „SpanFactory“, and that factory can be replaced. One of the existing factories does not produce any animations:

control.putProperty( DockTheme.SPAN_FACTORY, new NoSpanFactory() );```

That did the trick and is exactly what I wanted. :slight_smile:

well actually I used:

aController = ...
aController.getProperties().set(DockTheme.SPAN_FACTORY, new NoSpanFactory());

but…
I do eventually plan to make use of the common library rather than work with just the core.

Once again thank you for this wonderful library.