BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 01-23-2010, 09:51 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2010
Model: 8900
PIN: N/A
Carrier: trainee
Posts: 30
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question camera demo problem

Please Login to Remove!

Hi!

when i test camera demo on my blackberry curve 8900, getting Null Pointer Exception.also while i test video recording, getting this exception.
dont know wher the prob.plz help me.
its urgent!!!!!!!!!!!!

Thanks and Regards
Neha
Offline  
Old 01-23-2010, 10:25 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You need to perform some basic problem determination, right? You need to figure out where the NPE is coming from.

First, you should be debugging by connecting the debugger to the device. This allows you to view the call stack and the source where the exception occurs.

You can also view the event log on the device. The exception should have placed a stacktrace in the log.

From the home screen, hold down <alt> and type L G L G
Offline  
Old 01-24-2010, 04:52 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2010
Model: 8900
PIN: N/A
Carrier: trainee
Posts: 30
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Reply

Hi!

thnks 4 ur response.actually i m getting Null pointer Exception at rc.startRecord().m posting my code:-

Player _player = javax.microedition.media.Manager.createPlayer("cap ture://video" );
_player.realize();
_rc = (RecordControl)_player.getControl( "RecordControl" );
_vc = (VideoControl)_player.getControl("VideoControl" );
Field videoField = (Field)_vc.initDisplayMode(VideoControl.USE_GUI_PR IMITIVE, "net.rim.device.api.ui.Field" );
add( videoField );
FileConnection conn = (FileConnection)Connector.open(PATH,Connector.READ _WRITE);
if(!conn.exists())
conn.create();
stream = conn.openOutputStream();
_rc.setRecordStream(stream);
_rc.startRecord();
_player.start();
Thread.currentThread().sleep(5000);
_rc.commit();
_player.stop();
_player.deallocate();
_player.close();
conn.close();
stream.close();


plz help me in resolving this issue.

thanks and regards,
Neha
Offline  
Old 01-24-2010, 09:45 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Looks like either _rc is null or your stream is null.

You need the stack trace.
Offline  
Old 01-25-2010, 12:59 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2010
Model: 8900
PIN: N/A
Carrier: trainee
Posts: 30
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default reply

Hi!

thanks 4 ur reply.can u tell me how to do OnDevice debugging.actually on attaching my phone with debugger hangs my device and nothing happens,while on output window on pc its showing "Debugger is attached successfully".

Thanks and Regards,
Neha
Offline  
Old 02-09-2010, 06:13 AM   #6 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2010
Model: 8900
PIN: N/A
Carrier: trainee
Posts: 30
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default reply

Hi!

now i m able to record video clip,but when i chk video file property,
its giving 176kb 0*0 mp4.
why this error is comming.

i have one more question,video recording is possible on blackberry os 4.6.1 or not?

Thanks and Regards,
Neha
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.