NeroBurn failed and next burning causes app's crash

vbimport

#1

I wrote some robo like app which burns CD\DVD using multisession capability of Nero. App writes tracks one by one. Sometimes after 10-15 tracks has been burned NeroBurn has failed with code NEROAPI_BURN_FAILED. The next burn task in the queue provokes app’s crash. If i switch off Hyperthreading option in the BIOS it happens more rarely.
I’ve read previous topics on this forum but could not find information that helps me to resolve this problem.
I use Nero Engine v6.3.1.20.
Could anyone help me?


#2

!!!-------------------------NeroISOItemImpl.h

#pragma once

#include “Nero\NeroISOTrack.h”
#include “DVDBackup.h”
#include <string>

//---------------------------------------------------------
struct CNeroISOItem : public NERO_ISO_ITEM
{
CNeroISOItem (IDVDBackupItem *);
~CNeroISOItem ();

void * operator new (size_t);
void operator delete (void *);

private:
std::string Path_;
std::string Name_;
IDVDBackupItem * DVDItem_;
};

//---------------------------------------------------------
struct CNeroAllocatedISOItem : public NERO_ISO_ITEM
{
CNeroAllocatedISOItem ()
{}
~CNeroAllocatedISOItem ();

void * operator new (size_t, NERO_ISO_ITEM *);
void operator delete (void *);
};

!!!-------------------------NeroISOItemImpl.cpp

#include “StdAfx.h”
#include “Nero\NeroAPIGlue.h”
#include “NeroISOItemImpl.h”

#define SELF_ALLOCATED_ITEM_SIGN 0xebdfcdde

CNeroISOItem::CNeroISOItem (IDVDBackupItem * DVDItem) : DVDItem_ (DVDItem)
{
itemSize = sizeof(NERO_ISO_ITEM);

userData = (void*)SELF_ALLOCATED_ITEM_SIGN;

Path_ = DVDItem_->GetPath ();
Name_ = DVDItem_->GetName ();

fileName[0] = 0;
longFileName = const_cast<char*>(Name_.c_str ());
if (Name_.length () + 1 < sizeof (fileName))
strcpy (fileName, Name_.c_str ());

isDirectory = DVDItem_->IsItemContainer ();
sourceFilePath[0] = 0;
longSourceFilePath = 0;
if (!isDirectory)
{
longSourceFilePath = Path_.c_str ();
if (Path_.length () + 1 < sizeof (sourceFilePath))
strcpy (sourceFilePath, Path_.c_str ());
}
subDirFirstItem = 0;

IDVDBackupItemPtr SubItem;
if (isDirectory && DVDItem_->GetSubItem (&SubItem))
{
subDirFirstItem = new CNeroISOItem (SubItem);
if (0 == subDirFirstItem)
throw 1;
}
nextItem = 0;
IDVDBackupItemPtr NextItem;
if (DVDItem_->GetNextItem (&NextItem))
{
nextItem = new CNeroISOItem (NextItem);
if (0 == nextItem)
throw 1;
}
}

void * CNeroISOItem::operator new (size_t size)
{
return NeroCreateIsoItemOfSize (sizeof(CNeroISOItem));
}

void CNeroISOItem::operator delete (void * This)
{
NeroFreeIsoItem ((NERO_ISO_ITEM*)This);
}

CNeroISOItem::~CNeroISOItem ()
{
if (nextItem)
delete static_cast<CNeroISOItem*>(nextItem);
if (subDirFirstItem)
delete static_cast<CNeroISOItem*>(subDirFirstItem);
}

//---------------------------------------------------------
CNeroAllocatedISOItem::~CNeroAllocatedISOItem ()
{
ATLASSERT (0 == userData);
if (nextItem)
{
if (SELF_ALLOCATED_ITEM_SIGN == (int)nextItem->userData)
delete static_cast<CNeroISOItem*> (nextItem);
else
delete static_cast<CNeroAllocatedISOItem*> (nextItem);
}
if (subDirFirstItem)
{
if (SELF_ALLOCATED_ITEM_SIGN == (int)subDirFirstItem->userData)
delete static_cast<CNeroISOItem*> (subDirFirstItem);
else
delete static_cast<CNeroAllocatedISOItem*>(subDirFirstItem);
}
}

