| Summary: | java.nio.BufferUnderFlowException (Take Four) | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Eike Stepper <stepper> |
| Component: | cdo.net4j | Assignee: | Eike Stepper <stepper> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 4.10 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | 262875, 295989, 299871 | ||
| Bug Blocks: | |||
|
Description
Eike Stepper
(In reply to comment #0) > A final empty buffer can be involved, but that's not strictly > required to produce a BufferUnderflowException on the receiver side. That's not entirely correct. If the final buffer has at least 2 bytes available the 2 bytes are interpreted as the signal ID of a new incoming signal, which can lead to either an InvalidSignalIDException or, worse, to the creation of a wrong signal instance (which will most likely fail later). My new solution to the problem involves a new bit in *each* signal buffer header to indicate whether the buffer is the first buffer of a signal or not. With this new bit the SignalProtocol can detect that the offending buffers really belong to a signal that has already been discarded because the signal logic stopped prematurely to read the entire signal stream. These buffers can then be silently discarded, instead of being interpreted as buffers for a new incoming signal. I'll try to pack this new BOS (Begin Of Signal) bit into the existing correlation ID field, which is the only field that's present in all buffers of a signal stream, anyway... The changes are committed: https://git.eclipse.org/c/cdo/cdo.git/commit/?id=60308125e4705cddea6010f4a58165dfe4ed0491 Closing. Closing. |