Android Question StringIndexOutOfBounds in ArchiverPlusZip

Creideiki

Active Member
Licensed User
Hi,

I get the following error with ArchiverPlusZip 1.13:
B4X:
emailservice_createzip (java line: 261)
java.lang.StringIndexOutOfBoundsException: length=44; index=56
    at java.lang.String.substring(String.java:2027)
    at a.a.a.a.a.a(SourceFile:50776)
    at a.a.a.i.a.a(SourceFile:2481)
    at a.a.a.a.c.a(SourceFile:291)
    at b4a.flm.archiverplus.ArchiverPlusZip.AddFileToZip(SourceFile:26249)
[...]
This is the offending line:
B4X:
Arc.AddFileToZip(File.Combine(srcDir, srcFiles.Get(0)), File.Combine(destDir, destFile), "Archiver")
The source path in fact is 44 chars long.
The zip file is already created and filled with Arc.AddFolderToZip.

What happens there?
 

DonManfred

Expert
Licensed User
This is the offending line
I can not see a substring here.
emailservice_createzip (java line: 261) java.lang.StringIndexOutOfBoundsException: length=44; index=56 at java.lang.String.substring(String.java:2027)

check your code. YOU are using a substring somewhere in emailservice_createzip i guess . As we do not know the code we only can guess.
 
Upvote 0

Creideiki

Active Member
Licensed User
check your code. YOU are using a substring somewhere in emailservice_createzip i guess . As we do not know the code we only can guess.
Well - no... the substring is called by ArchiverPlusZip.AddFileToZip. I don't know what the a.a.a.* files come from; probably from ArchiverPlusZip, too.
 
Upvote 0
Top