Burning a huge number of files!

vbimport

#1

Hi,
I am using NeroApi with VB6. I am developing an application that should be able to burn about 40 000 html file on a cd or a dvd! Is there any recommended burning settings for such a task? Is there a limited number of files to burn?
I’ve provided a log of a failed burn session.
Cheers

Reading directories
Creating directories
Checking discs
Writing to cache
Caching of files started
Caching of files completed
Writing to disc
Burn process started at 4x (600 KB/s)
Writing tracks
Invalid block address
Writing lead-in and lead-out
Invalid write state
_NEC DVD+RW ND-1100A\H1 T1
Could not perform EndTrack
Burn process failed at 4x (600 KB/s)


Windows XP 5.1
IA32
WinAspi: File 'Wnaspi32.dll': Ver=4.71 (0001), size=45056 bytes, created 06/11/02 11:21:42 
ahead WinASPI: File 'C:\Program Files\Ahead\Nero\Wnaspi32.dll': Ver=2.0.1.74, size=164112 bytes, created 26/10/04 16:21:30 
Nero API version: 6.6.0.6
Using interface version: 6.3.1.24
Installed in: C:\Program Files\Ahead\Nero\
Application: Nero - Burning Rom\ahead
Recorder:             <_NEC DVD+RW ND-1100A>    Version: 10FD - HA 1 TA 1 - 6.6.0.6
 Adapter driver:      <atapi>                   HA 1
 Drive buffer  :      2048kB
 Bus Type      :      default (0) -> ATAPI, detected: ATAPI 

=== Scsi-Device-Map ===
DiskPeripheral       : Maxtor 6Y080L0                   atapi Port 0 ID 0  DMA: On 
DiskPeripheral       : Maxtor 6E040L0                   atapi Port 0 ID 1  DMA: On 
CdRomPeripheral      : HL-DT-ST DVD-ROM GDR8162B        atapi Port 1 ID 0  DMA: On 
CdRomPeripheral      : _NEC DVD+RW ND-1100A             atapi Port 1 ID 1  DMA: On 

=== CDRom-Device-Map ===
HL-DT-ST DVD-ROM GDR8162   D:   CDRom0
_NEC DVD+RW ND-1100A       E:   CDRom1
=======================

AutoRun : 1
Excluded drive IDs: 
WriteBufferSize: 74448896 (0) Byte
ShowDrvBufStat : 0
BUFE           : 0
Physical memory     : 510MB (523244kB)
Free physical memory: 311MB (319096kB)
Memory in use       : 39 %
Uncached PFiles: 0x0
Use Inquiry    : 1
Global Bus Type: default (0)
Check supported media : Disabled (0) 

14.2.2005
NeroAPI
10:31:58	#1 SCSI -1065 File Cdrdrv.cpp, Line 1178
	SCSI Exec, HA 1, TA 1, LUN 0, buffer 0x03F15000
	Status:     0x04 (0x01, SCSI_ERR)
	HA-Status   0x00 (0x00, OK)
	TA-Status   0x02 (0x01, SCSI_TASTATUS_CHKCOND)
	Sense Key:  0x05 (KEY_ILLEGAL_REQUEST)
	Sense Code: 0x20
	Sense Qual: 0x00
	CDB Data:   0xFA 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x06 0x00 0x00 0x00 
	Sense Data: 0x70 0x00 0x05 0x00 0x00 0x00 0x00 0x0A 
	            0x00 0x00 0x00 0x00 0x20 0x00 
	
10:32:18	#2 Text 0 File Reader.cpp, Line 127
	Reader running
	
10:32:18	#3 Text 0 File Writer.cpp, Line 122
	Writer _NEC     DVD+RW ND-1100A  running
	
10:32:18	#4 Text 0 File AudioCompilationImpl.cpp, Line 842
	DRM: StartDrmRecording(RealRec:1, ImageRec:0, Copies:1)
	DRM: Beginning burn process.
	
