Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-16 18:45:04



Reply to topic  [ 2 posts ] 
Crash in updateImagesDecodePriorities 
Author Message

Joined: 2011-10-07 10:39:20
Posts: 181
Reply with quote
Hi Henri,

got a crash from an invalid imagep inside updateImagesDecodePriorities().

Code:
   if (iter == mUUIDMap.end())
      {
         iter = mUUIDMap.begin();
      }
      mLastUpdateUUID = iter->first;
      LLPointer<LLViewerFetchedTexture> imagep = iter++->second;

      // Flush formatted images using a lazy flush

      // 1 for mImageList, 1 for mUUIDMap, 1 for local reference:
      const S32 min_refs = 3;

crash=>    S32 num_refs = imagep->getNumRefs();

      if (num_refs <= min_refs)
      {
         if (!imagep->hasFetcher() &&   // Paranoia...
            imagep->getElapsedLastReferenceTime() > max_inactive_time * 0.5f)


Is line 1033 and the comment before still correct with the new texture fetch?
Somehow imagep is NULL, and getNumRefs() blows up when trying to access the ref count on offset 8 of the imagep.

Maybe you see what happend from the log?

Its my self built one and not latest version, so the .dmp file would be useless.

Thx, Kathrine


Attachments:
CoolVLViewer_12936.zip [21.45 KiB]
Downloaded 88 times
2021-04-14 17:57:33
Profile

Joined: 2009-03-17 18:42:51
Posts: 5545
Reply with quote
kathrine wrote:
Is line 1033 and the comment before still correct with the new texture fetch?
Yes, it should make no difference whatsoever in this part of the code...

Quote:
Somehow imagep is NULL, and getNumRefs() blows up when trying to access the ref count on offset 8 of the imagep.
Strange that I never got this crash, with all the intensive stress-testing I have been submitting the viewer to this past weeks...

Quote:
Maybe you see what happend from the log?
There are missing textures, but I do get some of those too and they never caused a crash...

Quote:
Its my self built one and not latest version, so the .dmp file would be useless.
I see from the log that you are using the "new" (and bogus) curl version (7.54.1) instead of the old one in your build... May perhaps explain it, though I do not see how right now (there is no occurrence of my work-around triggering for the pipelining bug in the log, which would show a "Temporarily disabling HTTP pipelining" warning when it fires up).

I changed the code as follow for the next release: it should catch and fix NULL pointers:
Code:
   uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID);
   while ((update_counter-- > 0 || (mFlushOldImages && map_size-- > 0)) &&
         !mUUIDMap.empty())
   {
      if (iter == mUUIDMap.end())
      {
         iter = mUUIDMap.begin();
      }
      LLPointer<LLViewerFetchedTexture> imagep = iter->second;
      if (imagep.isNull())
      {
         llwarns << "NULL texture pointer found in list for texture Id: "
               << iter->first << ". Removing." << llendl;
         iter = mUUIDMap.erase(iter);
         continue;
      }
      mLastUpdateUUID = iter++->first;

      // Flush formatted images using a lazy flush
.../...


2021-04-14 19:47:31
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 32 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:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.