Export to GitHub

controlp5 - issue #60

Textfield IllegalArgumentException


Posted on Sep 9, 2012 by Quick Camel

What steps will reproduce the problem? 1. Try to interact with a textfield in Processing 2.0b1

What is the expected output? What do you see instead? Expected to be able to write (or move the cursor if there's text) inside a textfield. IllegalArgumentException instead:

java.lang.NullPointerException at processing.mode.java.runner.Runner.findException(Runner.java:664) at processing.mode.java.runner.Runner.reportException(Runner.java:609) at processing.mode.java.runner.Runner.exception(Runner.java:552) at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367) at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255) at processing.mode.java.runner.EventThread.run(EventThread.java:89) Exception in thread "Animation Thread" java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1076) at processing.core.PApplet.handleKeyEvent(PApplet.java:2848) at processing.core.PApplet.dequeueKeyEvents(PApplet.java:2793) at processing.core.PApplet.handleDraw(PApplet.java:2132) at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:197) at processing.core.PApplet.run(PApplet.java:1998) at java.lang.Thread.run(Unknown Source)

What version of the product are you using? On what operating system? Processing 2.0b1 and ControlP5 0.7.6 on GNU/Linux Ubuntu 10.04 LTS with Java(TM) SE Runtime Environment (build 1.7.0_07-b10)

Please provide any additional information below. You can use the following code to reproduce the error:

import controlP5.*;

ControlP5 cp5;

void setup() { size(256, 256); smooth();

cp5 = new ControlP5(this); cp5.addTextfield("BUG") .setPosition(8, 8) .setSize(128, 20); }

void draw() { background(0); }

Just try to write something inside the textfield. Works fine in the same computer with Processing 1.5.1

Comment #1

Posted on Sep 9, 2012 by Quick Camel

It also fails with the new version of ControlP5:

ControlP5 1.5.1 infos, comments, questions at http://www.sojamo.de/libraries/controlP5 java.lang.NullPointerException at processing.mode.java.runner.Runner.findException(Runner.java:664) at processing.mode.java.runner.Runner.reportException(Runner.java:609) at processing.mode.java.runner.Runner.exception(Runner.java:552) at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367) at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255) at processing.mode.java.runner.EventThread.run(EventThread.java:89) Exception in thread "Animation Thread" java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1076) at processing.core.PApplet.handleKeyEvent(PApplet.java:2848) at processing.core.PApplet.dequeueKeyEvents(PApplet.java:2793) at processing.core.PApplet.handleDraw(PApplet.java:2132) at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:197) at processing.core.PApplet.run(PApplet.java:1998) at java.lang.Thread.run(Unknown Source)

Comment #2

Posted on Sep 9, 2012 by Happy Rhino

the latest version as of now is 1.5.1 which is only working with processing 1.5.1 and earlier as pointed out here http://code.google.com/p/controlp5/downloads/detail?name=controlP5-1.5.1.zip .

Since there have been many new features, updates, changes and surprises with processing 2.0, controlP5 as is unfortunately breaks and needs to be adjusted. An updated version for post processing 1.5.1 will be available shortly, controlp5's version number will indicated this by changing to 2.0

Comment #3

Posted on Jan 22, 2013 by Happy Rhino

(No comment was entered for this change.)

Status: Accepted

Labels:
Type-Defect Priority-Medium