10:32:18	#5 ISO9660GEN -11 File geniso.cpp, Line 3286
	First writeable address = 0 (0x00000000)
	
11:23:44	#6 Text 0 File Burncd.cpp, Line 3155
	Turn on Track-At-Once, using CD-R/RW media
	
11:23:44	#7 Text 0 File DlgWaitCD.cpp, Line 257
	Last possible write address on media:   359848 ( 79:59.73)
	Last address to be written:             270249 ( 60:05.24)
	
11:23:44	#8 Text 0 File DlgWaitCD.cpp, Line 269
	Write in overburning mode: NO
	
11:23:44	#9 Text 0 File DlgWaitCD.cpp, Line 2311
	Recorder: _NEC DVD+RW ND-1100A;
	   CDRW code: 00 97 34 23; OSJ entry from: Mitsubishi Chemical
	   ATIP Data:
	     Special    Info [hex] 1: A3 00 CF, 2: 61 22 17 (LI 97:34.23), 3: 4F 3B 4A (LO 79:59.74)
	     Additional Info [hex] 1: 24 2C DC, 2: 14 A4 4A, 3: 04 C4 80
	
11:23:44	#10 Text 0 File DlgWaitCD.cpp, Line 431
	>>> Protocol of DlgWaitCD activities: <<<
	=========================================
	
11:23:44	#11 Text 0 File ThreadedTransferInterface.cpp, Line 829
	Setup items (after recorder preparation)
	 0: TRM_DATA_MODE1 ()
	    2 indices, index0 (150) not provided
	    original disc pos #0 + 270250 (270250) = #270250/60:3.25
	    relocatable, disc pos for caching/writing not required/ required, no patch infos
	    -> TRM_DATA_MODE1, 2048, config 0, wanted index0 0 blocks, length 270248 blocks [_NEC     DVD+RW ND-1100A]
	--------------------------------------------------------------
	
11:23:44	#12 Text 0 File ThreadedTransferInterface.cpp, Line 1042
	Prepare recorder [_NEC     DVD+RW ND-1100A] for write in TAO
	DAO infos:
	==========
	 MCN: ""
	 TOCType: 0x00; Session Closed, disc fixated
	 Tracks 1 to 1:
	   1: TRM_DATA_MODE1, 2048/0x00, FilePos             0        307200     553779200, ISRC ""
	DAO layout:
	===========
	 __Start_|____Track_|_Idx_|_CtrlAdr_|_RecDep__________
	    -150 |  lead-in |   0 |    0x41 | 0x00
	    -150 |        1 |   0 |    0x41 | 0x00
	       0 |        1 |   1 |    0x41 | 0x00
	  270250 | lead-out |   1 |    0x41 | 0x00
	
11:23:44	#13 Text 0 File ThreadedTransferInterface.cpp, Line 1110
	Removed 2 run-out blocks from end of track 1. Length: 270250 -> 270248.
	
11:23:48	#14 Phase 24 File APIProgress.cpp, Line 276
	Caching of files started
	
11:23:49	#15 Text 0 File Burncd.cpp, Line 4042
	Cache writing successful.
	
11:23:49	#16 Phase 25 File APIProgress.cpp, Line 276
	Caching of files completed
	
11:23:49	#17 Phase 36 File APIProgress.cpp, Line 276
	Burn process started at 4x (600 KB/s)
	
