Problems with NERO_ISO_ITEM


I’m usign the Nero SDK to integrate archiving of input data for a MySQL data base to CD/DVD into an C++ application for traffic control systems. The archiving should be performed using the Multisession capabilitiy of Nero. As I already read in other threads it is necessary to perform a NeroImportDataTrack to get the last data track on the disk and than to add the ISO items that should be burnt in the next session by adding them to the tree. So far no problem and the importing of the data track works perfectly fine but now comes the problem.

As I mentioned before I’m integrating it into an application so I have the necessity to make a copy of the NERO_ISO_ITEM so I use the function NeroCopyIsoItem and that’s still OK. The problem starts when I want to free the memory later because in that case the program terminates with an exception.

I tried to isolate the problem and below there is a very simplified version that just makes a copy of the first ISO item of the tree and immediately deletes it again:

NERO_ISO_ITEM * neroIsoItem = 0;
neroIsoItem = NeroImportDataTrack (…)
if (neroIsoItem != 0) {
NERO_ISO_ITEM * myNeroIsoItem = NeroCopyIsoItem (neroIsoItem);
NeroFreeIsoItem (myNeroIsoItem);
NeroFreeIsoItemTree (neroIsoItem);

It crashes when calling the NeroFreeIsoItemTree function. When swapping functions NeroFreeIsoItem and NeroFreeIsoItemTree it crashes when calling NeroFreeIsoItem i.e. it always crashes when calling the second NeroFree… function so it seems like freeing the same memory twice although imho the NeroCopyIsoItem should create a complete new object that doesn’t depend on the original one or is this just a wish of mine?

When not copying and freeing the first ISO item and just freeing the ISO item tree this works fine!

I hope that my explanations are clear and that someone can help me with that problem!

Thanks in advance,

Thanks for reporting the problem. You are right, there is a bug in the NeroCopyIsoItem method, which did not allocate new buffer for the longFilename string but only copied the pointer value. NeroFreeIsoItem frees the buffer, if the item is a reference (because then the buffer has been allocated be NeroImportDataTrack).
This problem has been fixed in Nero

I wisht to know if you had been able to find the solution to your problem with
NeroFreeIsoItemTree(), because I have the same problem and i had beeon able to solved.

could you sendme some coments about the matter ?

Please in advantage.

Your Friend from Mexico Ram_mex

As you can read in the comment of matze the problem was inside NeroAPI and has been already solved. What kind of comments are you still missing?