Hello Cedric,

If the error apears after several APDU exchanges, I suppose that you create
a new object each time the applet receives an APDU. Let me remind you that
the garbage collector on GemXpresso 211IS is invoked only on a delete
command and it is probably due to a lack of memory. To obtain a more precise
exception, I suggest to insert the following try/catch in your process
method:
        try{

        } catch(CryptoException ce) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x10 +
ce.getReason()));
        } catch(SystemException se) {
        switch(se.getReason()){
                case SystemException.ILLEGAL_AID:
                            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x20 +
0x01));
                case SystemException.ILLEGAL_TRANSIENT:
                            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x20 +
0x02));
                case SystemException.ILLEGAL_VALUE:
                            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x20 +
0x03));
                case SystemException.NO_RESOURCE:
                            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x20 +
0x04));
                case SystemException.NO_TRANSIENT_SPACE:
                            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x20 +
0x05));
                default:
                            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x20 +
0x06));
        } catch(TransactionException te) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x30 +
te.getReason()));
        } catch(ISOException isoe) {
           throw isoe;
        } catch(ArrayIndexOutOfBoundsException aioobe) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x50));
        } catch(IndexOutOfBoundsException ioobe) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x60));

        } catch(NegativeArraySizeException nase) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x70));

        } catch(NullPointerException pne) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x80));

        } catch(SecurityException see) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0x90));

        } catch(RuntimeException rte) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0xC0));
        } catch(Exception e) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0xB0));
        } catch(Throwable t) {
            ISOException.throwIt((short)(ISO7816.SW_UNKNOWN + 0xA0));
        }

Finally, if it is a problem of memory, I suggest that your applet could
allocate n byte arrays of 253 bytes (limit max for a GCR410 and where n is
the max numbers of strings to store)  in the constructor and always use
thoses byte buffers to store the string. Use a Length Value format to read
or store the string.

Regards.
Laurent.

>-----Original Message-----
>From: Cedric - [mailto:[EMAIL PROTECTED]]
>Sent: Monday, November 27, 2000 6:44 AM
>To: [EMAIL PROTECTED]
>Subject: [OCF] Error read strings
>
>
>Hi,
>
>I am currently using the Gemplus GemXresso Rad 211is card to
>read and write
>strings.  I created 2 new instructions to read and write string.
>
>After reading from the card a few times, the response become
>'6F00' instead
>of the data I want and '9000'.
>
>After which I had to 'clean' the card and start all over again.
>
>Why does that happen?
>
>Thank you.
>
>Reagrds.
>Cedric.
>
>_______________________________________________________________
>______________________
>Get more from the Web.  FREE MSN Explorer download :
>http://explorer.msn.com
>
>
>
>---
>> Visit the OpenCard web site
>at http://www.opencard.org/ for more
>> information on OpenCard---binaries, source code, documents.
>> This list is being archived at
>http://www.opencard.org/archive/opencard/
>
>! To unsubscribe
>from the [EMAIL PROTECTED] mailing list send an email
>! to
>!                           [EMAIL PROTECTED]
>! containing the word
>!                           unsubscribe
>! in the body.
>
>



---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to