scala.UninitializedFieldError: Uninitialized field

200 views
Skip to first unread message

William la Forge

unread,
Jun 24, 2010, 10:26:15 AM6/24/10
to scala-fresh, Mohamed Naji
I'm wondering if anyone is encountering the same error we are with Scala, or if (hopefully) this is a known problem...

The  problem occurs when creating an instance of a class with about 20 var. The error is random and occurs [significantly] less than one time in a million instance creations. In particular, for us it is occurring when we create a reactor and send it a message. Apparently the reactor starts processing the message before all of its variables are initialized.

scala.UninitializedFieldError: Uninitialized field

We do have a work around--don't use a null initial value:

var longMsgType: Option[String] = None

This complicates our code a bit, and we are loath to use it in all our code. 

Ideas? Comments? Suggestions? 
We're using Scala RC6. Is chckinit turned on by default? Can we turn it off???

Bill

Kevin Wright

unread,
Jun 24, 2010, 10:33:26 AM6/24/10
to lafo...@gmail.com, scala...@googlegroups.com
I'd try this again on the core scala mailing list...

scala-fresh is absolutely not the right place!



--
You received this message because you are subscribed to the Google Groups "Scala Fresh" group.
To post to this group, send email to scala...@googlegroups.com.
To unsubscribe from this group, send email to scala-fresh...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scala-fresh?hl=en.



--
Kevin Wright

mail/google talk: kev.lee...@gmail.com
wave: kev.lee...@googlewave.com
skype: kev.lee.wright
twitter: @thecoda

Reply all
Reply to author
Forward
0 new messages