Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Problem with Serialization after recompiling with U++ 2007.1beta3
Problem with Serialization after recompiling with U++ 2007.1beta3 [message #8267] Sun, 25 February 2007 02:44 Go to next message
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
Hi,
I have some problems compiling an application writed end compiled with U++ 605.
After fix some lines of code for compile with U++ 2007.1beta3, the application file previously generates with "StoreToFile(MyStruct, "filename");" is not compatible, in fact using "LoadFromFile(MyStruct, "filename");" I don't get correct data in the structure.

If I use the recompiled application for generate the same file, I found some differences from old and new verision. two files, named Old and New it's attached. Differences at the position 0x43 and 0x52.

This is the structure Serialized:

struct Mappa {
String descrizione;
int vu, ng, vref, kt1, kt2, i0, i1;
Vector<int> dati;
Vector<int> old_res;
Vector<Value> resistenza;
int fileRel, deviceRel;
char unused_1;
int di;

void Serialize(Stream& s) {

if(s.IsStoring()) {
fileRel = 262;
}

s % descrizione % vu % ng % dati % old_res % fileRel % unused_1;

// Preload valori di default;
if(s.IsLoading()) {
vref = 180;
di = false;
kt1 = 200;
kt2 = 12000;
i0 = 15;
i1 = 3;
if (fileRel <= 261) {
deviceRel = fileRel;
for(int i=0; i<old_res.GetCount(); i++) {
resistenza.At(i) = old_res.At(i);
}
}
}

if (fileRel >= 258) {
s % vref;
}
if (fileRel >= 260) {
s % di % kt1 % kt2 % i0 % i1;
}
if (fileRel >= 262) {
s % deviceRel % resistenza;
}
}
} mappa;


Mauro Bottizzo.
  • Attachment: Old.bdc
    (Size: 0.09KB, Downloaded 253 times)
  • Attachment: New.bdc
    (Size: 0.09KB, Downloaded 238 times)
Re: Problem with Serialization after recompiling with U++ 2007.1beta3 [message #8269 is a reply to message #8267] Sun, 25 February 2007 23:25 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hard to say, I guess it depends on what you put into that Value.

Do you think you can prepare complete testcase? Just package that can be compiled on 602 and 2007, puts in data, and gets different result?

Mirek
Previous Topic: Must Core be compiled in DEBUG mode only?
Next Topic: How to use FileStream?
Goto Forum:
  


Current Time: Thu Apr 25 23:48:54 CEST 2024

Total time taken to generate the page: 0.02854 seconds