Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Program crashes in recorder.dll

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-08-2008, 08:27 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default Program crashes in recorder.dll

Hi Erel,

My recorder program crashes in the statement WaveIn.Save(RecPath & Now & ".wav"). The recording, however, is correctly saved. The error message is NullReferenceException.

In my program the recording can be stopped in two ways, either by the user clicking a button or by the program itself.

The elapsed time of the recording is monitored by the program using a timer and is compared with the maximum set in the statement WaveIn.Start(Duration*1000). When the maximum is reached, the program stops the recording

In both cases a routine is called which executes the the following two statements:

WaveIn.Stop
WaveIn.Save(RecPath & Now & ".wav")

The error occurs only when the user stops the recording, so before the maximum recording time has elapsed. When the program stops the recording everything is OK.

The detailed error information I got when running in debug mode on the device is:

Basic4PPC.exe
NullReferenceException
at WaveFile.InitBuffer()
at WaveFile.BlockDone()
at SoundMessageWindow.WndProc()
bij (dutch for at) Microsoft.WindowsCE.Forms.MessageWindow._WndProc()
bij Microsoft.AGL.Forms.EVL.EnterMainLoop()
bij System.Windows.Forms.Application.Run()
bij Dbasic.Form1.Main()

Any idea what is going wrong?

Harry
Reply With Quote
  #2 (permalink)  
Old 03-08-2008, 02:01 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Does this error appear when you try the recorder example: http://www.basic4ppc.com/forum/additional-libraries/1311-recorder.html ?
Reply With Quote
  #3 (permalink)  
Old 03-08-2008, 04:05 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default

Erel,

The demonstation program runs well. Only an error, but totally different, when I press Stop_Save twice. However, when I change the recording time to be WaveIn.Start(100000) , so 10 times longer, and then make a short recording, the same error occurs as I mentioned in my first message.

Harry
Reply With Quote
  #4 (permalink)  
Old 03-08-2008, 04:35 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I've sent you an update which should solve this problem.
Please tell me if it did solve it.
Reply With Quote
  #5 (permalink)  
Old 03-09-2008, 09:35 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default

Hi Erel,

Thanks for your quick support. Now it works fine!

Harry
Reply With Quote
  #6 (permalink)  
Old 03-09-2008, 07:26 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The updated version could be downloaded here: http://www.basic4ppc.com/forum/additional-libraries/1311-recorder-post10395.html
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
player-recorder derez Share Your Creations 5 11-23-2009 07:59 PM
Recorder Erel Additional Libraries 11 12-23-2008 04:36 PM
IDE crashes on device kolbe Bug Reports 3 08-16-2008 09:27 AM
Calendar Recorder Rioven Share Your Creations 5 10-21-2007 06:55 AM
Open serial port crashes program on device Steve Bug Reports 2 05-23-2007 09:52 PM


All times are GMT. The time now is 08:55 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0