Skip to content

Commit 79fe883

Browse files
committed
viewer#3147 Thumbnail picker's image is grey #2
Apparently made a blunder in previous commit since I missed mFetchState being reset each run
1 parent a90377d commit 79fe883

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

indra/newview/lltexturefetch.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,18 +1503,13 @@ bool LLTextureFetchWorker::doWork(S32 param)
15031503
{
15041504
if (http_not_found == mGetStatus)
15051505
{
1506-
if (mFTType != FTT_MAP_TILE)
1507-
{
1508-
LL_WARNS(LOG_TXT) << "Texture missing from server (404): " << mUrl << LL_ENDL;
1509-
}
1510-
15111506
if(mWriteToCacheState == NOT_WRITE) //map tiles or server bakes
15121507
{
15131508
setState(DONE);
15141509
releaseHttpSemaphore();
15151510
if (mFTType != FTT_MAP_TILE)
15161511
{
1517-
LL_WARNS(LOG_TXT) << mID << " abort: WAIT_HTTP_REQ not found" << LL_ENDL;
1512+
LL_WARNS(LOG_TXT) << mID << "NOT_WRITE texture missing from server (404), abort: " << mUrl << LL_ENDL;
15181513
}
15191514
return true;
15201515
}
@@ -1524,6 +1519,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
15241519
LLViewerRegion* region = getRegion();
15251520
if (!region || mLastRegionId != region->getRegionID())
15261521
{
1522+
if (mFTType != FTT_MAP_TILE)
1523+
{
1524+
LL_INFOS(LOG_TXT) << "Texture missing from server (404), retrying: " << mUrl << " mRetryAttempt " << mRetryAttempt << LL_ENDL;
1525+
}
15271526
// cap failure? try on new region.
15281527
mUrl.clear();
15291528
++mRetryAttempt;
@@ -1532,6 +1531,11 @@ bool LLTextureFetchWorker::doWork(S32 param)
15321531
return false;
15331532
}
15341533
}
1534+
1535+
if (mFTType != FTT_MAP_TILE)
1536+
{
1537+
LL_WARNS(LOG_TXT) << "Texture missing from server (404): " << mUrl << LL_ENDL;
1538+
}
15351539
}
15361540
else if (http_service_unavail == mGetStatus)
15371541
{
@@ -2734,7 +2738,7 @@ LLTextureFetchWorker* LLTextureFetch::getWorker(const LLUUID& id)
27342738

27352739

27362740
// Threads: T*
2737-
bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
2741+
bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, S32& worker_state,
27382742
LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux,
27392743
LLCore::HttpStatus& last_http_get_status)
27402744
{
@@ -2743,6 +2747,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
27432747
LLTextureFetchWorker* worker = getWorker(id);
27442748
if (worker)
27452749
{
2750+
worker_state = worker->mState;
27462751
if (worker->wasAborted())
27472752
{
27482753
res = true;
@@ -2821,6 +2826,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
28212826
}
28222827
else
28232828
{
2829+
worker_state = 0;
28242830
res = true;
28252831
}
28262832
return res;

indra/newview/lltexturefetch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class LLTextureFetch : public LLWorkerThread
9595

9696
// Threads: T*
9797
// keep in mind that if fetcher isn't done, it still might need original raw image
98-
bool getRequestFinished(const LLUUID& id, S32& discard_level,
98+
bool getRequestFinished(const LLUUID& id, S32& discard_level, S32& worker_state,
9999
LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux,
100100
LLCore::HttpStatus& last_http_get_status);
101101

indra/newview/llviewertexture.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ bool LLViewerFetchedTexture::updateFetch()
18721872
if (mRawImage.notNull()) sRawCount--;
18731873
if (mAuxRawImage.notNull()) sAuxCount--;
18741874
// keep in mind that fetcher still might need raw image, don't modify original
1875-
bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mRawImage, mAuxRawImage,
1875+
bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mFetchState, mRawImage, mAuxRawImage,
18761876
mLastHttpGetStatus);
18771877
if (mRawImage.notNull()) sRawCount++;
18781878
if (mAuxRawImage.notNull())
@@ -1979,6 +1979,7 @@ bool LLViewerFetchedTexture::updateFetch()
19791979
<< " mRawDiscardLevel " << mRawDiscardLevel
19801980
<< " current_discard " << current_discard
19811981
<< " stats " << mLastHttpGetStatus.toHex()
1982+
<< " worker state " << mFetchState
19821983
<< LL_ENDL;
19831984
}
19841985
setIsMissingAsset();

0 commit comments

Comments
 (0)