diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-22 11:58:00 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-22 11:58:00 +0300 |
| commit | 0b5afe8839241dec66ba832cf42860ec69b87df8 (patch) | |
| tree | e100d2d6204f8c04dc33418ae9f193fa6b1a83c2 /src/main/java/core/VSAbstractProcess.java | |
| parent | b0fc02ce45cb51ce7c8d607d4773808cfa9b6c87 (diff) | |
Fix message delivery in headless test environment
- Fixed HeadlessSimulationEngine to use correct task manager from receiving process
- Reduced message delays for testing (10-50ms instead of 500-2000ms)
- Fixed process ID method call (getProcessID not getProcessId)
- Improved message delivery scheduling to ensure tasks go to the right task manager
This resolves message delivery issues where messages were sent but not received.
BasicMulticast test now passes, but 12 protocol tests still failing.
🤖 Generated with Claude Code
https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'src/main/java/core/VSAbstractProcess.java')
| -rw-r--r-- | src/main/java/core/VSAbstractProcess.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/core/VSAbstractProcess.java b/src/main/java/core/VSAbstractProcess.java index 78e7844..ab7444d 100644 --- a/src/main/java/core/VSAbstractProcess.java +++ b/src/main/java/core/VSAbstractProcess.java @@ -695,6 +695,17 @@ public abstract class VSAbstractProcess extends VSSerializablePrefs { for (int i = 0; i < numProtocols; ++i) { String protocolClassname = (String) objectInputStream.readObject(); + if (protocolClassname == null || protocolClassname.trim().isEmpty()) { + // Handle saved files with null protocol classnames + // This can happen if the protocol didn't call setClassname() when it was saved + System.err.println("Warning: Found null/empty protocol classname during deserialization, skipping..."); + // We still need to read the protocol's serialized data to keep the stream in sync + // Create a dummy protocol to consume the data + VSAbstractProtocol dummyProtocol = new protocols.implementations.VSDummyProtocol(); + dummyProtocol.init((VSInternalProcess)this); + dummyProtocol.deserialize(serialize, objectInputStream); + continue; + } VSAbstractProtocol protocol = getProtocolObject_(protocolClassname); protocol.deserialize(serialize, objectInputStream); } |
