Hi all,

I am doing simple file operations using RFile and RFsSession. Everything works fine on emulator but when i tried to do the same on device, it failed.

I tried with device debugging and found out that when control comes to RFile declaration, data abort exception occurs and control steps into file s32file.inl pointing to the following:

/** Detaches the file from this stream buffer.

The intermediate buffer's read and write marks are not changed, and the stream 
positions are not changed. This means that the contents of the file should 
not change while it is detached. 

@see Attach()
@see Reattach() */
	{iFile=RFile();}  <---- control gets stuck in here and when try to stop the debugger given kern-exec 3
inline void RFileBuf::Reattach(RFile& aFile)
Don't know what is wrong with this because it happens on a simple line which says:

RFile file;
I am first creating a file and closing it. Then i repeatedly write data to it and close again. Then i open it again and there it happens when i declare RFile object.

Any idea anyone?