Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-27 16:53:42



Reply to topic  [ 9 posts ] 
double spacer inventory crash 
Author Message

Joined: 2018-06-13 23:15:59
Posts: 34
Reply with quote
when clicking this spacer on Lua Inventory floater, viewer crash. that double spacer sometimes shows up in main Inventory floater and also makes the viewer crash.
Image
Image
I reproduce it by doing:
open lua inventory floater
minimize lua inventory floater
try to open again lua inventory floater
maximize lua inventory floater
right click any item

sometimes I don't even need to do this steps just by running the viewer and open any inventory it's just there


Attachments:
LOG CoolVLViewer_8780.zip [21.4 KiB]
Downloaded 52 times
2023-05-05 18:31:47
Profile

Joined: 2009-03-17 18:42:51
Posts: 5554
Reply with quote
I cannot reproduce this bug here, following your repro steps (no double-spacer seen): I need the stack trace (Linux, macOS) or crash dump file (Windows) to find out where the viewer crashes for you and fix it.

Also, the copy/paste options are missing from your context menu: this may be related on how you tried to override them with Lua ?... In which case, I'd need your Lua code to check what you did wrong and how this wrong doing can cause the disappearance of the normal copy/paste entries...


2023-05-05 21:06:22
Profile WWW

Joined: 2018-06-13 23:15:59
Posts: 34
Reply with quote
I looked for the dump file but it was empty (0Kb), I'll try to reproduce it more times and make the viewer crash maybe one of those atemps makes the dump file.
in the mean time here is my automation lua script, I honestly didn't touched any context menu with lua but just in case.

EDIT: I made a video, aparently it's something whith the windows size, maybe a driver issue?, see by yourself
https://www.youtube.com/watch?v=rsLX5Jo6BlE

Code:
known_ids = {}
known_sessions = {}
tp_started = false
tp_retry = false
avatars_colors = {}
colors = {"red","green","blue","yellow","magenta","cyan","orange","purple","pink"}

-- Here, we define a custom set of side bar buttons for performing useful
-- tasks or opening commonly used floaters that do not have an associated
-- toolbar button.
-- We also perform tasks that can only happen after successful login.
function OnLogin(location)
     -- Setup the sidebar
    SideBarHideOnRightClick()
    SideBarHide(false)
    SideBarButton(1, "inv_item_landmark_visited.tga", "OpenFloater('teleport history')", "Opens the Teleport history")
    SideBarButton(2, "inv_item_settings.tga", "OpenFloater('preferences')", "Opens the Preferences floater")
    SideBarButton(3, "43f0a590-f3d3-48b5-b460-f5b3e6e03626.tga", "OpenFloater('sounds list')", "Opens the Sounds list floater")
    SideBarButton(4, "inv_folder_clothing.tga","OpenLuaFloater('inventory');SetLuaFloaterValue('inventory','inventory1', 'My Outfits')", "Opens outfits folder")
     -- Define the Lua pie menu for avatars
    DefineAvatarPieMenu()
 end

-- This callback is invoked each time the side bar visibility is changed. We
-- use it to display the Lua icon in the status bar whenever the side bar gets
-- hidden and we setup the command for that icon so that, when clicked, it
-- shows the side bar (which in turn hides the status bar icon via this
-- callback).
function OnSideBarVisibilityChange(visible)
    if visible then
        StatusBarLuaIcon("")
    else
        StatusBarLuaIcon("SideBarHide(false)", "Shows the Lua buttons side bar")
    end
end

-- Here we add pseudo commands to:
--  * emulate Firestorm's "/dd" (draw distance) command (with "/dd" alone as an
--    alias for "/dd 256");
--  * toggle the camera front view with "/fc";
--  * adjust the avatar Z offset with "/z " followed by a amount of centimeters
--    (e.g.: "/z -8" to lower your avatar height by 8 cm), with "/z" alone to reset
--    the offset to zero.
function OnSendChat(text)
    if string.sub(text, 1, 1) ~= "/" then
        -- Do not waste time searching for commands if the first character is
        -- not a slash...
        return text
    end
    if text == "/fc" then
        SetDebugSetting("CameraFrontView", not GetDebugSetting("CameraFrontView"))
        return ""
    end
    if text == "/dd" then
        SetDebugSetting("RenderFarClip", 256)
        return ""
    end
    local i, j = string.find(text, "/dd ")
    if i == 1 then
        local distance = tonumber(string.sub(text, j + 1))
        if distance > 512 then
            distance = 512
        elseif distance < 32 then
            distance = 32
        end
        SetDebugSetting("RenderFarClip", distance)
        return ""
    end
    if text == "/z" then
        SetDebugSetting("AvatarOffsetZ", 0)
        return ""
    end
    i, j = string.find(text, "/z ")
    if i == 1 then
        local offset = tonumber(string.sub(text, j + 1)) / 100
        if offset > 9 then
            offset = 9
        elseif offset < -9 then
            offset = 9
        end
        SetDebugSetting("AvatarOffsetZ", offset)
        return ""
    end
