#1 Burning Software

It is currently Thu Dec 19, 2024 7:38 am

All times are UTC




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: GrabTrack freezing at 99%
PostPosted: Wed Sep 13, 2006 9:56 pm 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
GrabTrack is never returning after 99% with DVD(non-encrypted). I know it gets to 99% because my callback is called up to that point. After 99% it doesn't get called anymore and StarBurn_CdvdBurnerGrabber_GrabTrack never returns.

I'm emailing the log but here is the last bit of it:

CStarBurn_CdvdBurnerGrabber::GrabTrack(): ENTERed for 1, 'C:\Documents and Settings\Acidtech\Desktop\Source\Burn&Print\Debug\Master.iso'

CStarBurn_CdvdBurnerGrabber::RestoreReadErrorRecoverySafe(): ENTERed

Read Error Recovery Page Dump:
Page Code: 0x01, PSBit (Page Saveable): 0
Parameter Length: 10 UCHARs, Error Recovery Parameter: 0x00, Read Retry Count: 10

CStarBurn_CdvdBurnerGrabber::RestoreReadErrorRecoverySafe(): EXITing with success

CStarBurn_CdvdBurnerGrabber::ReadTOCForDVD(): Processing media in 'read track info' mode...

CStarBurn_DumpAndParseTrackInformation(): WARNING! Length 34 less then 40!

Track Information Dump:
Track Number: 1, Session Number: 1
Track Mode: 0x04, Copy: No, Damage: No
Data Mode: 0x01, FP (Fixed Packet): No, Packet: No, Blank: No
RT (Reserved Track): No, NWA_V (Next Writable Address Valid): No
Track Start Address (LBA): 0, Next Writable Address (LBA): 0
Free Logical Block(s): 0, Fixed Packet Size: 16 LB(s)
Track Size In LBs: 2860400, Last Recorded Address: 2860399


CStarBurn_CdvdBurnerGrabber::GrabTrack(): LB size 2048 for TNO 1 is supported

CStarBurn_CdvdBurnerGrabber::GrabTrackCooked(): ENTERed for 0 ( 0 ) - 2860399 ( 2860399 ), 0, 1, Ignore: Yes, Force: No, LB: 2048, TNO: 1

CStarBurn_CdvdBurnerGrabber::GrabTrackCooked(): Single transfer size of 61440 UCHARs

Nathan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 10:07 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
I see... If you'd take any other software (say DVDDecrypter or Nero) and ask them to make the ISO image of this particular DVD media - how they would do it? Please check and we'd continue with this issue. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 10:12 pm 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
Actually your grabtrack.exe sample app works fine. Nero also works fine. DVD Decrypter probably works but this is a non-encrypted DVD(I can copy the files to harddrvie and play video without decrypting). I'm trying to figure out what I'm doing wrong that is causing GrabTrack to never return in my app.

Nathan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 10:16 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Can you compare all actions GrabTrack Vs your app performs to find out the difference? According to the log you don't do anything forbidden... In the worst case we'd issue you with extended debug logging StarBurn.dll to find out exact place where it goes to infinite loop (your case). Thanks!

Acidtech wrote:
Actually your grabtrack.exe sample app works fine. Nero also works fine. DVD Decrypter probably works but this is a non-encrypted DVD(I can copy the files to harddrvie and play video without decrypting). I'm trying to figure out what I'm doing wrong that is causing GrabTrack to never return in my app.

Nathan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 10:57 pm 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
Ok. Walking through my apps GrabTrack routine:

TestUnitReady.
SetSpeeds with max values.
GetSpeeds to confirm

then instead of doing this:

l__DISC_TYPE = StarBurn_CdvdBurnerGrabber_GetInsertedDiscType( l__PVOID__CdvdBurnerGrabber );

StarBurn_SetFastReadTOC( /* FALSE */ TRUE );

I do this:

GetDiscInformation
GetTOCInformation
if(TOCInformation.m__BOOLEAN__IsDVD){
SetSpeeds with user selectable speeds
GetSpeeds to confirm
}
If(disc isn't empty){
if(number tracks > 0){
if(!Audio disc){
GrabTracks()
}
}
}

GrabTracks subroutine is a for-next loop that calls StarBurn_CdvdBurnerGrabber_GrabTrack with a unique filename for each track. In the case of the DVD I am ripping there is only 1 track. Once it calls StarBurn_CdvdBurnerGrabber_GrabTrack it never comes back. Callbacks are made up to and including 99% but then stop and the program freezes.

An ISO file is created and if burned to a DVD+R DL plays.

Nathan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 11:04 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Did you wait enough time? Maybe it's just the routing doing very long end of the track reading?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 11:09 pm 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
When it freezes the drive slows down.
Eventually the drive stops spinning. Program still frozen.

Nathan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 11:17 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
I see...

Do you want to try to put this call back?

StarBurn_SetFastReadTOC( /* FALSE */ TRUE );

Acidtech wrote:
When it freezes the drive slows down.
Eventually the drive stops spinning. Program still frozen.

Nathan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 11:34 pm 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
Actually I just added that before my calles to GetDiscInformation and GetTOCInformation. Still never exits StarBurn_CdvdBurnerGrabber_GrabTrack.

Below is my RunGrabTracksThread and GrabTracks subroutines. RunGrabTracksThread is run in a seperate thread from my main application.

Code:
void CDVDBurnerGrabber::RunGrabTracksThread()
{
   UINT retval=ERRNORMAL;
   if(Load()){
      if(TestUnitReady()){
         SetSpeeds(CDVD_SPEED_IS_KBPS_MAXIMUM,CDVD_SPEED_IS_KBPS_MAXIMUM);
         GetSpeeds(g_Drives[m_DriveIndex].l__ULONG__CurrentReadSpeed,
                 g_Drives[m_DriveIndex].l__ULONG__MaximumReadSpeed,
                 g_Drives[m_DriveIndex].l__ULONG__CurrentWriteSpeed,
                 g_Drives[m_DriveIndex].l__ULONG__MaximumWriteSpeed);
   
         StarBurn_SetFastReadTOC( /* FALSE */ TRUE );

         DISC_INFORMATION DiscInformation;
         RtlZeroMemory(     
            &DiscInformation,
            sizeof(DiscInformation)
            );
         TOC_INFORMATION TOCInformation;
         RtlZeroMemory(     
            &TOCInformation,
            sizeof(TOCInformation)
            );
         if(GetDiscInformation(&DiscInformation)){
            GetTOCInformation(&TOCInformation);
            if(TOCInformation.m__BOOLEAN__IsDVD){
               m_ReadSpeed=m_DVDReadSpeed;
               m_WriteSpeed=m_DVDWriteSpeed;
            }
            else{
               m_ReadSpeed=m_CDReadSpeed;
               m_WriteSpeed=m_CDWriteSpeed;
            }
            SetSpeeds(m_ReadSpeed,m_WriteSpeed);
            GetSpeeds(g_Drives[m_DriveIndex].l__ULONG__CurrentReadSpeed,
                    g_Drives[m_DriveIndex].l__ULONG__MaximumReadSpeed,
                    g_Drives[m_DriveIndex].l__ULONG__CurrentWriteSpeed,
                    g_Drives[m_DriveIndex].l__ULONG__MaximumWriteSpeed);

            if(DiscInformation.m__UCHAR__DiscStatus!=DISC_STATUS_EMPTY){
               if(TOCInformation.m__UCHAR__NumberOfTracks){
                  CArray<CString,CString> filenames;
                  if(TOCInformation.m__TOC_ENTRY[1].m__BOOLEAN__IsAudio){
                     if(GetCDDBInfo()){
                        for(UCHAR count=0;count<TOCInformation.m__UCHAR__NumberOfTracks;count++){
                           CString name="";
                           filenames.Add(m_RipDirectory + m_CDTextArtist[1] + "_" + m_CDTextTitle[1] + "_" + m_TrackNames[count] + ".wav");
                        }            ;
                     }
                     else{
                        SYSTEMTIME st;
                        GetSystemTime(&st);// gets current time
                        CString uniqueID;
                        uniqueID.Format("%2.2u%2.2u%2.2u%2.2u%2.2u%2.2u",(int)st.wHour,(int)st.wMinute,(int)st.wSecond,(int)st.wYear,(int)st.wMonth,(int)st.wDay);
                        for(UCHAR count=0;count<TOCInformation.m__UCHAR__NumberOfTracks;count++){
                           CString track="";
                           if(TOCInformation.m__UCHAR__NumberOfTracks>1)
                              track.Format("_Track%u",count);
                           filenames.Add(m_RipDirectory + uniqueID + track + ".wav");
                        }
                     }
                  }
                  else{
                     CString volumename,filesystem;
                     char string[1024];
                     DWORD serial,maxlength,flags;
                     if(GetVolumeInformation(m_VolumePath,string,1024,&serial,&maxlength,&flags,filesystem.GetBuffer(1024),1024)){
                        volumename = string;
                        for(UCHAR count=0;count<TOCInformation.m__UCHAR__NumberOfTracks;count++){
                           CString track="";
                           if(TOCInformation.m__UCHAR__NumberOfTracks>1)
                              track.Format("_Track%u",count);
                           filenames.Add(m_RipDirectory + volumename + track + ".iso");
                        }
                     }
                     else{
                        SYSTEMTIME st;
                        GetSystemTime(&st);// gets current time
                        CString uniqueID;
                        uniqueID.Format("%2.2u%2.2u%2.2u%2.2u%2.2u%2.2u",(int)st.wHour,(int)st.wMinute,(int)st.wSecond,(int)st.wYear,(int)st.wMonth,(int)st.wDay);
                        for(UCHAR count=0;count<TOCInformation.m__UCHAR__NumberOfTracks;count++){
                           CString track="";
                           if(TOCInformation.m__UCHAR__NumberOfTracks>1)
                              track.Format("_Track%u",count);
                           filenames.Add(m_RipDirectory + uniqueID + track + ".iso");
                        }
                     }
                  }
                  if(GrabTracks(filenames,
                             TOCInformation,
                             NUMBER_OF_READ_RETRIES,
                             TRUE,
                             FALSE,
                             READ_REPORT_DELAY_IN_SECONDS)){
                     if(!Eject()){
                        retval=ERREJECT;
                     }
                  }
                  else{
                     Eject();
                     retval=ERRDISC;
                  }
               }
               else{
                  Eject();
                  retval=ERRDISC;
               }
            }
            else{
               Eject();
               retval=ERRDISC;
            }
         }
         else{
            Eject();
            retval=ERRDISC;
         }
      }
      else{
         Eject();
         retval=ERRDISC;
      }
   }
   else{
      retval=ERRLOAD;
   }
   FinishThread(retval);
}

