[Mono-devel-list] Mono ResourceReader - known problems?
anset at anset.org
Fri Oct 22 10:03:47 EDT 2004
an update for those who want it:
The Resourcereader is not the problem. The problem apparantly lies with the
IFormatter (the binary one).
I haven't traced the problem further down yet, but I did find a workaround.
What I was doing was serializing a self made object that containd to
ListDictionaries of two other self made objects. (the listdictionary does
not seem to serialize well between .net and mono, so I implemented the
serialise inerface, transforming the listdictionaries to simple arrays)
The two child objects contain only primitive types plus a pixdata object.
(which is Why I implemented the serialize interface for those two objects
Reading such a resource file with mono (even when the file was written by
mono) would only read the top object, it would not decend to the second
level self made objects.
I've worked around the problem now by not making the top object serialise
itself, but rather adding the second level objects one at a time to the
resource file. This does mean I have to do some post-processing on the
restored objects, but I can live with that.
I do not think I will look further at this, but maybe someone should try and
find out why it takes 30 seconds to resource-read a file on mono when it
takes about 2 seconds on windows...
The delay is (again) with the formatter... From the opening of the
resourcereader until the "deserialise" commad in ResourceReader, everything
goes fast, then it hangs 30 seconds with mono taking 90%-100% cpu, and then
it goes to my serialise constructor methods and everything goes fast again.
There is something going on between the time mono enters the
formater.deserialize method and it gets to my serialise ctr...
----- Original Message -----
From: "Anset" <anset at anset.org>
To: <mono-devel-list at lists.ximian.com>
Sent: Friday, October 22, 2004 11:53 AM
Subject: [Mono-devel-list] Mono ResourceReader - known problems?
> Are there any known problems with the mono ResourceReader class?
> I've got a program that works both on windows/.net and linux/mono.
> The program writes a resource file (uwing ResourceWriter). And Reads it
> Reading a resource file on Windows works. The resource file can be
> with .net or with mono. Both work.
> On Linux however, reading a resource file does not work. no data is taken
> in.... It does not matter where the resource file is created.
> I did some more simple project tests, and there the reader does work...
> I'm now looking at the class sources, but I would appreciate it if anybody
> who knows about a problem, could say so.
> thank you for your time,
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list