end

function OnLuaDialogClose(title, button, text)
    if title == "Retry TP" and button == 3 then
        max_agent = tonumbe(text)
        if max_agent > 0 then
            tp_retry = true
            OverlayBarLuaButton("Cancel auto-TP", "AutomationMessage('cancel-auto-tp')")
        end
    end
end

function OnFailedTPSimChange(agents, x, y, z)
    if tp_retry and agents < max_agents then
        TeleportAgentToPos(x, y, z)
        OverlayBarLuaButton("", "")
    end
end

-- Here is an example of how to use the Lua pie menu, the mini-map and tag
-- colors, and the OnAvatarRezzing() callback.
-- This defines an avatar pie menu with colors you can set for the corresponding
-- avatar's dot in the mini-map and name tag. The color is remembered during the
-- session, even if the avatar gets de-rezzed and re-rezzed.
function DefineAvatarPieMenu()
    LuaPieMenuSlice(4, 1, "Blue", "nop")
    LuaPieMenuSlice(4, 2, "Cyan", "nop")
    LuaPieMenuSlice(4, 3, "Red", "nop")
    LuaPieMenuSlice(4, 4, "Magenta", "nop")
    LuaPieMenuSlice(4, 5, "Yellow", "nop")
    LuaPieMenuSlice(4, 6, "White", "nop")
    LuaPieMenuSlice(4, 7, "Default", "nop")
    LuaPieMenuSlice(4, 8, "Green", "nop")
end

function OnLuaPieMenu(data)
    local color = ""
    if data.slice == 1 then
        color = "blue"
    elseif data.slice == 2 then
        color = "cyan"
    elseif data.slice == 3 then
        color = "red"
    elseif data.slice == 4 then
        color = "magenta"
    elseif data.slice == 5 then
        color = "yellow"
    elseif data.slice == 6 then
        color = "white"
    elseif data.slice == 8 then
        color = "green"
    end
    avatars_colors[data.object_id] = color
    SetAvatarMinimapColor(data.object_id, color)
    SetAvatarNameTagColor(data.object_id, color)
end

function OnChatTextColoring(id, name, text)
   local color = avatars_colors[id]
   local randomInt
    if IsAgentFriend(id) then
      --if color then --check if your friend have an pre-assigned color
      --   return color
      --else
         SetAvatarMinimapColor(id,"0.4,1.0,0.2")
         SetAvatarNameTagColor(id,"0.4,1.0,0.2")
         return "0.4,1.0,0.2" --Friends default color
         --end
    end
    return ""
end

function OnRegionChange(region)
   avatars_colors = {}
end

function OnAvatarRezzing(id)
    local color = avatars_colors[id]
    if color then
        SetAvatarMinimapColor(id, color)
        SetAvatarNameTagColor(id, color)
    end
    if IsAgentFriend(id) then
      if color then --check if your friend have an pre-assigned color
         return color
      else
         SetAvatarMinimapColor(id, "0.4,1.0,0.2")
         SetAvatarNameTagColor(id, "0.4,1.0,0.2")
         return "0.4,1.0,0.2" --Friends default color
      end
    end
end
known_sessions = {}

function OnInstantMsg(session_id, origin_id, session_type, name, text)
   if session_type == 0 then
      PlayUISound("NewIncomingIMSession")
      --OpenNotification(0,name .. text)
   end
   
    -- If it is not a conference session or it already got dealt with, do not care
    if session_type ~= 2 or known_sessions[session_id] then
        return
    end
    -- Flag this new conference session as already dealt with
    known_sessions[session_id] = true
    -- If not initiated by a friend, close the session and mute the initiator
    -- NOTE: OnInstantMsg() always receives the legacy name in 'name'
    if not IsAgentFriend(name) then
        CloseIMSession(session_id)
        AddMute(name)
        -- Depending on viewer configuration, the name may get any "Resident"
        -- last name stripped off. Since we mute the initiator by name (because
        -- their UUID is sadly not passed to the viewer by the server when a
        -- conference IM is initiated), we must ensure that any new resident
        -- who got "Resident" as their last name for their avatar (case of all
        -- the griefers that register new avatars) have both "Firstname" and
        -- "Firstname Resident" registered in our mute list...
        if not string.find(name, " ") then
            -- There is no last name, so "name" is "Firstname" and we must add
            -- "Firstname Resident".
            AddMute(name .. " Resident")
        else
            local i = string.find(name, " Resident")
            if i then
                -- "name" is "Firstname Resident" and we must add "Firstname".
                AddMute(string.sub(name, 1, i - 1))
            end
        end
    end
