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

NullPointerException #10

Open
GoogleCodeExporter opened this issue Mar 13, 2015 · 6 comments
Open

NullPointerException #10

GoogleCodeExporter opened this issue Mar 13, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Download fidgen-0003.src.zip
2. Open Fidgen.pde
3. NullPointerException shown with the following error messages:
--------------------------------------------------------------------
creating FidStore...
ControlP5 0.5.4 infos, comments, questions at 
http://www.sojamo.de/libraries/controlP5
added new fiducial, this session: 1 total: 1

Exception in thread "Animation Thread" java.lang.NullPointerException
    at FidGen$FiducialNode.update(FidGen.java:460)
    at toxi.physics.VerletPhysics.updateParticles(Unknown Source)
    at toxi.physics.VerletPhysics.update(Unknown Source)
    at FidGen.draw(FidGen.java:119)
    at processing.core.PApplet.handleDraw(PApplet.java:1425)
    at processing.core.PApplet.run(PApplet.java:1327)
    at java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------------

What is the expected output? What do you see instead?
The expected output is a fiducial marker generator window but what instead, I 
saw blank window with the above error and the processing IDE stopped at this 
line --->     Iterator i=blacks.iterator();

What version of the product are you using? On what operating system?
Fidgen-0003.src.zip on Windows XP and Processing 1.0.9

Please provide any additional information below.



Original issue reported on code.google.com by yanto.e...@gmail.com on 2 Mar 2011 at 2:46

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Here is the screenshot of the error:
http://dl.dropbox.com/u/2454125/20110302_fidgen_error.PNG

Original comment by yanto.e...@gmail.com on 2 Mar 2011 at 2:54

Attachments:

@GoogleCodeExporter
Copy link
Author

I' am also having this problem, were you able to slove it?

Original comment by franceso...@gmail.com on 12 Jul 2011 at 1:13

@GoogleCodeExporter
Copy link
Author

The problem seems to be with the physics.update() function. Whenever the 
physics.update() code is run, which happens the second time that FidGen.pde's 
draw function is executed, the code falls over. By commenting out this line 
(see below) the screen shows up as expected. I'm not sure yet what effect 
commenting out this line will have on the program.

//partial code
 noStroke();
  pushMatrix();
  pushMatrix();
  //*************************************************************
  //when this code is executed the Null Pointer Exception occurs
  //physics.update();
  //*************************************************************
  println("Second fid.update: ");
  fid.update();

  AABB bounds=fid.getBounds();

Any clues why this is happening or the effects of commenting out this code?

Original comment by martyma...@gmail.com on 13 Jul 2011 at 1:08

@GoogleCodeExporter
Copy link
Author

Seems that one of the nodes after initilialising procedure is not instanced.
i solved this pragmatically by adding a new code line like this:

  [add in Fiducial.pde]
...
  void update() {
    // ******** add new row here ********
    if (blacks == null) return;
    // ******** end update: ********
    avgBlack=new Vec3D();
    Iterator i=blacks.iterator();
    while(i.hasNext()) {....

in my case, it works after this patch regular. hope this helps.

Original comment by i...@schwemberger.de on 20 Jul 2011 at 9:06

@GoogleCodeExporter
Copy link
Author

Hello guys... I´m having exactly the same problem, any ideas if there are 
problem running Fid.gen in Windows 7 64 bits?

Im new in to processing, and cannot fix code problems by my self...

I´m having this message "The constructor VerletParticle (Vec3D) in undefined"

and this line of code gets highlighted (where it says "super (pos);")

...
public FiducialNode(FiducialNode p, int numChildren, Vec3D c, Vec3D pos) {
    super(pos);
    parent=p;
    if (p!=null) level=p.level+1;
    centre=c;
...

Any help will be apreciated...
Thanks in advance.
Julian.

Original comment by basin...@gmail.com on 7 Sep 2011 at 10:01

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

No branches or pull requests

1 participant