View Single Post
  #1   Spotlight this post!  
Unread 29-01-2013, 17:21
Rambunction Rambunction is offline
Registered User
FRC #4330
 
Join Date: Jan 2013
Location: St. Louis
Posts: 5
Rambunction is an unknown quantity at this point
Cannot create an RGBImage instance

Right now our robot doesn't have a camera on it so we're trying to run a local program with the wpilibj libraries. We're loading an image taken from last year onto the program but we can't get it to do anything. We simplified the code down to just the declaration:
Code:
new RGBImage();
Which results in this error:
Code:
Exception in thread "main" java.lang.ExceptionInInitializerError
	at edu.wpi.first.wpilibj.image.Image.<init>(Image.java:24)
	at edu.wpi.first.wpilibj.image.ColorImage.<init>(ColorImage.java:16)
	at edu.wpi.first.wpilibj.image.RGBImage.<init>(RGBImage.java:20)
	at localapp.Optical.main(Optical.java:33)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to com.sun.squawk.Address
	at com.sun.squawk.NativeUnsafe.getInt(NativeUnsafe.java:340)
	at com.sun.squawk.NativeUnsafe.getUWord(NativeUnsafe.java:360)
	at com.sun.squawk.NativeUnsafe.getObject(NativeUnsafe.java:404)
	at com.sun.squawk.NativeUnsafe.getAddress(NativeUnsafe.java:414)
	at com.sun.squawk.GC.getKlass(GC.java:1077)
	at com.sun.cldc.jna.Pointer.createStringBuffer(Pointer.java:402)
	at com.sun.cldc.jna.TaskExecutor.<init>(TaskExecutor.java:105)
	at com.sun.cldc.jna.TaskExecutor.<init>(TaskExecutor.java:116)
	at edu.wpi.first.wpilibj.image.NIVision.<clinit>(NIVision.java:29)
	... 4 more
Java Result: 1
What are we doing wrong here?
Reply With Quote