We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Problem exporting application
Page Index Toggle Pages: 1
Problem exporting application (Read 912 times)
Problem exporting application
Jul 23rd, 2008, 4:20pm
 
Hi all!!!
I'm a newbie of processing, and i've encountered a big problem. I write a processing sketch, when i export this sketch using "Export Application" (using Shift+cmd+E) from the File menù, i've got this error:


java.lang.NullPointerException
at processing.app.Base.copyDir(Base.java:2111)
at processing.app.Sketch.exportApplication(Sketch.java:2221)
at processing.app.Editor$41.run(Editor.java:1583)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:189)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:478)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
34)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184
)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)



Anyone can help me????

Thanks a lot!   (And excuse me for my BAAAD english)!
Re: Problem exporting application
Reply #1 - Jul 23rd, 2008, 8:34pm
 
Mmm, this kind of issue is probably better to put in the bug database, I think, unless it is just a setting issue.

To help the authors to find the bug, you should indicate:
- Which system you use (MacOS, obviously, but which version?)
- Which Processing version you have (probably 0142, but be explicit)
- Where you put your sketches
- If you get this error in all cases (ie. with even a simple sample, for example) or only with a given sketch (what is there?)

HTH.
Re: Problem exporting application
Reply #2 - Jul 24th, 2008, 5:17pm
 
Thanks a lot for your response!
So, i send all these information to the Processing Bug Report.

For your information, i use Processing 0135 Beta with a macbook with Leopard 10.5.4.
This error come every time i try to export any sketches using Shift+cmd+E.
I put my sketches in one folder located in my Desktop.

This is the code, for any suggestion:




import hypermedia.video.*;

PImage img;
OpenCV opencv;

// contrast/brightness values
int contrast_value    = 0;
int brightness_value  = 0;



void setup() {

 size( 640, 480 );
 PImage a;  // Declare variable "a" of type PImage
 img = loadImage("Max.png"); // Load the images into the program

 opencv = new OpenCV( this );
 opencv.capture( width, height );                   // open video stream
 opencv.cascade( OpenCV.CASCADE_FRONTALFACE_ALT );  // load detection description, here-> front face detection : "haarcascade_frontalface_alt.xml"


 // print usage
 println( "Drag mouse on X-axis inside this sketch window to change contrast" );
 println( "Drag mouse on Y-axis inside this sketch window to change brightness" );

}


public void stop() {
 opencv.stop();
 super.stop();
}



void draw() {

 // grab a new frame
 // and convert to gray
 opencv.read();
 opencv.convert( GRAY );
 opencv.contrast( contrast_value );
 opencv.brightness( brightness_value );

 // proceed detection
 Rectangle[] faces = opencv.detect( 1.2, 2, OpenCV.HAAR_DO_CANNY_PRUNING, 40, 40 );

 // display the image
 image( opencv.image(), 0, 0 );


 // draw face area(s)
 noFill();
 stroke(255,0,0);
 for( int i=0; i<faces.length; i++ ) {
     image(img, faces[i].x+180, faces[i].y-200);
  // image(img, faces[i].width, faces[i].height );
 }
}



/**
* Changes contrast/brigthness values
*/
void mouseDragged() {
 contrast_value   = (int) map( mouseX, 0, width, -128, 128 );
 brightness_value = (int) map( mouseY, 0, width, -128, 128 );
}





Thanks a lot PhiLho!
Re: Problem exporting application
Reply #3 - Jul 27th, 2008, 1:20am
 
The export problem should be fixed in more recent releases, try using 0142.
Page Index Toggle Pages: 1