11:23:49	#18 Text 0 File ThreadedTransferInterface.cpp, Line 2604
	Verifying disc position of item 0 (relocatable, disc pos, no patch infos, orig at #0): write at #0
	
11:23:49	#19 Text 0 File Mmc.cpp, Line 21079
	Set BUFE: Buffer underrun protection -> OFF 
	
11:30:29	#20 Text 0 File Cdrdrv.cpp, Line 1284
	11:30:29.109 - _NEC DVD+RW ND-1100A\H1 T1 : Queue again later
	
11:30:33	#21 SCSI -1064 File Cdrdrv.cpp, Line 1432
	SCSI Exec, HA 1, TA 1, LUN 0, buffer 0x041C0000
	Status:     0x04 (0x01, SCSI_ERR)
	HA-Status   0x00 (0x00, OK)
	TA-Status   0x02 (0x01, SCSI_TASTATUS_CHKCOND)
	Sense Key:  0x05 (KEY_ILLEGAL_REQUEST)
	Sense Code: 0x21
	Sense Qual: 0x02
	CDB Data:   0x2A 0x00 0x00 0x01 0xCC 0x40 0x00 0x00 0x20 0x00 0x00 0x00 
	Sense Data: 0x70 0x00 0x05 0x00 0x00 0x00 0x00 0x0A 
	            0x00 0x00 0x00 0x00 0x21 0x02 
	
11:30:33	#22 CDR -1064 File Writer.cpp, Line 311
	Invalid block address
	
11:30:33	#23 Text 0 File ThreadedTransfer.cpp, Line 228
	all writers idle, stopping conversion
	
11:30:33	#24 Text 0 File ThreadedTransfer.cpp, Line 222
	conversion idle, stopping reader
	
11:30:36	#25 CDR -201 File WriterStatus.cpp, Line 200
	Invalid write state
	_NEC DVD+RW ND-1100A\H1 T1
	
11:30:36	#26 TRANSFER -18 File WriterStatus.cpp, Line 200
	Could not perform EndTrack
	
11:30:36	#27 Text 0 File Mmc.cpp, Line 15779
	<_NEC    DVD+RW ND-1100A > start Close Session
	
11:31:54	#28 Phase 38 File APIProgress.cpp, Line 276
	Burn process failed at 4x (600 KB/s)
	
11:31:55	#29 Text 0 File AudioCompilationImpl.cpp, Line 867
	DRM: DRM burn session terminated.
	
11:31:55	#30 Text 0 File AudioCompilationImpl.cpp, Line 896
	DRM: Closing entire DRM handling. Bye.
	

Existing drivers:
File 'Drivers\ADPU160M.SYS': Ver=v3.60a (Lab01_N(johnstra).010529-2218), size=101888 bytes, created 17/08/01 22:07:32 
File 'Drivers\CDRALW2K.SYS': Ver=5.3.4.21, size=23436 bytes, created 17/12/02 12:32:46 
File 'Drivers\ASPI32.SYS': Ver=4.71 (0001) built by: WinDDK, size=16512 bytes, created 06/11/02 11:21:42 

Registry Keys:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\AllocateCDROMs : 0 (Security Option) 



Burn finished NOT (3)successfully!


#2

What are your burn flags? Does the burn stop after a while or immediatelly after starting? Have you retried it? Does it happen every time? Does it happen regardless of whether you burn to a CD or DVD? Have you tried different recorders?


#3

It fails at the middle of the burning session and it has happened several times either on CD-R and CD-RW but not on DVD yet. I haven’t tried differents recorder yet. Note that the burning session can last quite a long (sevral hours! (2 or 3)) especialy the caching files procedure.
The Nero Burn Flags I’ve used are stated in code below:

Public WithEvents nero As nero
Public drives As INeroDrives
Public WithEvents drive As NeroDrive
(...)
Dim drives As INeroDrives
Set drives = nero.GetDrives(NERO_MEDIA_CDR)
Set drive = drives(AvailableDevices.ListIndex)
(...)
Dim isotrack As NeroISOTrack
Set isotrack = New NeroISOTrack
(...)
NeroFlag = NERO_BURN_FLAG_WRITE+ NERO_BURN_FLAG_VERIFY
(...)
isotrack.BurnOptions = NERO_BURN_OPTION_CREATE_ISO_FS + NERO_BURN_OPTION_USE_JOLIET
(...)
drive.BurnIsoAudioCD " ", " ", 0, isotrack, Nothing, Nothing, NeroFlag, 4, NERO_MEDIA_CD
(...)

Cheers


#4

I am also having similiar problems with mass files burning. I used NeroAPI with VC6 in a multithreaded environment. My wave files batch burning code is based on NeroAPI sample with each batch assigned to a thread. After the second batch finished and the CDROM tray pop up the whole program will shutdown. I trace the problem to the these set of functions

NeroCloseDevice (NeroDeviceHandle);
NeroFreeMem (NeroDeviceInfos);
NeroFreeMem (NeroCDInfo);
NeroClearErrors ();
NeroDone ();     &lt;-- Is this one DLL & thread safe ?
NeroAPIGlueDone();

My Nero error log is as follow
Windows XP 5.1

IA32

WinAspi: -

ahead WinASPI: File ‘C:\Program Files\Ahead\Nero\Wnaspi32.dll’: Ver=2.0.1.59, size=160016 bytes, created 6/17/2003 9:25:03 AM

Nero API version: 6.0.0.28

Using interface version: 6.0.0.0

Installed in: C:\Program Files\Ahead\Nero\

Installed in: C:\Program Files\Ahead\Nero\

Recorder: <HP CD-Writer cd16f> Version: 1.1D - HA 1 TA 0 - 6.0.0.28

Adapter driver: <atapi> HA 1

Drive buffer : 2048kB

Bus Type : default (0) -> ATAPI, detected: ATAPI

=== Scsi-Device-Map ===

DiskPeripheral : WDC WD1200BB-22CAA0 atapi Port 0 ID 0 DMA: On

CdRomPeripheral : HP CD-Writer cd16f atapi Port 1 ID 0 DMA: On

CdRomPeripheral : SAMSUNG DVD-ROM SD-616F atapi Port 1 ID 1 DMA: On

=== CDRom-Device-Map ===

HP CD-Writer cd16f D: CDRom0

SAMSUNG DVD-ROM SD-616F E: CDRom1

=======================

AutoRun : 1

Excluded drive IDs:

CmdQueuing : 1

CmdNotification: 2

WriteBufferSize: 74448896 (0) Byte

ShowDrvBufStat : 0

EraseSpeed : 0

BUFE : 0

Physical memory : 511MB (523808kB)

Free physical memory: 176MB (180264kB)

Memory in use : 65 %

Uncached PFiles: 0x0

Use Static Write Speed Table: 0

Use Inquiry : 1

Global Bus Type: default (0)

Check supported media : Disabled (0)

23.2.2005

NeroAPI

6:08:10 PM #1 Text 0 File Reader.cpp, Line 118

Reader running

6:08:10 PM #2 Text 0 File Writer.cpp, Line 124

Writer HP       CD-Writer cd16f  running

6:08:10 PM #3 Text 0 File Burncd.cpp, Line 3128

Turn on Disc-At-Once, using CD-R/RW media

6:08:10 PM #4 Text 0 File DlgWaitCD.cpp, Line 237

Last possible write address on media:   359846 (79:59.71)

Last address to be written:              59862 (13:20.12)

6:08:10 PM #5 Text 0 File DlgWaitCD.cpp, Line 242

Write in overburning mode: FALSE

6:08:10 PM #6 Text 0 File DlgWaitCD.cpp, Line 2043

Recorder: HP CD-Writer cd16f;

   CDR code: 00 97 24 01; OSJ entry from: Taiyo Yuden Company Limited

   ATIP Data:

     Special    Info [hex] 1: C0 00 98, 2: 61 18 01 (LI 97:24.01), 3: 4F 3B 48 (LO 79:59.72)

     Additional Info [hex] 1: 00 00 80 (invalid), 2: 00 00 00 (invalid), 3: 00 00 00 (invalid)

6:08:10 PM #7 Text 0 File DlgWaitCD.cpp, Line 403

&gt;&gt;&gt; Protocol of DlgWaitCD activities: &lt;&lt;&lt;

=========================================

6:08:10 PM #8 Text 0 File ThreadedTransferInterface.cpp, Line 775

Setup items (after recorder preparation)

 0: TRM_AUDIO_NOPRE (107-muzik.wav)

    2 indices, index0 (150) not provided

    original disc pos #0 + 59863 (59863) = #59863/13:18.13

    relocatable, disc pos for caching/writing not required/not required, no patch infos 

    -&gt; TRM_AUDIO_ULTRARAW96, 2448, config 0, wanted index0 0 blocks, length 59863 blocks [HP       CD-Writer cd16f ]

--------------------------------------------------------------

6:08:10 PM #9 Text 0 File ThreadedTransferInterface.cpp, Line 944

Prepare recorder [HP       CD-Writer cd16f ] for write in raw writing

DAO infos:

==========

 MCN: ""

 TOCType: 0x00; Session Closed, disc fixated

 Tracks 1 to 1:

   1: TRM_AUDIO_ULTRARAW96, 2448/0x00, FilePos             0        367200     146911824, ISRC ""

DAO layout:

===========

 __Start_|____Track_|_Idx_|_RecDep_|_CtrlAdr_

    -150 |  lead-in |   0 |   0x00 |  0x01

    -150 |        1 |   0 |   0x00 |  0x21

       0 |        1 |   1 |   0x00 |  0x21

   59863 | lead-out |   1 |   0x00 |  0x01

6:08:10 PM #10 Phase 24 File APIProgress.cpp, Line 244

Caching of files started

6:08:10 PM #11 Text 0 File Burncd.cpp, Line 4095

Cache writing successful.

6:08:10 PM #12 Phase 25 File APIProgress.cpp, Line 244

Caching of files completed

6:08:10 PM #13 Phase 32 File APIProgress.cpp, Line 244

Simulation started at 16x (2,400 KB/s)

6:08:10 PM #14 Text 0 File ThreadedTransferInterface.cpp, Line 2167

Verifying disc position of item 0 (relocatable, no disc pos, no patch infos, orig at #0): write at #0

6:08:10 PM #15 Text 0 File Mmc.cpp, Line 14781

StartDAO : CD-Text - On

6:08:10 PM #16 Text 0 File Mmc.cpp, Line 19362

Set BUFE: supported -&gt; OFF 

6:09:26 PM #17 Text 0 File WriterStatus.cpp, Line 113

&lt;HP       CD-Writer cd16f &gt; start writing Lead-Out at LBA 59863 (E9D7h), lenght 6750 blocks

6:09:33 PM #18 Text 0 File ThreadedTransfer.cpp, Line 229

all writers idle, stopping conversion

6:09:33 PM #19 Phase 33 File APIProgress.cpp, Line 244

Simulation completed successfully at 16x (2,400 KB/s)

Existing drivers:

File ‘Drivers\CDRALW2K.SYS’: Ver=5.1.1.176, size=23657 bytes, created 2/26/2002 2:40:03 PM

File ‘Drivers\PXHELP20.SYS’: Ver=2.02.62a, size=20016 bytes, created 10/28/2003 5:02:00 AM (Prassi/Veritas driver for win 2K)

Registry Keys:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\AllocateCDROMs : 0 (Security Option)


#5

Can you please describe in more detail the nature of your multithreaded design? Are you initializing NeroAPI once per thread? You must not do that!

NeroAPI is not thread safe so all calls must be serialized.


#6

It is a multithreaded plugin framework and each plugins is a DLL. Yes, only one thread at a time, I create the thread init NeroAPI, let it burn, deallocate resource and destroy thread. This will repeat until batch list is finish (I cannot do this?). I use the same method for a single wave file burn and it works just fine until I included multiples files in the same code which it will always quit at disk 2. I cap my CD-R capacity at 700mb.