Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteActors: Failure to deserialize incoming message is swallowed silently #5698

Closed
scabug opened this issue Apr 23, 2012 · 3 comments
Closed

Comments

@scabug
Copy link

scabug commented Apr 23, 2012

Sending a message to a remote actor which cannot be deserialized fails with no exception appearing in stdout or stderr. In the attached files, if you do the following:

compile message.scala under 2.9.1

compile and run server.scala under 2.9.1

compile and run Client.scala under 2.9.2

You will see that nothing is printed to either stdout or stderr. What is happening is that the serialized form of the case object message which is being sent by the client has a different serialVersionUID as that on the server (see [https://issues.scala-lang.org/browse/SI-5697]). This exception should not be swallowed.

package client

object Client extends App {

  val peer = actors.remote.Node("localhost", 23456)
  val a = actors.remote.RemoteActor.select(peer, 'test)
  a ! common.TestMsg
}
package common

case object TestMsg
package server

object Server extends App {
  class ServerActor extends actors.Actor {
    def act() {
      actors.remote.RemoteActor.alive(23456)
      actors.remote.RemoteActor.register('test, actors.Actor.self)
      loop {
        react {
          case common.TestMsg => println("Yay!")
        }
      }
    }
  }
  val a = new ServerActor
  a.start()
}
@scabug
Copy link
Author

scabug commented Apr 23, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5698?orig=1
Reporter: @oxbowlakes
Affected Versions: 2.9.2
Attachments:

  • Client.scala (created on Apr 23, 2012 2:08:10 PM UTC, 182 bytes)
  • message.scala (created on Apr 23, 2012 2:08:10 PM UTC, 37 bytes)
  • Server.scala (created on Apr 23, 2012 2:08:10 PM UTC, 378 bytes)

@scabug
Copy link
Author

scabug commented May 2, 2012

@axel22 said (edited on May 2, 2012 1:49:36 PM UTC):
Verified, using 2.9.1 to run the server and 2.9.2. to run the client results in no error message on the server. A pending test added in pending/run.

@scabug
Copy link
Author

scabug commented Dec 13, 2012

@adriaanm said:
actors have migrated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants