Stargate Network

Stargate Network

3M Downloads

DHD placement crash

Sarous opened this issue ยท 6 comments

commented

2.0.0 alpha 40

with a vertical (standing) and horizontal gate in the same chunk, crashed when placing the DHD. Crashed again upon loaded back into the save after it was placed. Had to delete the DHD with MCEdit before it would load correctly. I am unsure which gate the DHD attempted to link with.

edit: repeated the experiment with only 2.0.0 a40 & malisiscore, this is the log from the latter test
edit2: after counting block distance, the Stargate Controller (DHD) which caused the crash was too far away from either gate to link properly.
---- Minecraft Crash Report ----

WARNING: coremods are present:
MalisisCorePlugin (malisiscore-1.12.2-6.5.1.jar)
Contact their authors BEFORE contacting forge

// But it works on my machine.

Time: 3/28/19 12:18 AM
Description: Rendering Block Entity

java.lang.NullPointerException: Rendering Block Entity
at gcewing.sg.client.renderer.DHDTERenderer.render(DHDTERenderer.java:69)
at gcewing.sg.BaseTileEntityRenderer.func_192841_a(BaseTileEntityRenderer.java:23)
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_192854_a(TileEntityRendererDispatcher.java:155)
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_180546_a(TileEntityRendererDispatcher.java:130)
at net.minecraft.client.renderer.RenderGlobal.func_180446_a(RenderGlobal.java:705)
at net.minecraft.client.renderer.EntityRenderer.func_175068_a(EntityRenderer.java:1347)
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1259)
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1062)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Thread: Client thread
Stacktrace:
at gcewing.sg.client.renderer.DHDTERenderer.render(DHDTERenderer.java:69)
at gcewing.sg.BaseTileEntityRenderer.func_192841_a(BaseTileEntityRenderer.java:23)

