Opened 14 years ago

Last modified 9 years ago

#3626 closed defect

JPIP driver in endless loop — at Version 3

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: GDAL_Raster Version: 1.6.2
Severity: normal Keywords: JPIPKAK
Cc:

Description (last modified by warmerdam)

On one of my test services, the driver worked for awhile, and then gave the following error message each time GetNextUpdatedRegion is called, and returned PENDING, instead of ERROR.

ERROR 1: EOF reached before completing VBAS
ERROR 1: EOF reached before completing VBAS
ERROR 1: EOF reached before completing VBAS
ERROR 1: EOF reached before completing VBAS
ERROR 1: EOF reached before completing VBAS
ERROR 1: EOF reached before completing VBAS
ERROR 1: EOF reached before completing VBAS

Change History (3)

comment:1 by gaopeng, 14 years ago

There is one mroe case of endless loop:

void JPIPKAKAsyncReader::Stop()
{
    JPIPKAKDataset *poJDS = (JPIPKAKDataset*)poDS;

    bComplete = 1;
    if (poJDS->pGlobalMutex)
    {
        if (((bHighPriority) && (!poJDS->bHighThreadFinished)) || 
            ((!bHighPriority) && (!poJDS->bLowThreadFinished)))
        {
            // stop the thread
            if (bHighPriority)
            {
                CPLAcquireMutex(poJDS->pGlobalMutex, 100.0);
                poJDS->bHighThreadRunning = 0;
                CPLReleaseMutex(poJDS->pGlobalMutex);
		
                while (!poJDS->bHighThreadFinished)
                    CPLSleep(0.1);  // <<< poJDS->bHighThreadFinished is never true
           ...

comment:2 by gaopeng, 14 years ago

Another case of endless loop:

    // if there is no pending data and we don't want to wait.
    if( nSize == 0 )   <<< nSize always 0
    {
        *pnxbufoff = 0;
        *pnybufoff = 0;
        *pnxbufsize = 0;
        *pnybufsize = 0;		
        return GARIO_PENDING;
    }

comment:3 by warmerdam, 14 years ago

Description: modified (diff)
Status: newassigned
Note: See TracTickets for help on using tickets.