EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CbFs crashing in CbFsDeleteFileFunc

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#15352
Posted: 12/21/2010 09:32:56
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello,

callback file system is crashing with the following exception:

Unhandled exception at 0x0050a47a (c16_soa_af_win.dll) in c16_soa_af_win_5508_20101221153702.mdmp: 0xC0000005: Access violation reading location 0x00000024.

This occurs when the file "Thumbs.db" is accessed. I attached a zip file with a compiler generated map file. The address above refers to function "CbFsDeleteFileFunc".

Any ideas? Do you need further information? The "Thumbs.db" is too large for forum-upload (1,2M). Should I upload on a different way?

Regards,
Robert


[ Download ]
#15353
Posted: 12/21/2010 09:51:55
by Eugene Mayevski (EldoS Corp.)

Can you reproduce the problem with a sample project or a test case?


Sincerely yours
Eugene Mayevski
#15361
Posted: 12/22/2010 05:29:33
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello,

no, I haven't been able to reproduce the problem with one of the samples.

But I identified another statement which is crashing:

The call stack is UcBsWorkerThreadProc() -> UcbWorkerThreadProc() -> CbFsUcbRequest() -> CbFsUcbWrite() -> CbFsWriteCB().
As the second parameter of CbFsWriteCB() (IN PCBFSLIB_FCB Fcb) is NULL, the statement
Code
    ASSERT( Fcb->Header.TypeCode == CBFSLIB_TYPE_CODE_FCB &&
            Fcb->Header.ByteSize == sizeof(CBFSLIB_FCB) );

is crashing.

I guess it was also the file control block which was NULL in CbFsDeleteFileFunc.

How can this happen? Can this be caused of my UserContext which is passed in OnOpenFile callback?

Wishing a merry christmas,
Robert
(I am back from holiday on January 10th)
#15362
Posted: 12/22/2010 06:09:20
by Vladimir Cherniga (EldoS Corp.)

Hello,

if the issue is not reproduced with test samples, does it mean that it reproduced with your custom code ? If the issue persist and reproducible could you post your application binary and describe detail steps to reproduce the problem ?
At lease please specify your initial storage characteristics. Do you use CallAllOpenCloseCallback property set to true ? What action with cbfs disk files you perform to reproduce the issue ? Any additional info will be very helpful. Thank you in advance.

Regard,
Vladimir.
#15363
Posted: 12/22/2010 06:43:20
by Eugene Mayevski (EldoS Corp.)

I am afraid that the binary can be not enough if the library is linked statically. Having a test case (maybe based on one of our samples) would help us a lot as we will be able to debug it then.


Sincerely yours
Eugene Mayevski
#15442
Posted: 01/10/2011 02:59:09
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello,

these are my initial storage characteristics:
StorageType = CallbackFileSystem::stDisk
CallAllOpenCloseCallbacks = true
MountingPointFlags = CBFS_SYMLINK_NETWORK | CBFS_SYMLINK_NETWORK_WRITE_NETWORK_ACCESS | CBFS_SYMLINK_NETWORK_ALLOW_MAP_AS_DRIVE

I am sorry but I am not able to create this faulty behaviour with the mapper sample. Have you got any idea what could possibly cause the file control block to be NULL? Is there anything I can test (e.g. something with my user-context which is passed to cbfs)?

The error occurs when a folder with 400 pictures is viewed in windows explorer with thumbnails view. The thumbnails are saved in Thumbs.db but sometimes it crashes with the above described error.

It seems to be a timing problem as it does not occur every time.

It also seems to be connected with the opening and closing of the file Thumbs.db (which happens very often). When I open the file in read-mode with another program and leave it open while viewing the thumbnails, the problem never occured up to now.

Regards,
Robert
#15443
Posted: 01/10/2011 03:12:25
by Eugene Mayevski (EldoS Corp.)

Please take the latest build (dd. 23 December 2010), it addresses this problem (though I can't confirm that it resolves it completely as we couldn't reproduce it).


Sincerely yours
Eugene Mayevski
#15444
Posted: 01/10/2011 03:15:36
by Vladimir Cherniga (EldoS Corp.)

Hello,
do you utilize timeout value in your sample ? Try to use zero value in CreateStorage() api. Check your OnEnumerateDirectory() callback code. Try to replace some part of your sample callbacks with a code from Mapper sample callbacks. It may help to locate the problem.
#15451
Posted: 01/11/2011 07:42:03
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello,

I installed the latest build yesterday. Unfortunately, the problem occured again today. Strangely, I cannot reproduce it at the moment. It somehow seems to be a timing problem.

Timout is set to zero when calling MountMedia(). And the code of OnEnumerateDirectory looks fine. I don't have any idea what could cause this problem.

Could you please analyse which statements possibly lead to the NullPointerException of file control block? (see posting #3)

Thanks & regards,
Robert
#15452
Posted: 01/11/2011 08:03:30
by Vladimir Cherniga (EldoS Corp.)

Could you compare Mapper sample source code with previous version. It has some valuable changed in OnCloseFile() callback event. Try to apply this changes to your code and recheck the issue.
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 4540 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!