Sitemap

Amicuk Programming Answers

Advise on debugging?

2015-10-11   Views:0

Advertisement

Hello, Could I ask, does this error mean the Render method cannot loop through the frames of the avi? Because the .avi could not be found? Thank you java.lang.NullPointerException at MyCustomCanvas.render(FrameRenderer.java:90) at MyCustomCanvas.pain

Hello,
Could I ask, does this error mean the Render method cannot loop through the frames of the avi?
Because the .avi could not be found?
Thank you
java.lang.NullPointerException
at MyCustomCanvas.render(FrameRenderer.java:90)
at MyCustomCanvas.paint(FrameRenderer.java:82)
at sun.awt.RepaintArea.paint(RepaintArea.java:177)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
at java.awt.Component.dispatchEventImpl(Component.java:3678)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import javax.media.*;
import javax.media.control.*;
import javax.media.protocol.*;
import javax.media.util.*;
import javax.media.format.*;
public class FrameRenderer extends java.awt.Frame {
   public FrameRenderer() {
      super("");
      this.add(new MyCustomCanvas());
      this.setSize(500,500);
      this.show();
      addWindowListener(new WindowEventHandler());
   class WindowEventHandler extends WindowAdapter{
      public void windowClosing(WindowEvent e) {
         System.exit(0);
   public static void main(String[] args) {
      new FrameRenderer();
class MyCustomCanvas extends Canvas {
   MediaLocator videoSource = new
   MediaLocator("c:waiting.avi");
   Player p;
   FramePositioningControl positioner;
   FrameGrabbingControl grabber;
   VideoFormat vFormat;
   Buffer buffer;
   BufferToImage bToImage;
   java.awt.Image captured;
   public MyCustomCanvas() {
      try {
         Manager.setHint(Manager.PLUGIN_PLAYER, new Boolean(true));
         p = Manager.createRealizedPlayer(videoSource);
         positioner = (FramePositioningControl) p.getControl(
              "javax.media.control.FramePositioningControl");
         if(positioner == null) {
            System.err.println("Error in Getting Positioning Control");
            System.exit(1);
         grabber = (FrameGrabbingControl) p.getControl(
              "javax.media.control.FrameGrabbingControl");
         if(grabber == null) {
            System.err.println("Error in Getting Grabber Control");
            System.exit(1);
      } catch (IOException ioe) {
      } catch (NoPlayerException nple) {
      } catch (CannotRealizeException cre) {
   public void update(Graphics g) {
      paint(g);
   public void paint(Graphics g) {
      Graphics2D g2d = (Graphics2D) g;
      render(g2d);
      System.exit(1);
   public void render(Graphics2D g2d) {
      int i = 1;
      for(;i < 100;i++) {
         positioner.seek(i);
         buffer = grabber.grabFrame();
         vFormat = (VideoFormat) buffer.getFormat();
         bToImage = new BufferToImage(vFormat);
         captured = bToImage.createImage(buffer);
         g2d.drawImage(captured,0,0,null);
         synchronized (this) {
         try {
            wait(100);
         } catch (InterruptedException ie) {}
}

The replay answer
Advertisement
also replce the following line
MediaLocator videoSource = new
MediaLocator("c:waiting.avi");
with [
MediaLocator videoSource = new
   MediaLocator("c:\\waiting.avi");
/code]                                                                                                                                                                                                                                                                                                                                                                                       

Go to See the other 15 answers

Advise on debugging?

Category:DefaultRelease time:2015-10-11Views:130

Hello, Could I ask, does this error mean the Render method cannot loop through the frames of the avi? Because the .avi could not be found? Thank you java.lang.NullPointerException at MyCustomCanvas.render(FrameRenderer.java:90) at MyCustomCanvas.pain[More]

How to debug a report in production server

Category:DefaultRelease time:2015-10-11Views:130

hello all, how to debug a report in production ... do i need to BREAK statement of that particular user..... thanks in advance....Vinay, Process of Debugging in Production will be same as in Development or Quality. But,it is not advisable to debug in[More]

REGORDING DEBUGGING

Category:DefaultRelease time:-0001-11-30Views:130

13.     If u set a break-point between select and endselect , a dump is likely to happen .Why A     Debugging forces a commit work while the LUW for the select is not complete until all the records for the where clause is not fetched. Hence a LUW cla[More]

Create cl_crm_bol_entity and commit doesn't work!

Category:DefaultRelease time:2015-10-11Views:130

When i select a row in my first tableview the my second tableview will be filled. In my second tableview i have a insert button to insert an extra record in the tableview. I redefined the EH_ONINSERT event with the following code: DATA: lr_wrapper  [More]

Max (log_Sequence) not  increasing

Category:DefaultRelease time:-0001-11-30Views:130

Max(log_sequence) is not increasing even after enabling the profile option for debugging SQL> select max (log_Sequence) from fnd_log_messages; MAX(LOG_SEQUENCE) 993232471 What could be the issue here...?You did not provide details about the profile o[More]

Still having navigation problems and need help with how to debug

Category:DefaultRelease time:2015-10-11Views:130

Hi, I've been porting over a servlet project to JSF and I'm still having navigation problems. I thought the problem might have been because the original project used HTML frames and so the "from-view-id" JSP defined the frame/framesets and the s[More]

Kernel panics & grey debug screen at startup

Category:DefaultRelease time:2015-10-11Views:130

Tiger (10.4.10) on a 2 GHz Mac mini (Intel) and Airport as well as IPv6 disabled. Not sure which torrent client I installed first but I think it was Transmission and everything was fine. Then I installed Azureus on the advise of a friend and started[More]

How to debug a form (servlet) in the Forms and Reports Server

Category:DefaultRelease time:2015-10-11Views:130

Hi: I have a new install of an application that ran perfectly on a different host using the Forms and Reports Server. I have installed the FRS on the new host and it is working fine. I can run the test form. When I run my actual forms app, I only get[More]

Unable to use debug mode for x64 application and debug doesn't work when target cpu set to x86

Category:DefaultRelease time:2015-10-11Views:130

I am attempting to familiarize myself with Visual Basic programming in Visual Studio 2008, using the Visual Basic Guided Tour in Microsoft Visual Studio 2008 Documentation, and have run into a bit of a road-block.  When following the lesson "It Doesn[More]

How do you choose a particular Channel from an Advise.vi to perform an Array Max & Min.vi on that particular channel only?

Category:DefaultRelease time:2015-10-11Views:130

Reading all the channels for a FP-AI-100 through an Advise.vi but I need to read the Max & Min from channels 0 & 1. How is this done? ThanksThe easiest way is to use two copies of the Index Array function. You would wire the output from FP Advise.[More]

How to collect debug logs for custom module only in EBS by AppsLog.write?

Category:DefaultRelease time:2015-10-11Views:130

Hi, Customer is trying to retrieve logs for their custom module (XXKCZ) and put it to /log/kcz.log by using AppsLog.write() method. (refer to sample code below) Customer has set these profile values in the application level and removed the values in[More]

Hot
Everytime I try to update my apps or download new ones (which are free), my iPad says there is a payment issue when I then enter my bank details in it says it's declined, there is money in my account and the apps I want and downloads are free ?? It's [More]
Hi , I have a photosmart 5520 and tried to set up an email address for my printer when I installed the printer.  At the time. the HP site was down for maintanence and I have a very long an complicated email address now that I will never ever remember [More]
Or do I need a separate EHD for that? I'm trying to make an ancient 2008 MBP (running OS X 10.6.8, 2.5 GHz Intel Core 2 Duo, 2 GB 667 MHZ DDR2 SDRAM) last me for another 6-9 mos. With my hard drive about full I ordered an EHD and copied my iPhoto lib [More]
Hello I am seeing jvm crashes when running applications on linux, with java2 SE, 1.3.1. These crashes do not happen on the solaris jdk. It is actually a jvm crash, not an Error or Exception. This only happens after I call JPopupMenu.setDefaultLightWe [More]
I have a PDF Form with the Process Fields component attached.<br /><br />In the FSSubmit component, I have set the URL to <br />http://localhost:8080/soap/services/SAPS_Submission?wsdl, <br />where SAPS_Submission is the name of my [More]
What preference should we import full HD 1080i into iMovie 08? Full 1920x1080 or Large 960x540? My first import was Full. But all the share options (iTunes, Web Gallery) in iMovie 08 are Large 960x540. I tried to share via quicktime which gives you t [More]
I'm experimenting with Closed Captions in Captivate 3. I'd like the text in the caption to remain on the screen until the end of the slide. Seems like the text (by default) goes away as soon as the last syllable of audio has been spoken. I've tried a [More]
Hi experts, We are enhancing the file upload functionalities with setting the readers of the documents. The upload user is not admin user but he can have the full control or permission owner of the folder, but we found he can't still setting the ACL [More]
Hi Experts, We want to let users to upload files to application server. The number of files can potencially grow over time (1000 files every month) though I whould like to limit size of each file not more than 1-2 MB. Also files should be classified [More]
Hello, I am getting short dump said above at EBP release 700 . To create shopping cart  when click on link shop on home page,  error message shown  "Exception condition "LOG_ACCESS_ERROR" raised". Dump is generated showing  RAISE state [More]