MantisBT - opensim
View Issue Details
0008558opensim[GRID] Grid Servicepublic2019-07-06 02:342019-07-06 13:15
Gavin Hird 
Standalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Firestorm and Dayturn
0008558: hard_agent_limit in RegionInfo2 never initialized or updated
There is an issue in recent builds of Firestorm and Dayturn which both have this patch implemented [^]

This patch adds HardMaxAgents / hard_agent_limit to RegionInfo2, but for OpenSim it is never initialized to anything as far as I can see despite being defined in LLClientView.cs, so the viewer gets garbage. It is also not included in GridService.cs public RegionData RegionInfo2RegionData(GridRegion rinfo)

hard_agent_limit is initialized to 100 in the viewer, so that is what the viewer will try to set and write back to the database.

As we have a variable in Regions.ini.example
; MaxAgents = 100

I suggest hard_agent_limit is initialized to 100 if unset in Regions.ini for a region, and given the value set for the region if present in Regions.ini

The above patch has not been taken for any current versions of Singularity, so it has the old, original behavior.

Just to clarify, the hard_agent_limit sets the Max allowed value of the spinner in the input field "agent_limit_spin" in the form panel_region_general.xml

The max value is initialized to 100 in the form itself, and on first view of the form also hard_agent_limit is initialized to 100, so the form seems to work ok.

After updating the field the first time and accepting the new value with the Apply button, the spinner field will be set to -1 the next time it is updated because at that time hard_agent_limit is being queried with the Region and is set to some random value that makes the code set it to -1, from then on the form us useless. This happens in llfloaterregioninfo.cpp in the viewer.
No tags attached.
Issue History
2019-07-06 02:34Gavin HirdNew Issue
2019-07-06 02:34Gavin HirdSummaryhard_agent_limit in RegionInfo 2 never initialized or updated => hard_agent_limit in RegionInfo2 never initialized or updated
2019-07-06 03:23Gavin HirdSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8262#r8262
2019-07-06 11:51UbitUmarovNote Added: 0035452
2019-07-06 11:54UbitUmarovNote Edited: 0035452bug_revision_view_page.php?bugnote_id=35452#r8264
2019-07-06 13:11UbitUmarovNote Added: 0035453
2019-07-06 13:14Gavin HirdNote Added: 0035454
2019-07-06 13:15Gavin HirdNote Edited: 0035454bug_revision_view_page.php?bugnote_id=35454#r8266
2019-07-06 13:15Gavin HirdStatusnew => resolved

2019-07-06 11:51   
(edited on: 2019-07-06 11:54)
We actually do send values, for now max uint values.
But seems viewers decode it as int, so the magic -1.

in fact they are defined as uint in the protocol
    { MaxAgents32 U32 } // Identical to RegionInfo.MaxAgents but allows greater range
        { HardMaxAgents U32 }
        { HardMaxObjects U32 }

2019-07-06 13:11   
changed master to send the values from the configuration files.
uint/int should not be a issue now since values are small and positive (byte should be enough for a long long time)
Thanks for the debug help Gavin.
Gavin Hird   
2019-07-06 13:14   
(edited on: 2019-07-06 13:15)
Yeah, I just built and tested it, and it worked so much better!
Good job!