end


2023-05-05 23:49:52
Profile

Joined: 2009-03-17 18:42:51
Posts: 5554
Reply with quote
I could only reproduce this bug under Windows, and it is indeed related with the viewer window resizing. Why, is the question, and I will have to investigate this deeper, which might take some time, especially since, like you, I could not get Windows to create a debug mini-dump on crash... :shock:

In any case, it is not Lua or driver related (more likely a resize event not making its way through the viewer code under Windows)...

EDIT: I might have found the bug and PMed you a link to a test build...


2023-05-06 08:32:40
Profile WWW

Joined: 2018-06-13 23:15:59
Posts: 34
Reply with quote
I tested the beta viewer that you sent me, at the first apparently it was fixed but I wasn't able to open my lua inventory floater ( I tested my lua script with the non beta viewer and it's working fine), so I opened a second main inventory floater and the two spacers show up. seems something related about opening multiple inventory floaters and the windows resizing.
Crash dump it's still empty.
Image


Attachments:
CoolVLViewer_8636.zip [12.77 KiB]
Downloaded 59 times
2023-05-06 16:04:11
Profile

Joined: 2009-03-17 18:42:51
Posts: 5554
Reply with quote
Quote:
I opened a second main inventory floater and the two spacers show up. seems something related about opening multiple inventory floaters and the windows resizing.
This is extremely strange, because I cannot reproduce the bug any more here... And could not reproduce it either by opening several Inventory floaters. :?

Quote:
I wasn't able to open my lua inventory floater
There are corresponding warnings in the log:
Code:
2023-05-06 15:55:54Z WARNING: LLUICtrlFactory::getLayeredXMLNode: Could not find UI description file: xui/en-us\floater_lua_inventory.xml
2023-05-06 15:56:11Z WARNING: LLUICtrlFactory::getLayeredXMLNode: Could not find UI description file: xui/en-us\floater_lua_inventory.xml
So, it is like if the floater_lua_inventory.xml file vanished or was unreadable... In any case, the small change I made cannot explain this, and nothing should have changed compared to previous versions as far as Lua is concerned. I can also open my custom Lua floater, here, so... :?:

Quote:
Crash dump it's still empty.
This is a very annoying problem, because we can't spot the place where the viewer crashes in the code... :(


2023-05-06 18:04:13
Profile WWW

Joined: 2018-06-13 23:15:59
Posts: 34
Reply with quote
Quote:
There are corresponding warnings in the log:
Code:
2023-05-06 15:55:54Z WARNING: LLUICtrlFactory::getLayeredXMLNode: Could not find UI description file: xui/en-us\floater_lua_inventory.xml
2023-05-06 15:56:11Z WARNING: LLUICtrlFactory::getLayeredXMLNode: Could not find UI description file: xui/en-us\floater_lua_inventory.xml
So, it is like if the floater_lua_inventory.xml file vanished or was unreadable... In any case, the small change I made cannot explain this, and nothing should have changed compared to previous versions as far as Lua is concerned. I can also open my custom Lua floater, here, so... :?:

ups I forgot to copy the .xml, that fixed my lua inventory but the problem it's still there. I'll try your beta with my laptop.


2023-05-06 18:45:52
Profile

Joined: 2018-06-13 23:15:59
Posts: 34
Reply with quote
I've tidings, with the beta2 that you sent me the double spacer isn't happening anymore although I'm missing rename option and it's only happening with extra inventories floaters.
I wasn't able to reproduce this bug in my laptop, with the same version I was using before in my main pc (30.2.11) nor the last one (30.2.12) (I'll keep trying here and there just in case)

main inventory floater:
Image

second inventory floater and lua floater:
Image


2023-05-07 20:30:24
Profile

Joined: 2009-03-17 18:42:51
Posts: 5554
Reply with quote
Mr.Tach wrote:
I've tidings, with the beta2 that you sent me the double spacer isn't happening anymore although I'm missing rename option and it's only happening with extra inventories floaters.
Might be some other bug to find then... Good to know the copy/paste entries are back and the menu does not crash any more.

Quote:
I wasn't able to reproduce this bug in my laptop, with the same version I was using before in my main pc (30.2.11) nor the last one (30.2.12) (I'll keep trying here and there just in case)
Yes, it would be great to be able to reproduce the issue reliably, so that I could instrument the code and reproduce it myself, to find the bug...


2023-05-07 21:43:02
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

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