×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Location
    IL/USA
    Posts
    341

    Angry Error with most basic Operation ... PLEASE HELP!!! COULD BE BUG IN FIRMWARE

    Hello,
    I am getting error with the most basic mmapi program possible. it says that Symbian OS error: -5. I'm using 6630 firmware: V4.03.38 25-04-05 RM-1. this is a very basic program please look at source below and tell me what the error could be!!! Is this another bug with fw: v4.03 ???

    Error Message taken from Nokia System.out/System.err debug Tool
    ---------------------
    Code:
    Callback threw: java.lang.NullPointerException:   0
    Create Player...
    javax.microedition.media.MediaException: Symbian OS error: -5
     - javax.microedition.media.Manager.createPlayer(), bci=138
     - javax.microedition.media.Manager.createPlayer(), bci=191
     - VideoCanvas$1.run(), bci=14
    MIDLET CODE
    ----------------------
    Code:
    import javax.microedition.lcdui.*;
    import javax.microedition.media.*;
    import javax.microedition.media.control.VideoControl;
    import javax.microedition.midlet.MIDlet;
    
    public class VideoCanvas extends Canvas implements CommandListener
    {
        private MIDlet midlet;
        private Thread thread;
        private Player player;
        private VideoControl videoControl;
        private Canvas canvas;
    
        public VideoCanvas(javax.microedition.midlet.MIDlet _midlet)
        {
    	this.midlet = _midlet;
    	this.canvas = this;
    	Thread thread = new Thread() {
    	    public void run(){
    		System.err.println("Create Player...");
    		try
    		{
    		    player = Manager.createPlayer("capture://video");
    		    player.realize();
    		    videoControl = (VideoControl)player.getControl("VideoControl");
    		    videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, canvas);
    		    int wh = 100;
    		    videoControl.setDisplayLocation(0, 0);
    		    videoControl.setDisplaySize(wh, wh);
    		    videoControl.setVisible(true);
    		    player.start();
    		}
    		catch(Exception e)
    		{
    		    e.printStackTrace();
    		    System.err.println("..........................................................................................................................................................................................");
    		}
    	    }
    	};
    	thread.start();
        }
        public void keyPressed(int keyCode)
        {
    	if (keyCode == '0')
    	    midlet.notifyDestroyed();
        }
        public void paint(Graphics g){}
        public void commandAction(Command c, Displayable d){
    	Display.getDisplay(midlet).setCurrent(this);
        }
    }
    Code:
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Display;
    import javax.microedition.midlet.MIDlet;
    
    public class VideoMIDlet extends MIDlet
    {
        VideoCanvas vc;
        public void startApp()
        {
    	vc = new VideoCanvas(this);
    	Display.getDisplay(this).setCurrent(vc);
        }
        public void pauseApp()
        {
        }
        public void destroyApp(boolean unconditional)
        {
        }
    }
    Last edited by earamsey; 2005-12-02 at 19:17.

Similar Threads

  1. Strange bug on N3650 with Firmware 4.13
    By NeoEgoism in forum Symbian
    Replies: 1
    Last Post: 2004-05-04, 04:08
  2. Strange bug on N3650 with Firmware 4.13
    By NeoEgoism in forum General Development Questions
    Replies: 0
    Last Post: 2004-05-03, 12:13
  3. Firmware bug or code bug displaying list on 3650
    By blackjack75 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-24, 19:52
  4. Bug at 5.50 firmware for 6310i?
    By begis in forum General Messaging
    Replies: 0
    Last Post: 2003-05-09, 14:49
  5. Is the latest firmware for 3650 V 2.50? + 7650 HTTP bug
    By chrisnsx in forum Mobile Java General
    Replies: 0
    Last Post: 2003-04-15, 03:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •