EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problem closing a read-only storage

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#2363
Posted: 02/23/2007 08:42:20
by Christian Falardeau (Standard support level)
Joined: 02/07/2007
Posts: 17

Hi, i'm trying to open a read-only storage, but unfortunately I cannot close it properly. If I set false to the ReadOnly property, everthing works like a charms.

Here is the following code to produce the problem:

const String filePath = "C:\\test.bin";

SolFSStorage storage = new SolFSStorage();

storage.IsSolFSStorage(filePath);
storage.ReadOnly = true;
storage.FileName = filePath;
storage.Open(StorageOpenMode.somOpenExisting);

storage.Close();
((IDisposable)storage).Dispose();
#2369
Posted: 02/23/2007 10:49:38
by Eugene Mayevski (EldoS Corp.)

Can you please tell us what version of SolFS you are using? This problem was reported before but is supposed to have been fixed.
The version can be checked in changes.txt file.


Sincerely yours
Eugene Mayevski
#2372
Posted: 02/23/2007 12:45:09
by Christian Falardeau (Standard support level)
Joined: 02/07/2007
Posts: 17

I've installed the SolFS 3.1.70 package downloaded two weeks ago from your web site after we've just purchased it.

But the SolFS .NET assembly I used, is the one that can be found in the "C:\Program Files\EldoS\SolFS\dotNET\Managed" directory. Its version is 3.0.0.62. But this file is the one that was installed by your installer.

Thanks.
#2374
Posted: 02/23/2007 12:59:31
by Eugene Mayevski (EldoS Corp.)

The assembly version information was not updated (already fixed in build 71). We've tested the behaviour in our conditions and the storage is closed correctly. Maybe the problem is specific to .NET assembly. We'll check again


Sincerely yours
Eugene Mayevski
#2498
Posted: 03/13/2007 18:24:43
by Christian Falardeau (Standard support level)
Joined: 02/07/2007
Posts: 17

Hi, finally I installed the version 3.1.71 and I get the same problem again. I took the file in the following foloder:

C:\Program Files\EldoS\SolFS\dotNET\Managed

I tried the one in the following folder:

C:\Program Files\EldoS\SolFS\dotNET\NET_20\Managed\Win32

But I got a dead lock problem when trying to read from a read-only stream. So I went back the previous dll.

Did you have time to check that problem? I can reproduce the same problem if I try to open the same SolFS file twice in the same process. The second is likely opened in read-only even if I specified read-only=false. When I close the two files, the second close operation throw a SolFS error exception and then the process get killed by an access violation exception.
#2499
Posted: 03/13/2007 20:54:11
by Christian Falardeau (Standard support level)
Joined: 02/07/2007
Posts: 17

Finally I bound my project with the SolFSNet.dll in the GAC. The version is 3.1.0.73. I think is the one that is equivalent to the one in the C:\Program Files\EldoS\SolFS\dotNET\NET_20\Managed\Win32. Anyway, I get a dead lock when I'm opening an existing file with the read-only property to true (event with false). After that I create I SolFSStream (I tried both read or read-write access), I pass the stream to an XML reader and it lock up indefinitely there. Here is a gist of the call stack:

>SolFSNet.dll!<Module>.TStorageObjectGetCluster(StorageObjectStruct* Self = 0x07335a90, ulong Position = 1693, DataClusterStruct** Cluster = 0x07335f38, bool SetSizeIfNeed = true) + 0x19d bytes
>SolFSNet.dll!<Module>.TStorageFileHandlerRead(StorageFileHandlerStruct* Self = 0x07335f18, void* Buffer = 0x07360ff8, int BufferSize = 1693, uint* Read = 0x049eca08) + 0x159 bytes
>SolFSNet.dll!SolFS.SolFSStream.Read(byte[] buffer = {Dimensions:[1693]}, int offset = 0, int count = 1693) + 0x12b bytes
>System.Xml.dll!System.Xml.XmlTextReaderImpl.ReadData() + 0x398 bytes
>System.Xml.dll!System.Xml.XmlTextReaderImpl.ParseDocumentContent() + 0x435 bytes
>System.Xml.dll!System.Xml.XmlTextReaderImpl.Read() + 0x50 bytes
>System.Xml.dll!System.Xml.XmlLoader.LoadDocSequence(System.Xml.XmlDocument parentDoc = Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized.) + 0x36 bytes
>System.Xml.dll!System.Xml.XmlLoader.Load(System.Xml.XmlDocument doc = Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized., System.Xml.XmlReader reader = Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized., bool preserveWhitespace = false) + 0x1af bytes
>System.Xml.dll!System.Xml.XmlDocument.Load(System.Xml.XmlReader reader = Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized.) + 0xa0 bytes
>Storage.dll!Zetec.Core.Storage.SolFSFileHandler.ReadFileInformation() Line 575 + 0xe bytes C#


There is no other process or thread using this file at the same time. I don't understand why SolFSExplorer works well and not my programs. Any test programs that I used SolFSNet.dll had the read-only and dead lock problem.
#2500
Posted: 03/14/2007 01:41:25
by Eugene Mayevski (EldoS Corp.)

Quote
cfalardeau wrote:
Did you have time to check that problem? I can reproduce the same problem if I try to open the same SolFS file twice in the same process. The second is likely opened in read-only even if I specified read-only=false. When I close the two files, the second close operation throw a SolFS error exception and then the process get killed by an access violation exception.


You CAN NOT open the storage twice.


Sincerely yours
Eugene Mayevski
#2501
Posted: 03/14/2007 06:41:42
by Christian Falardeau (Standard support level)
Joined: 02/07/2007
Posts: 17

I know that I cannot open the storage twice in read-write and that ok. But I would need to open twice. One for read-write operations and the other in read-only to obtain a file preview. SolFS Explorer support that operation. The way it works right it is ok for me. But the problem is not there I'm unable to open a storage in read-only (even if I open it only once at the same time) the application crash when I close it. And I used the new version 3.1.73, it does the same thing and a infinite lock appeared, see my previous post.

Thank you for helping me...
#2502
Posted: 03/14/2007 06:43:11
by Christian Falardeau (Standard support level)
Joined: 02/07/2007
Posts: 17

Just forgot to mention that I use the .NET component to interact with SolFS.
#2503
Posted: 03/14/2007 06:57:38
by Eugene Mayevski (EldoS Corp.)

Quote
cfalardeau wrote:
I know that I cannot open the storage twice in read-write and that ok. But I would need to open twice. One for read-write operations and the other in read-only to obtain a file preview. SolFS Explorer support that operation.


NO. This won't work. There was a bug in Explorer that allowed you do this, but we must have fixed this already.


Sincerely yours
Eugene Mayevski
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 16156 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!