Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-16 15:24:35



Reply to topic  [ 4 posts ] 
Cool VL Viewer v1.30.2.3 crashes on changing texture on prim 
Author Message

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
This morning, Cool VL Viewer v1.30.2.3 crashed when trying to change specular texture settings on a single-prim object my avatar was wearing at the time. I have attached the SL and crash logs.

I was able to make the texture change by taking off the item, rezzing it in-world, editing it, and taking it back into Inventory, but something very strange happened when I did - the object's permissions changed:
Image
Incidentally, don't blame me for the object name... :oops:


Attachments:
File comment: Cool VL Viewer v1.30.2.3 crash logs
Cool VL Viewer v1.30.2.3 Crash Logs.zip [48.02 KiB]
Downloaded 38 times
2023-03-02 23:39:27
Profile

Joined: 2009-03-17 18:42:51
Posts: 5545
Reply with quote
linyifei wrote:
This morning, Cool VL Viewer v1.30.2.3 crashed when trying to change specular texture settings on a single-prim object my avatar was wearing at the time. I have attached the SL and crash logs.
Thank you !

It looks like the viewer entered an infinite, recursive loop and exhausted the stack memory... Sadly, given the "infinite" aspect, the stack trace does not list the call that triggered it in the first place, but just the 512 last function calls for the repetitions of that loop.

Beside, I am unable to reproduce the crash here by applying a specular map to an attached prim for a standard attachment.

Was it a rigged attachment ? Also, does the bug get triggered when changing the diffuse or normal maps as well ?

Could you please reproduce this bug, by first enabling the "Materials" debug tag ("Advanced" -> "Consoles" -> "Debug tags"), and post the resulting log/stack trace, so that we can (hopefully) see the trace of the call that triggers this bug in the viewer log (that may become enormous as a result: if it gets too big to post, just truncate it after the point where the infinite repetition starts) ?

Quote:
I was able to make the texture change by taking off the item, rezzing it in-world, editing it, and taking it back into Inventory, but something very strange happened when I did - the object's permissions changed:
This is not a viewer issue, but just a limitation (and bug for no-mod assets) of SL's permissions system: the container inherits the strictest permissions of the contained assets when you take it back to your inventory. Obviously, the maker of that object changed its permissions from their own inventory (only the creator can do that, unless the object is already full perm), but failed to verify that the contained assets do bear the same permissions. The result is that when the next owner rezzes that object and takes it back to their inventory, the permissions change...

This limitation makes sense for no-copy and no-tfr assets (and here, it's the creator responsibility for keeping the coherency between the assets and container permissions), but this is a very annoying bug for no-mod (closed sources) scripts; as a creator, when you want your scripts to be kept as closed sources, but wish to make the object containing them mod-ok for the final user, you can make the object mod-ok in-world, but it nonetheless gets flagged no-mod when taking it back to your inventory, because of the no-mod scripts. As the creator, you can make it mod-ok again in your inventory, but once you give or sell it, the final owner will be faced with the same permissions change issue when rezzing it and taking it back, and won't be able to make the modified object mod-ok again in their own inventory (meaning they won't be able to rename it any more in their inventory, neither change its description from there, but would have to re-rez it on the ground to do so).

EDIT: I might have found a potential reason for this bug, that could possibly happen (although I could not trigger it here) after a cancel action (direct or not) in the color picker.
Could you please try with a recompiled viewer, after changing LLFloaterColorPicker::cancelSelection() (in linden/indra/newview/llfloatercolorpicker.cpp, starting from line 979) to read:
Code:
void LLFloaterColorPicker::cancelSelection()
{
   // Avoid potential infinite loop since LLColorSwatchCtrl::onColorChanged()
   // could re-trigger a cancelSelection() call via its callback. HB
   if (!getVisible())
   {
      return;
   }
   // Hide picker dialog
   setVisible(false);

   // Restore the previous color selection
   setCurRgb(mOrigR, mOrigG, mOrigB);
   
   // We are going away and when we do and the entry widgets lose focus, they
   // do bad things so turn them off
   enableTextCallbacks(false);

   // Update in world item with original color via current swatch
   LLColorSwatchCtrl::onColorChanged(mSwatch, LLColorSwatchCtrl::COLOR_CANCEL);
}
Note: this is just a quick and dirty work-around, and if it works I will come up with a cleaner solution...


2023-03-03 08:35:21
Profile WWW

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
Henri Beauchamp wrote:
Was it a rigged attachment ? Also, does the bug get triggered when changing the diffuse or normal maps as well ?
No, it was not a rigged attachment. It was an old sculpty prim object from way before rigging was a thing in Second life. And changing the diffuse or normal map textures did not produce a crash. What I was trying to do was to give the prim a low sheen in ALM (to match other mesh components of my suit which have materials) by using a blank texture as the "map" and setting the colour to dark grey. I found that I could set the texture just fine, but the colour kept resetting itself back to white.
Quote:
Could you please reproduce this bug, by first enabling the "Materials" debug tag ("Advanced" -> "Consoles" -> "Debug tags"), and post the resulting log/stack trace, so that we can (hopefully) see the trace of the call that triggers this bug in the viewer log (that may become enormous as a result: if it gets too big to post, just truncate it after the point where the infinite repetition starts) ?
Frustratingly I found I couldn't get the crash to repeat doing what I thought I was doing this morning. However I found I could get it to repeat reliably if I pressed the Reset Material button. I have attached the logs to this message.
Quote:
I might have found a potential reason for this bug, that could possibly happen (although I could not trigger it here) after a cancel action (direct or not) in the color picker. Could you please try with a recompiled viewer, after changing LLFloaterColorPicker::cancelSelection() (in linden/indra/newview/llfloatercolorpicker.cpp
I applied this patch, and it did indeed fix the crash on pressing the Reset Material button.


Attachments:
Cool VL Viewer v1.30.2.3 Crash Logs.zip [61.69 KiB]
Downloaded 34 times
2023-03-03 12:51:16
Profile

Joined: 2009-03-17 18:42:51
Posts: 5545
Reply with quote
linyifei wrote:
I found I could get it to repeat reliably if I pressed the Reset Material button. I have attached the logs to this message.
Thank you ! It indeed causes a recursion in the original code...
Quote:
I applied this patch, and it did indeed fix the crash on pressing the Reset Material button.
Great ! I applied a better (non-hacky) fix for next release.


2023-03-03 13:17:53
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 24 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.