void * CNeroAllocatedISOItem::operator new (size_t, NERO_ISO_ITEM * This)
{
return This;
}

void CNeroAllocatedISOItem::operator delete (void * This)
{
NeroFreeIsoItem ((NERO_ISO_ITEM *)This);
}

!!!-------------------- piece of code in which NeroBurn func is called

DVD_BACKUP_STATUS CNeroBurnEngineWrap::Backup (CNeroBurnDeviceWrap * Device,
IDVDBackupItem * BackupItem, LPCSTR lpszVolumeLabel)
{
CBusy Busy (this);

int SessionToImport = Device->VMSInfo_ ? Device->VMSInfo_->nvmsiNumSessions - 1:
Device->CDInfo_->ncdiNumTracks - 1;

DWORD ImportFlags = NIITEF_IMPORT_UDF|(Device->VMSInfo_ ? NIITEF_IMPORT_VMS_SESSION : 0);

void * CDStamp = 0;
CNeroAllocatedISOItem * IsoImportedItem = 0;
if (-1 != SessionToImport)
{
NERO_IMPORT_DATA_TRACK_INFO ImportTrackInfo;
NERO_IMPORT_DATA_TRACK_RESULT ImportResult (NIDTR_NO_ERROR);
memset (&ImportTrackInfo, 0, sizeof (ImportTrackInfo));
ImportTrackInfo.nidtiSize = sizeof (ImportTrackInfo);

IsoImportedItem = (CNeroAllocatedISOItem *)NeroImportDataTrack (Device-&gt;Handle_, SessionToImport, &CDStamp, 
  &ImportTrackInfo, ImportFlags, &ImportResult, 0);

//--&gt; we can check volume name
if (ImportTrackInfo.nidtipVolumeName)
  NeroFreeMem (ImportTrackInfo.nidtipVolumeName);

if (NIDTR_INVALID_FS == ImportResult)
  __TRACE (Type_Backup, _T("UDF file system can not be imported.

Import ISO only.
"));
else
if (NIDTR_NO_ERROR != ImportResult)
{
__TRACE (Type_Backup, _T("Failed to import last written session.
"));
return DBS_IMPORT_ERROR;
}
}
// allocate new item
CNeroISOItem * IsoNewItem = 0;
try
{
IsoNewItem = new CNeroISOItem (BackupItem);
}
catch (int)
{
__TRACE (Type_Backup, _T("Failed to allocate new ISO item.
"));
return DBS_ALLOC_ERROR;
}
NERO_ISO_ITEM * IsoRootItem = IsoNewItem;
if (IsoImportedItem)
{
NERO_ISO_ITEM * Last = IsoImportedItem;
NERO_ISO_ITEM * Next = IsoImportedItem->nextItem;
while (Next)
{
Last = Next;
Next = Next->nextItem;
}
Last->nextItem = IsoNewItem;
IsoRootItem = IsoImportedItem;
}
// allocate track
CNeroIsoTrack * IsoTrack = NeroCreateIsoTrackEx (IsoRootItem, lpszVolumeLabel,
NCITEF_USE_JOLIET|NCITEF_USE_MODE2|NCITEF_CREATE_ISO_FS|NCITEF_CREATE_UDF_FS);
if (0 == IsoTrack)
{
__TRACE (Type_Backup, _T("NeroCreateIsoTrackEx is failed.
"));
return DBS_ALLOC_ERROR;
}

NERO_WRITE_CD WriteCD;
memset (&WriteCD, 0, sizeof (WriteCD));
WriteCD.nwcdpCDStamp = CDStamp;
WriteCD.nwcdIsoTrack = IsoTrack;
WriteCD.nwcdMediaType = Device->CDInfo_->ncdiMediaType;

SetBusy (FALSE);
FireProgress (BACKUP_STARTED, 0);
SetBusy (TRUE);

DWORD dwSpeedKBs = Device->DeviceInfo_->nsdiWriteSpeeds.nsiSupportedSpeedsKBs[0];
DWORD numSpeeds = Device->DeviceInfo_->nsdiWriteSpeeds.nsiNumSupportedSpeeds;
if (numSpeeds > 0)
dwSpeedKBs = Device->DeviceInfo_->nsdiWriteSpeeds.nsiSupportedSpeedsKBs[numSpeeds-1];

NEROAPI_BURN_ERROR BurnError = NeroBurn (Device->Handle_, NERO_ISO_AUDIO_MEDIA,
&WriteCD, NBF_WRITE|NBF_CLOSE_SESSION|NBF_BUF_UNDERRUN_PROT|NBF_DISABLE_ABORT|
NBF_DISABLE_EJECT|NBF_SPEED_IN_KBS, dwSpeedKBs, &NeroProgress_);

if (NEROAPI_BURN_OK == BurnError)
{
Device->UpdateMediaStatus ();
}
else
{
USES_CONVERSION;
char * lpszErrorLogLines = NeroGetErrorLog ();
__TRACE (Type_Backup, A2T(lpszErrorLogLines));
NeroFreeMem (lpszErrorLogLines);
}

SetBusy (FALSE);
FireProgress (NEROAPI_BURN_OK == BurnError ? BACKUP_FINISHED : BACKUP_FINISHED_WIDTH_ERROR, 0);
SetBusy (TRUE);

if (CDStamp)
NeroFreeMem (CDStamp);

NeroFreeIsoTrack (IsoTrack);
if (IsoImportedItem)
delete IsoImportedItem;
else
delete IsoNewItem;

Abort_ = FALSE;

return GetError (BurnError);
}


#3

I’m having the same problem too. Specifically, I was using Sony DVD-R media in a Sony DVD RW DW-U18A recorder and had written data 146-MB in size (60 files) over and over (i.e., track-by-track). Once I reached a little over 70% full, I encounter the same BURN_FAILED error after the NeroBurn() call with the following entries in the Nero log. The disc is no longer writable, though I can read from it. I think the entries of note in the log below are:

7:20:31 AM #15 Text 0 File DVDR.cpp, Line 2469
Max track entry count exceeded (1 entries >= 4 layout size, track No 1 not found)

7:20:31 AM #16 CDR -1 File ThreadedTransferInterface.cpp, Line 1765
Unspecified Recorder Error
SONY DVD RW DW-U18A\H1 T0

Does write-once DVD media have a maximum number of tracks that can be written to it?

  • Anthony

ENTIRE ERROR LOG:

7:20:30 AM #1 Text 0 File DlgWaitCD.cpp, Line 271
Write in overburning mode: NO

7:20:30 AM #2 Text 0 File DlgWaitCD.cpp, Line 2316
Recorder: SONY DVD RW DW-U18A, Media type: DVD-R
Disc Manufacturer: SONY08 - D1
Disc Application Code: 64, Disc Physical Code: 193

7:20:30 AM #3 Text 0 File DlgWaitCD.cpp, Line 433
>>> Protocol of DlgWaitCD activities: <<<
=========================================

7:20:30 AM #4 Text 0 File ThreadedTransferInterface.cpp, Line 830
Setup items (after recorder preparation)
0: TRM_DATA_MODE1 ()
2 indices, index0 (150) not provided
original disc pos #0 + 608 (608) = #608/0:8.8
relocatable, disc pos for caching/writing not required/ required, no patch infos
-> TRM_DATA_MODE1, 2048, config 0, wanted index0 0 blocks, length 608 blocks [SONY DVD RW DW-U18A]
--------------------------------------------------------------

7:20:30 AM #5 Text 0 File ThreadedTransferInterface.cpp, Line 1043
Prepare recorder [SONY DVD RW DW-U18A] for write in CUE-sheet-DAO
DAO infos:
==========
MCN: “”
TOCType: 0x00; Session Closed, disc not fixated
Tracks 170 to 170:
1: TRM_DATA_MODE1, 2048/0x00, FilePos 0 0 1245184, ISRC “”
DAO layout:
===========
Start|Track|Idx|CtrlAdr|RecDep_____
1520816 | lead-in | 0 | 0x41 | 0x00
1520816 | lead-out | 0 | 0x41 | 0x00
1520816 | lead-out | 1 | 0x41 | 0x00
1521424 | lead-out | 1 | 0x41 | 0x00

7:20:30 AM #6 Phase 24 File APIProgress.cpp, Line 276
Caching of files started

7:20:31 AM #7 Text 0 File Burncd.cpp, Line 4040
Cache writing successful.

7:20:31 AM #8 Phase 25 File APIProgress.cpp, Line 276
Caching of files completed

7:20:31 AM #9 Phase 36 File APIProgress.cpp, Line 276
Burn process started at 8x (11,080 KB/s)

7:20:31 AM #10 Text 0 File ThreadedTransferInterface.cpp, Line 2609
Verifying disc position of item 0 (relocatable, disc pos, no patch infos, orig at #0): write at #1520816

7:20:31 AM #11 Text 0 File DVDR.cpp, Line 2194
Recording mode: Sequential Recording Mode for Multisession

7:20:31 AM #12 Text 0 File Mmc.cpp, Line 21235
Set BUFE: Buffer under-run error protection -> ON , Adapt writespeed to disc : ON

7:20:31 AM #13 Text 0 File DVDR.cpp, Line 2340
Start write address at LBA 1520816
DVD high compatibility mode: No

7:20:31 AM #14 Text 0 File Cdrdrv.cpp, Line 8430
---- DVD Structure: Physical Format Information (00h) ----
Layer: 0, Address: 0 (0 h), AGID: 0; Length: 2050
Book Type: DVD-R (2), Part Version: 5
Disc Size: 120 mm, Maximum Rate: <not specified> (F h)
Number of Layers: 1, Track Path: Parallel Track Path (PTP), Layer Type: recordable
Linear Density: 0,267 um/bit, Track Density: 0,74 um/track
Starting Physical Sector Number of Data Area: 30000 h (DVD-ROM, DVD-R/-RW, DVD+R/+RW)
End Physical Sector Number of Data Area: 3142F h
End Sector Number in Layer 0: 0 h (LBN: FFFD0000 h, 4193920 MB)
Data in Burst Cutting Area (BCA) does not exist
Start sector number of the current Border-Out: 3FF00 h
Start sector number of the next Border-In: 46EA0 h
Media Specific [16…63]:
00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 …
00 03 FF 00 00 04 6E A0 - 00 00 00 00 00 00 00 00 …n…
00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 …

7:20:31 AM #15 Text 0 File DVDR.cpp, Line 2469
Max track entry count exceeded (1 entries >= 4 layout size, track No 1 not found)

7:20:31 AM #16 CDR -1 File ThreadedTransferInterface.cpp, Line 1765
Unspecified Recorder Error
SONY DVD RW DW-U18A\H1 T0

7:20:31 AM #17 TRANSFER -27 File ThreadedTransferInterface.cpp, Line 1765
Could not perform start of Disc-at-once

7:20:31 AM #18 Phase 38 File APIProgress.cpp, Line 276
Burn process failed at 8x (11,080 KB/s)

7:20:31 AM #19 Text 0 File AudioCompilationImpl.cpp, Line 867
DRM: DRM burn session terminated.

7:20:31 AM #20 Text 0 File AudioCompilationImpl.cpp, Line 896
DRM: Closing entire DRM handling. Bye.


#4

I’ve got detailed log from Nero concerning problem posted by me above.
I hope this help to make clear cause of problem

1A23-0009-0030-1346-7408-1344

1a20-0100-0000-1972-0668-5687

Windows 2000 5.0

IA32

WinAspi: -

ahead WinASPI: File ‘C:\Program Files\Ahead\Nero\Wnaspi32.dll’: Ver=2.0.1.68, size=160016 bytes, created 23.07.2004 5:33:44

Nero API version: 6.3.1.20

Using interface version: 6.3.1.4

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

Application: ahead\Nero - Burning Rom

Recorder: <_NEC DVD_RW ND-3520A> Version: 1.04 - HA 1 TA 0 - 6.3.1.20

Adapter driver: <atapi> HA 1

Drive buffer : 2048kB

Bus Type : via Inquiry data (1) -> ATAPI, detected: ATAPI

Connected to MMC as unknown drive with class-nr : 1

Drive is autodetected - recorder class: Std. MMC recorder

=== Scsi-Device-Map ===

DiskPeripheral : ST3160021A atapi Port 0 ID 0 DMA: On

CdRomPeripheral : _NEC DVD_RW ND-3520A atapi Port 1 ID 0 DMA: Off

=== CDRom-Device-Map ===

_NEC DVD_RW ND-3520A D: CDRom0

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

AutoRun : 1

Excluded drive IDs:

WriteBufferSize: 73400320 (0) Byte

ShowDrvBufStat : 0

BUFE : 0

Physical memory : 502MB (514796kB)

Free physical memory: 346MB (354328kB)

Memory in use : 31 %

Uncached PFiles: 0x0

Use Static Write Speed Table: 0

Use Inquiry : 1

Global Bus Type: default (0)

Check supported media : Disabled (0)

11.5.2005

NeroAPI

2:45:45 #1 Text 0 File Reader.cpp, Line 126

Reader running

2:45:45 #2 Text 0 File AudioCompilationImpl.cpp, Line 817

DRM: StartDrmRecording(RealRec:1, ImageRec:0, Copies:1)

DRM: Beginning burn process.

2:45:45 #3 ISO9660GEN -11 File geniso.cpp, Line 3899

First writeable address = 0 (0x00000000)

2:45:45 #4 ISO9660GEN -11 File geniso.cpp, Line 3899

First writeable address = 0 (0x00000000)

2:45:45 #5 Text 0 File Burncd.cpp, Line 3173

Turn on Disc-At-Once, using DVD media

2:45:46 #6 Text 0 File Burncd.cpp, Line 5689

Unexpected exception

2:45:46 #7 Text 0 File AudioCompilationImpl.cpp, Line 828

DRM: DRM burn session terminated.

2:45:46 #8 Text 0 File AudioCompilationImpl.cpp, Line 857

DRM: Closing entire DRM handling. Bye.

Existing drivers:

File ‘Drivers\CDR4_2K.SYS’: Ver=5.3.2.31, size=58000 bytes, created 16.03.2005 17:07:55

File ‘Drivers\CDRALW2K.SYS’: Ver=5.3.2.31, size=23420 bytes, created 16.03.2005 17:07:55

Registry Keys:

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


#5

If i don’t use UDF орtion to burn disk no exception arises and disk burns correctly. Below i cite cut of log that my app procudes during writing track before and after exception arised.

Time: 000047 Thread: 0x254 Writing DRS{12d05m2005y21h48m40s0984ms}
Time: 000050 Thread: 0x254 Phase: Reading directories <-- reported By NERO
Time: 000050 Thread: 0x254 Phase: Creating directories <-- reported By NERO
Time: 000050 Thread: 0x254 Phase: Finishing <-- reported By NERO
Time: 000050 Thread: 0x254 Phase: Reading directories <-- reported By NERO
Time: 000050 Thread: 0x254 Phase: Creating directories <-- reported By NERO
Time: 000050 Thread: 0x254 Phase: Checking discs <-- reported By NERO
Time: 000050 Thread: 0x254 Unexpected exception <-- reported By NERO
Time: 000053 Thread: 0x254 Reset Nero
Time: 000053 Thread: 0x254 Thread unexpected exception!
EXCEPTION_ACCESS_VIOLATION at 1401EC2D ==>GENUDF.DLL : 0001EC2D
Address ( this Arg1 Arg2 Arg3 ) ==> module : [function +] offset
1401EA9A ( 01F63768 01F63690 1400726C 00000001 ) ==> GENUDF.DLL : 0001EA9A
Time: 000053 Thread: 0x254 Reset Nero
Time: 000054 Thread: 0x254 Reconnect to Nero
Time: 000054 Thread: 0x254 NeroAPI version 6.3.1.20 started.