liuweireign / tectonicus

Automatically exported from code.google.com/p/tectonicus
0 stars 0 forks source link

ArrayIndexOutOfBoundsException on lighting paintings #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
 + + + + + + + + + + + + + + + + + + + + + + +
                  Tectonicus
   Version: 2.19
   Build 42\:124M\r\n
   Constructed on November 10 2013 at 2003
 + + + + + + + + + + + + + + + + + + + + + + +
Started on Sat Nov 23 23:21:25 EST 2013
System:
    OS Name: Linux
    OS Architecture: amd64
    OS Version: 3.12-0.slh.1-aptosid-amd64
    Java vendor: Oracle Corporation
    Java version: 1.7.0_25
    Awt toolkit: sun.awt.X11.XToolkit
    Headless?: null
Settings:
    mode:CommandLine
    rasteriser:Lwjgl
    useCache:true
    texturePack:none
    colourDepth:24
    alphaBits:8
    numSamples:4
    tileSize:512
    numZoomLevels:8
    portalsInitiallyVisible:false
    showSpawn:true
    signsInitiallyVisible:false
    playersInitiallyVisible:false
    bedsInitiallyVisible:false
    spawnInitiallyVisible:false
    viewsInitiallyVisible:false
    eraseOutputDir:false
    extractLwjglNatives:true
    isVerbose:false
    forceLoadAwt:false
    force32BitNatives:false
    force64BitNatives:false
    outputHtmlName:index.html
    numDownsampleThreads:4
    singlePlayerName:
'********' map
    dimension: Terra
    cameraAngle: 45
    cameraElevation: 45
    closestZoomSize: 12
    worldSubset: FullWorldSubset
    useBiomeColours: false
    'Cave' layer
        renderStyle: ExploredCaves
        lightStyle: Cave
        imageFormat: Png
        customBlockConfig: 
    'Day' layer
        renderStyle: Regular
        lightStyle: Day
        imageFormat: Png
        customBlockConfig: 
Using existing player skin cache
Creating player icon assembler
Initialising display...
    Drawable: null
    created pbuffer: org.lwjgl.opengl.Pbuffer@917024b
    used pixel format:   colour:24 depth:16 alpha:8 stencil:0 samples:4
    display created ok
Using rasteriser: tectonicus.rasteriser.lwjgl.LwjglRasteriser@4c5af153
 -- Lwjgl Rasteriser -- 
    LWJGL version: 2.9.0
    type: Offscreen
    width: 2048
    heigth: 2048
    pBuffer: org.lwjgl.opengl.Pbuffer@917024b
    OpenGL Vendor: X.Org
    OpenGL Renderer: Gallium 0.4 on AMD CAYMAN
    OpenGL Version: 3.0 Mesa 9.2.2
Creating camera
TileRenderer init complete
StartingRenderer
Starting tile renderer
Loading level.dat
Loading textures
Creating block registry
Loading players
Detected Anvil save format
CalculatingChunkHashes
Discovering chunks...

Found 71161 chunks in total
Found 0 views
Finding visible tiles...
FindVisibleTiles
100%
found 115588 total tiles to output
Finding changed tiles since last render...
FindChangedTiles
Generating compass image...
Generating portal image...
Writing portals...
Writing views...
Outputted 151 block counts
Outputted world stats
Finding changed views...
Found 0 changed views (out of 0 total views)
Drawing Day views...
Drawing Night views...
View rendering done!
100%
FindChangedTiles took: 104.353 seconds
RenderBaseTiles
Base render is at zoom 12 with 512x512 tiles
RenderBaseTiles
java.lang.ArrayIndexOutOfBoundsException: -1
    at tectonicus.raw.RawChunk.getBlockLight(RawChunk.java:694)
    at tectonicus.Chunk.getBlockLight(Chunk.java:349)
    at tectonicus.Chunk.getLight(Chunk.java:488)
    at tectonicus.blockTypes.Painting.addEdgeGeometry(Painting.java:317)
    at tectonicus.Chunk.createGeometry(Chunk.java:160)
    at tectonicus.world.World.draw(World.java:536)
    at tectonicus.world.World.draw(World.java:483)
    at tectonicus.TileRenderer.renderBaseTiles(TileRenderer.java:676)
    at tectonicus.TileRenderer.output(TileRenderer.java:321)
    at tectonicus.TectonicusApp.run(TectonicusApp.java:952)
    at tectonicus.TectonicusApp.main(TectonicusApp.java:1212)
Cleaning up...
Writing player skin cache info (11 skins to write)
100%
Player skin cache written
Finished

Original issue reported on code.google.com by djp...@gmail.com on 24 Nov 2013 at 4:38

GoogleCodeExporter commented 9 years ago
I believe I am seeing the exact same issue. Tectonicus 2.19 will render the 
base level of tiles then quit with a similar error. It won't down sample and 
never creates the HTML file. The same world file generates just fine using 2.18 
(minus the new block types of course).

Original comment by flash....@gmail.com on 29 Nov 2013 at 7:00

Attachments:

