EldoS | Feel safer!

Software components for data protection, secure storage and transfer

eldos.cbfs.ECBFSError: Can't find mPriorLastWriteTime field in class

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#20199
Posted: 05/21/2012 08:44:53
by Ralf Ulrich (Basic support level)
Joined: 03/06/2012
Posts: 3

Hello, when I copy many files into the file system I sometimes get the following error message : eldos.cbfs.ECBFSError: Can't find mPriorLastWriteTime field in class.

I can't figure out what's the cause of this error.
Maybe you know this error and can me tell more about what's wrong?
Kind regards

Ralf
#20200
Posted: 05/21/2012 09:19:12
by Eugene Mayevski (EldoS Corp.)

Please be more descriptive. What API are you using? When does the error happen (do you get a call stack?)?

On a side note, if you have a license, please assign the license ticket to your user account. The ticket itself and the procedure of it's use are specified in the registration e-mail that was sent to you upon license purchase.


Sincerely yours
Eugene Mayevski
#20201
Posted: 05/21/2012 09:35:00
by Ralf Ulrich (Basic support level)
Joined: 03/06/2012
Posts: 3

Hi, I know it's very little information to get an idea whats wrong. But unfortunately I don't get any call stack, only the message I posted. I'm using the Java API. It happens sporadical when I copy many files into the file system, I can't figure out any way to reliable reproduce it.

Do you know the error message? I couldn't find any topic here in the forum about it.

Thanks
Ralf
#20202
Posted: 05/21/2012 10:05:45
by Eugene Mayevski (EldoS Corp.)

Looks like Java glitch at the first glance. Please try reproducing the error while running the application under debugger and capture the call stack. Maybe this reveals some information or helps us reproduce the issue locally.


Sincerely yours
Eugene Mayevski
#20247
Posted: 05/25/2012 02:54:18
by Stefan Liebig (Priority Standard support level)
Joined: 05/25/2012
Posts: 1

The message:
eldos.cbfs.ECBFSError: Can't find mPriorLastWriteTime field in class
is written to stdout (it is not an exception).

The jnicbfs.dll contains a string: "Can't find %s field in class" which obviously matches the error message that we get.
Without the source code for the jnicbfs.dll it is extremely difficult to find the reason for this message in debugger.

It seems to me that there is some code (inside jnicbfs.dll) that uses Java Reflection to access an undefined field of a class. The only class (inside eldos.cbfs.jar) that has similar fields (mPriorFileName, ..) is CbFsEnumerationInfo.
If my assumption (Java Reflection) is correct, it should be easy to find the source code which tries to access this non existing field.

Could you please investigate here?

Tschüß,
Stefan
#20254
Posted: 05/25/2012 09:56:14
by Eugene Mayevski (EldoS Corp.)

The problem is that the message is not reflecting real situation.
The field does exist (and so do other fields referenced in adjacent lines) and it's accessed many times successfully before the error happens. This was the very first thing we checked upon your post.

There will be a new build in a day or two. There were certain fixes made in it and though they are not directly related to the above. If the problem persists, we need some test case from you to reproduce the problem.


Sincerely yours
Eugene Mayevski
#20490
Posted: 06/18/2012 06:34:23
by Steffen Kriese (Basic support level)
Joined: 06/18/2012
Posts: 2

I can reproduce the bug by modifying the java example that ships with the cbfs. If the Handler creates more than about 10 000 directories in the onMount() method, I get the error mentioned above: Can't find mPriorLastWriteTime field in class

Handler.java:

...
Code
@Override
   public void onMount( final CallbackFileSystem callbackFileSystem ) throws Exception {
      if ( callbackFileSystem != null ) {
         sectorSize = callbackFileSystem.getSectorSize();
      }
      g_DiskContext = new VirtualFile( "\\" );
      
      for (int i =1; i <= 20000; i++){
         VirtualFile vDir = new VirtualFile("VirtualDir-"+i);
         Date now = new Date();
         vDir.setCreationTime(now);
         vDir.setLastAccessTime(now);
         vDir.setLastWriteTime(now);
         vDir.setAttributes(FileAttributes.DIRECTORY);
         
         VirtualFile vFile = new VirtualFile("VirtualFile-"+i);
         vFile.setCreationTime(now);
         vFile.setLastAccessTime(now);
         vFile.setLastWriteTime(now);
         vDir.AddFile(vFile);
         
         g_DiskContext.AddFile(vDir);
      }
   }

...

Main.java
Code
public static void main( final String[] args ) throws Exception {
      if ( System.getProperty( "java.library.path" ) == null ) {
         System.err
            .println( "You probably should set \"java.library.path\" to the directory containing jnicbfs.dll. Edit the arguments tab in your .launch config" );
      }
      CBFS_CAB = System.getProperty( "elsdos.cbfs.cab" );
      CallbackFileSystem cbfs = null;

      try {
         cbfs = new CallbackFileSystem( new Handler() );
         cbfs.setRegistrationKey( DEFAULT_REGISTRATION_KEY );
         cbfs.setSerializeCallbacks( false );
         cbfs.setThreadPoolSize( 5 );
         cbfs.setProcessRestrictionsEnabled( false );
         cbfs.setStorageCharacteristics( 0 );
         cbfs.createStorage();
         cbfs.disableMetaDataCache( true );

         cbfs.mountMedia( 0 );
         cbfs.addMountingPoint( "X:");

         System.out.println( "type exit and hit enter key to complete execution" );
         final BufferedReader input = new BufferedReader( new InputStreamReader( System.in ) );
         while ( true ) {
            System.out.print( "> " );
            try {
               Thread.sleep( 500 );
            } catch ( final InterruptedException ignored ) {

            }

            final String line = input.readLine();
            if ( line == null ) {
               continue;
            }
            if ( "exit".equals( line ) ) {
               break;
            }
         }
      } catch ( final Throwable e ) {
         System.out.println( e.getMessage() );
         e.printStackTrace();
      } finally {
         if ( cbfs != null ) {
            cbfs.unmountMedia( true );
            while ( cbfs.getMountingPointCount() != 0 ) {
               cbfs.deleteMountingPoint( 0 );
            }
            cbfs.deleteStorage( false );
         }
      }
   }


To reproduce the error, just add in these lines in Handler.java and Main.java , start the example and go to the root directory of the mounted drive.

The amount of files differs on every machine. Maybe you have to bump ist up a little to reproduce the error. In out software we are build based on the cbfs, we are getting this error if a directory has more than 27 files.

Best regards,
Steffen Kriese
#20492
Posted: 06/18/2012 08:13:11
by Steffen Kriese (Basic support level)
Joined: 06/18/2012
Posts: 2

Addendum:

This error occurs mostly on Windows XP. I have seen it on Windows 7 as well, but not that often. The example above can only reproduce it on Windows XP.

Test system:
OS: Windows XP Service Pack 3 (32bit)
CBFS Kernel Driver: 3.2.109.275
Java: 1.6.31

Best regards,
Steffen Kriese
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 1765 times

Number of guests: 2, 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!