JVM ACCESS_VIOLATION_EXCEPTION when building String from array on deprecated JVM

I came across a really strange case - I have the following code:

new String(data, position, len, Charset.forName("windows-1255"));

where data- byte[], and positionand len- ints.
When I run it on jdk 1.6.0_38, it runs very slowly (for a given iteration of 411 seconds), and when I run this:

new String(data, position, len);

it starts the same iteration in less than 1 second. Some more data:

  • When I debug it, when I enter the constructor (using Charset) it issues JVM ACCESS_VIOLATION_EXCEPTION and dies.
  • When I run it on jdk 1.7.0_10, it works fine (less than 1 second)

can someone explain this strange behavior?

+4
1

, this. , , -, GCing. , , , .

vialoation, , .

+1

All Articles