MantisBT - opensim
View Issue Details
0007415opensim[REGION] OpenSim Corepublic2015-01-15 09:412015-04-13 11:50
Intel Core i7-3770, 32 GBLinux/Ubuntu 12.04 32b0.8.0.3 release
master (dev code)
Grid (1 Region per Sim)
Mono / Linux32
Singularity 1.8.6 for OSX
0007415: Var region can not load .raw (LLRAW) terrains bigger than 256x256
If trying to load a 768x768 .raw (LLRAW) terrain file into a 768x768 var region, it fails with the error message:

2015-01-15 15:38:24,779 ERROR - OpenSim.Region.Framework.Scenes.EventManager [EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. Unable to load heightmap: wrong size, use a file with size 768 x 768 at OpenSim.Region.CoreModules.World.Terrain.Ter
rainModule.LoadFromFile (System.String filename) [0x00000] in <filename unknown>:0
  at OpenSim.Region.CoreModules.World.Terrain.TerrainModule.InterfaceLoadFile (System.Object[] args) [0x00000] in <filename unknown>:0
  at OpenSim.Region.CoreModules.Framework.InterfaceCommander.Command.Run (System.Object[] args) [0x00000] in <filename unknown>:0
  at OpenSim.Region.CoreModules.Framework.InterfaceCommander.Commander.ProcessConsoleCommand (System.String function, System.String[] args) [0x00000] in <filename unknown>:0
  at OpenSim.Region.CoreModules.World.Terrain.TerrainModule.EventManager_OnPluginConsole (System.String[] args) [0x00000] in <filename unknown>:0
  at OpenSim.Region.Framework.Scenes.EventManager.TriggerOnPluginConsole (System.String[] args) [0x00000] in <filename unknown>:0

The same terrain loads fine as a .png or .r32/.f32 file, saves apparently fine as a new .raw (LLRAW) file, but can't be reloaded as a .raw, while it reloads fine if saved as a new .png or .r32/.f32 file. The length and structure of both original and freshly saved .raw file appears correct with a size of 7667712 (768x768x13) bytes and similar 13 byte repeat sequences.

My guess is the LLRAW loader either calculates the dimensions wrong or uses hard-coded 256x256 dimensions still for .raw files.
Create a 768x768 var region. Try loading a 768x768 .raw (LLRAW) file. See error in console and log.
No tags attached.
patch 0001-Permit-loading-of-LLRAW-files-bigger-than-256x256.patch (1,626) 2015-01-28 09:09
Issue History
2015-01-15 09:41MagnuzNew Issue
2015-01-28 09:09MagnuzFile Added: 0001-Permit-loading-of-LLRAW-files-bigger-than-256x256.patch
2015-01-28 09:12MagnuzNote Added: 0027380
2015-01-28 09:12MagnuzStatusnew => patch included
2015-01-28 09:14MagnuzOSOpenSim release => Linux/Ubuntu 12.04 32b
2015-01-28 09:14MagnuzOS Version0.8.0.3 => release
2015-01-28 09:14MagnuzPlatformLinux/Ubuntu 12.04 32b => Intel Core i7-3770, 32 GB
2015-02-27 16:43justinccNote Added: 0027636
2015-02-27 16:43justinccStatuspatch included => resolved
2015-02-27 16:43justinccResolutionopen => fixed
2015-02-27 16:43justinccAssigned To => justincc
2015-04-13 11:50MagnuzNote Added: 0028001
2015-04-13 11:50MagnuzStatusresolved => closed
2015-04-13 11:50MagnuzFixed in Version => master (dev code)

2015-01-28 09:12   
Added patch calculating the terrain size for LLRAW the same way as for RAW32 instead of assuming default 256x256.
2015-02-27 16:43   
Committed as git master fad4d4d.

In this case, I had to add the missing "using OpenSim.Framework" statement to get it to compile.
2015-04-13 11:50   
Verified and closing.