-- Block Entity Details --
Details:
Name: minecraft:gcewing.sg.dhdte // gcewing.sg.tileentity.DHDTE
Block type: ID #293 (tile.sgcraft:stargateController // gcewing.sg.block.DHDBlock // sgcraft:stargatecontroller)
Block data value: 2 / 0x2 / 0b0010
Block location: World: (-95,70,-201), Chunk: (at 1,4,7 in -6,-13; contains blocks -96,0,-208 to -81,255,-193), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Actual block type: ID #293 (tile.sgcraft:stargateController // gcewing.sg.block.DHDBlock // sgcraft:stargatecontroller)
Actual block data value: 2 / 0x2 / 0b0010
Stacktrace:
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_192854_a(TileEntityRendererDispatcher.java:155)
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_180546_a(TileEntityRendererDispatcher.java:130)
at net.minecraft.client.renderer.RenderGlobal.func_180446_a(RenderGlobal.java:705)
at net.minecraft.client.renderer.EntityRenderer.func_175068_a(EntityRenderer.java:1347)
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1259)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Silver'/3, l='MpServer', x=-94.33, y=70.00, z=-204.10]]
Chunk stats: MultiplayerChunkCache: 576, 576
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (-260,64,196), Chunk: (at 12,4,4 in -17,12; contains blocks -272,0,192 to -257,255,207), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 18494 game time, 18494 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 63 total; [EntityCreeper['Creeper'/512, l='MpServer', x=-107.50, y=26.00, z=-188.50], EntityBat['Bat'/898, l='MpServer', x=-145.56, y=41.00, z=-269.24], EntityBat['Bat'/387, l='MpServer', x=-128.53, y=51.35, z=-230.64], EntityCreeper['Creeper'/134, l='MpServer', x=-59.50, y=63.00, z=-181.50], EntityBat['Bat'/138, l='MpServer', x=-31.53, y=56.10, z=-186.25], EntityBat['Bat'/394, l='MpServer', x=-156.34, y=42.00, z=-172.25], EntityZombie['Zombie'/11, l='MpServer', x=-77.32, y=58.00, z=-200.67], EntityZombie['Zombie'/12, l='MpServer', x=-78.23, y=58.00, z=-196.44], EntityHorse['Horse'/13, l='MpServer', x=-59.18, y=65.00, z=-191.55], EntityHorse['Horse'/14, l='MpServer', x=-59.88, y=65.00, z=-192.80], EntityBat['Bat'/142, l='MpServer', x=-27.53, y=47.10, z=-201.54], EntitySquid['Squid'/146, l='MpServer', x=-63.46, y=61.41, z=-171.17], EntitySheep['Sheep'/19, l='MpServer', x=-82.40, y=72.00, z=-234.26], EntityPlayerSP['Silver'/3, l='MpServer', x=-94.33, y=70.00, z=-204.10], EntityBat['Bat'/21, l='MpServer', x=-117.75, y=18.10, z=-176.25], EntityCreeper['Creeper'/22, l='MpServer', x=-141.50, y=81.00, z=-174.50], EntityCow['Cow'/23, l='MpServer', x=-72.84, y=70.00, z=-222.27], EntitySkeleton['Skeleton'/919, l='MpServer', x=-22.50, y=71.00, z=-255.50], EntityBat['Bat'/24, l='MpServer', x=-114.25, y=48.10, z=-197.25], EntityEnderman['Enderman'/794, l='MpServer', x=-142.50, y=43.00, z=-273.50], EntityBat['Bat'/538, l='MpServer', x=-26.08, y=31.05, z=-176.29], EntitySkeleton['Skeleton'/795, l='MpServer', x=-141.50, y=43.00, z=-269.50], EntityCreeper['Creeper'/28, l='MpServer', x=-164.80, y=85.00, z=-149.62], EntityCow['Cow'/29, l='MpServer', x=-89.21, y=72.00, z=-233.33], EntityCow['Cow'/30, l='MpServer', x=-98.16, y=72.00, z=-234.17], EntityZombie['Zombie'/671, l='MpServer', x=-53.50, y=36.00, z=-172.50], EntityCreeper['Creeper'/927, l='MpServer', x=-163.50, y=66.00, z=-218.50], EntityCreeper['Creeper'/33, l='MpServer', x=-125.20, y=77.00, z=-182.45], EntitySkeleton['Skeleton'/420, l='MpServer', x=-103.50, y=72.00, z=-247.50], EntitySkeleton['Skeleton'/934, l='MpServer', x=-124.50, y=30.00, z=-223.50], EntityZombieVillager['Zombie Villager'/39, l='MpServer', x=-124.50, y=28.00, z=-243.50], EntityCreeper['Creeper'/40, l='MpServer', x=-123.50, y=71.00, z=-242.50], EntitySpider['Spider'/680, l='MpServer', x=-38.50, y=35.00, z=-183.50], EntitySkeleton['Skeleton'/41, l='MpServer', x=-129.50, y=70.00, z=-238.50], EntityCreeper['Creeper'/425, l='MpServer', x=-144.50, y=41.00, z=-270.50], EntitySkeleton['Skeleton'/681, l='MpServer', x=-40.50, y=35.00, z=-186.50], EntitySkeleton['Skeleton'/42, l='MpServer', x=-133.33, y=70.00, z=-229.73], EntitySkeleton['Skeleton'/50, l='MpServer', x=-129.18, y=71.00, z=-202.79], EntitySheep['Sheep'/52, l='MpServer', x=-171.76, y=77.00, z=-180.50], EntitySkeleton['Skeleton'/436, l='MpServer', x=-54.50, y=33.00, z=-212.50], EntityBat['Bat'/53, l='MpServer', x=-119.75, y=53.10, z=-227.25], EntityCreeper['Creeper'/56, l='MpServer', x=-123.21, y=71.00, z=-229.64], EntityZombie['Zombie'/448, l='MpServer', x=-115.50, y=44.00, z=-186.50], EntitySkeleton['Skeleton'/451, l='MpServer', x=-149.50, y=30.00, z=-268.50], EntityBat['Bat'/838, l='MpServer', x=-93.52, y=26.03, z=-274.25], EntityChicken['Chicken'/79, l='MpServer', x=-143.76, y=67.00, z=-260.88], EntityWolf['Wolf'/80, l='MpServer', x=-138.50, y=69.00, z=-264.50], EntityWolf['Wolf'/81, l='MpServer', x=-138.50, y=69.00, z=-267.50], EntityZombie['Zombie'/471, l='MpServer', x=-171.50, y=85.00, z=-148.50], EntityCreeper['Creeper'/90, l='MpServer', x=-159.50, y=68.00, z=-261.50], EntityBat['Bat'/476, l='MpServer', x=-35.66, y=19.59, z=-159.22], EntityCreeper['Creeper'/102, l='MpServer', x=-96.50, y=70.00, z=-144.50], EntityZombie['Zombie'/879, l='MpServer', x=-162.50, y=83.00, z=-132.50], EntityEnderman['Enderman'/498, l='MpServer', x=-37.50, y=37.00, z=-213.50], EntitySquid['Squid'/116, l='MpServer', x=-68.60, y=61.00, z=-165.91], EntityBat['Bat'/372, l='MpServer', x=-100.39, y=27.35, z=-198.16], EntityZombieVillager['Zombie Villager'/884, l='MpServer', x=-111.64, y=61.00, z=-270.90], EntitySquid['Squid'/117, l='MpServer', x=-67.60, y=62.00, z=-167.89], EntitySquid['Squid'/118, l='MpServer', x=-65.86, y=60.82, z=-160.43], EntityZombie['Zombie'/758, l='MpServer', x=-148.77, y=77.00, z=-182.67], EntityCreeper['Creeper'/759, l='MpServer', x=-69.50, y=44.00, z=-204.50], EntityBat['Bat'/639, l='MpServer', x=-129.75, y=27.00, z=-211.94], EntityBat['Bat'/895, l='MpServer', x=-144.14, y=44.44, z=-273.95]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:420)
at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2741)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:419)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.12.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_191, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 212734272 bytes (202 MB) / 621154304 bytes (592 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 6 total; -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
FML: MCP 9.42 Powered by Forge 14.23.5.2814 6 mods loaded, 6 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

| State  | ID          | Version               | Source                        | Signature                                |
|:------ |:----------- |:--------------------- |:----------------------------- |:---------------------------------------- |
| LCHIJA | minecraft   | 1.12.2                | minecraft.jar                 | None                                     |
| LCHIJA | mcp         | 9.42                  | minecraft.jar                 | None                                     |
| LCHIJA | FML         | 8.0.99.99             | forge-1.12.2-14.23.5.2814.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
| LCHIJA | forge       | 14.23.5.2814          | forge-1.12.2-14.23.5.2814.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
| LCHIJA | malisiscore | 1.12.2-6.5.1-SNAPSHOT | malisiscore-1.12.2-6.5.1.jar  | None                                     |
| LCHIJA | sgcraft     | 1.13.2                | SGCraft-2.0.0-alpha-40.jar    | None                                     |

Loaded coremods (and transformers): 

MalisisCorePlugin (malisiscore-1.12.2-6.5.1.jar)

GL info: ' Vendor: 'Intel' Version: '4.5.0 - Build 24.20.100.6170' Renderer: 'Intel(R) UHD Graphics 620'
Launched Version: 1.12.2-forge1.12.2-14.23.5.2814
LWJGL: 2.9.4
OpenGL: Intel(R) UHD Graphics 620 GL version 4.5.0 - Build 24.20.100.6170, Intel
GL Caps: Using GL 1.3 multitexturing.

Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: 
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 4x Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz
commented

Tested this a bit as well. It doesn't seem to matter if the DHD is in range of the gate or not, the crash still occurs. But, I was able to get back into the world and the DHD was where I placed it. I wonder if this has to do with the change made in Alpha 40 to make the DHD match the Pegasus gate?

commented

Just made another horizontal gate in a dimension with no other gates, face down, and placing a controller crashed it then too. It was a classic (red) gate.

commented

So I tried what you did, setting the DHD too far away, and now I can't get back into my world. Now i'm wondering if the "not connected" state is what's broken, and maybe it's first initialized in that stated when you place the DHD down before it recognizes the gate?

commented

I think you're right in that its the "not connected" state. I just turned the horizontal gate face-up, and placed the controller correctly, and it worked right. Moved the controller to a place it wouldn't be able to connect (didn't touch the gate itself) and it crashed again.

edit2:
In what I feel to be a final confirmation of the "not connected" state, just broke an inactive, functional gate, with linked controller, and crashed.

edit1:
Secondary issue, more of a flavor thing than a bug, but a horizontal gate is technically rotated 180* in the wrong direction. Assuming it has simply "fallen over," as it is currently rendered, it would have had to be facing away from the controller.

commented

I'm looking at this bit of code (been a bit since I looked at Java, but I get the gist):

public void render(BaseTileEntity te, float dt, int destroyStage, Trans3 t, IRenderTarget target) {
        DHDTE dte = (DHDTE)te;
        SGBaseTE gte = dte.getLinkedStargateTE();
        int i;
        if (gte == null)
            i = 0;
        else if (gte.isActive())
            i = 2;
        else
            i = 1;
        textures[buttonTextureIndex] = buttonTextures[i];
        if (gte.gateType == 2) {
            textures[buttonTextureIndex] = pegasusButtonTextures[i];
        } else {
            textures[buttonTextureIndex] = milkywayButtonTextures[i];
        }
        model.render(t.translate(0, -0.5, 0), target, textures);
    }

I'm speculating that at the moment of the DHD being placed and the block rendered for the first time, gte is still null, causing gte.gateType to fail, but then later becomes active in a different method. That would make sense in the case of me being able to log back into the world and the button color is correctly rendered if in range, or i get kicked out again right away with the DHD being out of range, because it would still be null.

commented

Fixed. Your assumption on the gte being null was correct.