• Post Reply Bookmark Topic Watch Topic
  • New Topic

ReleaseStringUTFChars occasionally fails  RSS feed

Dhamodharan Krishnan
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I do use an object which consists of lot of strings.
When I do a transfer the fields from Java object to C string,
I do the following
1. Get the string object from the Java Object.
2. So I get a jstring.
3. Now I do GetStringUTFChars to get a char*
4. Then I do a ReleaseStringUTFChars soon after getting the string.
<Error: After release, the character array consists of junk not the string sent from Java>
5. Still it will take some time for me to use the C character array.
6. Whether I get a reference of the string in the Java object in the jstring i.e. obtained as a result of GetObjectField.
7. Whether I get a reference of the jstring in the Java object into the character array.
Please help me to find out.
I do get the error in Windows as well as Alpha Systems.
When I do transfer some 5 or 10 objects like this, it works fine.
But when I do transfer 510 to 10000 objects like this, I land up in loosing the data. Our application requires transfer of such huge amount of data
Thanks in advance.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!