BOOL CDVDBurnerGrabber::GrabTracks(CArray<CString,CString> &FileNames,
                           TOC_INFORMATION TOCInformation,
                         LONG Retries,
                         BOOLEAN IsBadBlockIgnore,
                         BOOLEAN IsSingleLBTransferForced,
                         ULONG ReadReportDelayInSeconds)
{
   if(FileNames.GetSize()<TOCInformation.m__UCHAR__NumberOfTracks)
      return FALSE;

   for(UCHAR track=0;track<TOCInformation.m__UCHAR__NumberOfTracks;track++){
      m_pCallback(m_Index,m_Drive,0x10000 | ((track+1)&0xFF) | ((TOCInformation.m__UCHAR__NumberOfTracks&0xFF)<<8));
      if(m_bIsCreated && IsUpStart()){
         l__EXCEPTION_NUMBER =
            StarBurn_CdvdBurnerGrabber_GrabTrack(
               l__PVOID__CdvdBurnerGrabber,
               ( PCHAR )( &l__CHAR__ExceptionText ),
               sizeof( l__CHAR__ExceptionText ),
               &l__ULONG__SystemError,
               &l__CDB_FAILURE_INFORMATION,
               track+1,
               FileNames[track].GetBuffer(FileNames[track].GetLength()),
               Retries,
               IsBadBlockIgnore,
               IsSingleLBTransferForced,
               ReadReportDelayInSeconds
               );

//Never gets here
         // Check for correct reply
         if ( l__EXCEPTION_NUMBER != EN_SUCCESS )
         {
            WriteExceptionLog(l__EXCEPTION_NUMBER,l__ULONG__SystemError);
            return FALSE;
         }
      }
      else{
         return FALSE;
      }
   }

   return TRUE;
}


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 11:37 pm 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
I also tried using Create(ASPI) instead of CreateEx(SPTI) with no difference. My program is setup so I can use either.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 11:45 pm 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
I aslo just ripped a CD without problems, but ripping a plextor software DVD I've ripped in the past failed just like the video DVDs.

Nathan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 14, 2006 12:06 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
I'll ask the guys to build a special DLL for you. With more of the debug traces enabled. For now it seems to be a combination of device + USB bridge + media.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 14, 2006 12:19 am 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 14, 2006 12:24 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Nothing fo yet... I wonder why GrabTrack.exe works.

Acidtech wrote:
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 14, 2006 12:27 am 
Offline

Joined: Thu Jun 02, 2005 8:50 pm
Posts: 115
That's what I'm wondering as well.

Nathan


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group