Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » ArrayIndexOutOfBoundsException during XMI serialization with ASCII encoding
ArrayIndexOutOfBoundsException during XMI serialization with ASCII encoding [message #1014305] Mon, 25 February 2013 15:03 Go to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
Hello,
I have a test using a ChangeRecorder with setRecordingTransientFeatures(false).
If I try to serialize the ChangeDescriptor, using ASCII encoding, I get this error:

java.lang.ArrayIndexOutOfBoundsException: 8192
	at org.eclipse.emf.ecore.xmi.impl.StringSegment.writeAscii(StringSegment.java:331)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeAscii(XMLSaveImpl.java:1016)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:255)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:331)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1417)
    ...


I'm using the ecore.xmi version 2.8.

I don't think the error is related to the usage of ChangeRecorder at all.

The reason is that in class StringSegment, the BUFFER is set to 8192 bytes. In my scenario I have an array with more than 12000 bytes.
I'm not sure if this is an error that might not have been noticed so far (because it only occurs if the buffer is reached), or if this BUFFER was defined as a limit, and thus this is the intended behavior (I don't think so...).

Can anyone comment please? Should I create a bugzilla for this?
(Unfortunately I can't provide a test case for this, but I assume that it can easily be reproduced by setting a low buffer).

[Updated on: Mon, 25 February 2013 15:06]

Report message to a moderator

Re: ArrayIndexOutOfBoundsException when serialization the ChangeDescription from ChangeRecorder [message #1014363 is a reply to message #1014305] Mon, 25 February 2013 16:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Silvestre,

Yes, please open a bugzilla with a test case.


On 25/02/2013 4:03 PM, Silvestre Martins wrote:
>
> I have a test using a ChangeRecorder with
> setRecordingTransientFeatures(false).
> If I try to serialize the ChangeDescriptor, using ASCII encoding, I
> get this error:
>
> java.lang.ArrayIndexOutOfBoundsException: 8192
> at
> org.eclipse.emf.ecore.xmi.impl.StringSegment.writeAscii(StringSegment.java:331)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeAscii(XMLSaveImpl.java:1016)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:255)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:331)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1417)
> ...
>
> I'm using the ecore.xmi version 2.8.
>
> I don't think the error is related to the usage of ChangeRecorder at all.
>
> The reason is that the BUFFER is set to 8192 bytes. In my scenario I
> have an array with more than 12000 bytes.
> I'm not sure if this is an error that might not have been noticed so
> far (because it only occurs if the buffer is reached), or if this
> BUFFER was defined as a limit, and thus this is the intended behavior
> (I don't think so...).
>
> Can anyone comment? Should I create a bugzilla for this?
> (Unfortunately I can't provide a test case for this, but I assume that
> it can easily be reproduced by setting a low buffer).
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: ArrayIndexOutOfBoundsException when serialization the ChangeDescription from ChangeRecorder [message #1715240 is a reply to message #1014363] Fri, 20 November 2015 13:31 Go to previous messageGo to next message
Noé A Rodríguez González is currently offline Noé A Rodríguez GonzálezFriend
Messages: 4
Registered: July 2013
Junior Member
Hi:

I have been experimenting this problem when I try to serialize a ecore model using XML. I Was wondering if the Problem has been reported as a bug in bugzilla, I have been searching on bugzilla but I have not found it yet. Have any one found a solution?

Exception:

java.lang.ArrayIndexOutOfBoundsException: 8192
at org.eclipse.emf.ecore.xmi.impl.StringSegment.writeAscii(StringSegment.java:331)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeAscii(XMLSaveImpl.java:1015)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:260)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:206)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1406)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:993)

[Updated on: Fri, 20 November 2015 13:33]

Report message to a moderator

Re: ArrayIndexOutOfBoundsException when serialization the ChangeDescription from ChangeRecorder [message #1715254 is a reply to message #1715240] Fri, 20 November 2015 15:08 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
It's this one:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=444746

On 20/11/2015 2:31 PM, Noé A Rodríguez González wrote:
> Hi:
>
> I have been experimenting this problem when I try to serialize a
> ecore model suing XML. I Was wondering if the Problem has been
> reported as a bug in bugzilla, I have been searching on bugzilla but I
> have not found it yet.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Compatible Property Descriptors
Next Topic:CompoundCommand.appendAndExecute question
Goto Forum:
  


Current Time: Tue Apr 23 10:44:40 GMT 2024

Powered by FUDForum. Page generated in 0.03691 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top