GoogleCodeExporter commented 9 years ago
I am seeing an issue which is, if not exactly the same, *very* similar. My 
stacktrace is

java.lang.ArrayIndexOutOfBoundsException: -1
        at tectonicus.raw.RawChunk.getSkyLight(RawChunk.java:667)
        at tectonicus.Chunk.getSkyLight(Chunk.java:326)
        at tectonicus.Chunk.getLight(Chunk.java:430)
        at tectonicus.blockTypes.Painting.addEdgeGeometry(Painting.java:317)
        at tectonicus.Chunk.createGeometry(Chunk.java:160)
        at tectonicus.world.World.draw(World.java:536)
        at tectonicus.world.World.draw(World.java:483)
        at tectonicus.TileRenderer.renderBaseTiles(TileRenderer.java:676)
        at tectonicus.TileRenderer.output(TileRenderer.java:321)
        at tectonicus.TectonicusApp.run(TectonicusApp.java:952)
        at tectonicus.TectonicusApp.main(TectonicusApp.java:1212)

The base tiles seem all to have been generated (*some* base tiles were 
certainly generated) but no downsampled tiles nor the html file were output.

My map is quite large so rendering takes a while, but I'll try a render with 
2.18 and see if it works there.

Original comment by grel...@gmail.com on 5 Dec 2013 at 2:58

GoogleCodeExporter commented 9 years ago
I've attached a patch for a workaround for this issue, which I can confirm 
fixed my crash. It probably causes lighting glitches on paintings; I didn't 
have any exposed paintings in my map to check.

My best guess at a diagnosis is that this is caused by paintings crossing a 
chunk boundary, which I don't know nearly enough about the codebase to fix 
properly.

Original comment by grel...@gmail.com on 19 Dec 2013 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago
hello I wonder if this problem was fixed in some way because I'm getting 
exactly the same thing with tectonicus (actually as I see my map is very 
similar in size to the one discussed)

I would like to know what should I do with this .patch file to get it to work?

Original comment by vtr...@gmail.com on 26 Dec 2013 at 12:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Any progress on this issue? Or an easy way to apply the patch linked in #3 
(I've got no clue how to use it unfortunately.) Maybe someone can provide a JAR 
with the patch already applied?

Original comment by flash....@gmail.com on 25 Jan 2014 at 6:55

GoogleCodeExporter commented 9 years ago
I really can't recommend that people use this, as there's no way to verify that 
I haven't backdoored it, but I've attached my build with my patch applied.

To apply the patch yourself, you'll need to get yourself set up to build 
Tectonicus as described in this wiki page: 
http://code.google.com/p/tectonicus/wiki/EclipseSetup Eclipse should then have 
an option to apply a patch file to the project, though to be honest it's just a 
couple of lines and can very easily be applied by hand if needed. Once the 
patch is applied just build the project and you should have a working jar to 
use.

Original comment by grel...@gmail.com on 27 Jan 2014 at 1:46

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. I've really been hoping we'd see an official update since this appears 
to be a simple fix.

Original comment by flash....@gmail.com on 7 Feb 2014 at 6:48

GoogleCodeExporter commented 9 years ago
Tectonicus is being moved over to GitHub here: 
https://github.com/tectonicus/tectonicus

I have imported this issue into the new GitHub project issue tracker: 
https://github.com/tectonicus/tectonicus/issues/36

Original comment by skoeven on 28 Aug 2014 at 3:55

GoogleCodeExporter commented 9 years ago
I added the above patch to the source which should hopefully work for now. 
v2.19.01 is available for download here:  
https://github.com/tectonicus/tectonicus/releases/tag/v2.19.01

Original comment by skoeven on 5 Sep 2014 at 10:54

GoogleCodeExporter commented 9 years ago
Thanks for adding the patch. However I can't get our MC 1.8 map to render with 
either grelphy's version or th enew 2.19.01.

Original comment by flash....@gmail.com on 6 Sep 2014 at 5:01

GoogleCodeExporter commented 9 years ago
Tectonicus v2.19.01 isn't compatible with Minecraft 1.8.  MC 1.8 created a 
whole bunch of new issues that have to be fixed in Tectonicus.  I've been able 
to get several of them solved, but still have more work to do.  
If I can find the time I'm hoping to have a MC 1.8 compatible version of 
Tectonicus out in about a week.  That will include a bunch of bug fixes and 
support for all the new blocks (except Banners and Armor Stands, I think those 
are going to be tricky to get working).

Original comment by skoeven on 8 Sep 2014 at 7:18

GoogleCodeExporter commented 9 years ago
Roger that, sorry for the confusion.

Thanks for your work on this project, it is appreciated by a huge number of 
people.

Original comment by flash....@gmail.com on 8 Sep 2014 at 1:28

GoogleCodeExporter commented 9 years ago
FYI, Tectonicus v2.20 is now available.  It is compatible with Minecraft 1.8 
worlds.  Get it here: 
https://github.com/tectonicus/tectonicus/releases/tag/v2.20

Original comment by skoeven on 22 Sep 2014 at 8:15