Immersive Railroading

Immersive Railroading

3M Downloads

ticking entity java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Float

kaelonR opened this issue ยท 5 comments

commented

I'm recently getting this error whenever i try placing any rolling stock - be it locomotives, freight wagons or passenger carriages - freezing and then crashing the client but not the server, which does not throw any error at all. Then, any player rendering the chunk where the rolling stock was being placed also crashes. I have to remove the entity and tile ticks with mcedit in order for anyone within rendering range of that rolling stock to be able to join again without crashing.

Weird thing is that rolling stock could be placed without error in the beginning, but this issue came up without any apparant cause and now affects the entire world.

Here's the full crash report.


WARNING: coremods are present:
  MixinLoaderForge (ValkyrienWarfareRevamped-1.12.2-v0.9_alpha-full.jar)
  TransformerLoader (OpenComputers-MC1.12.2-1.7.2.67.jar)
  IELoadingPlugin (ImmersiveEngineering-0.12-81-core.jar)
Contact their authors BEFORE contacting forge

// Uh... Did I do that?

Time: 5/13/18 12:33 AM
Description: Ticking entity

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Float
	at cam72cam.immersiverailroading.entity.Locomotive.getThrottle(Locomotive.java:210)
	at cam72cam.immersiverailroading.entity.Locomotive.getAppliedTractiveEffort(Locomotive.java:163)
	at cam72cam.immersiverailroading.entity.Locomotive.simulateWheelSlip(Locomotive.java:171)
	at cam72cam.immersiverailroading.entity.Locomotive.func_70071_h_(Locomotive.java:156)
	at cam72cam.immersiverailroading.entity.LocomotiveDiesel.func_70071_h_(LocomotiveDiesel.java:76)
	at net.minecraft.world.World.func_72866_a(World.java:1990)
	at net.minecraft.world.World.func_72870_g(World.java:1952)
	at net.minecraft.world.World.func_72939_s(World.java:1756)
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1845)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1096)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	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 cam72cam.immersiverailroading.entity.Locomotive.getThrottle(Locomotive.java:210)
	at cam72cam.immersiverailroading.entity.Locomotive.getAppliedTractiveEffort(Locomotive.java:163)
	at cam72cam.immersiverailroading.entity.Locomotive.simulateWheelSlip(Locomotive.java:171)
	at cam72cam.immersiverailroading.entity.Locomotive.func_70071_h_(Locomotive.java:156)
	at cam72cam.immersiverailroading.entity.LocomotiveDiesel.func_70071_h_(LocomotiveDiesel.java:76)
	at net.minecraft.world.World.func_72866_a(World.java:1990)
	at net.minecraft.world.World.func_72870_g(World.java:1952)

-- Entity being ticked --
Details:
	Entity Type: immersiverailroading:locomotivediesel (cam72cam.immersiverailroading.entity.LocomotiveDiesel)
	Entity ID: 686
	Entity Name: ALCO RS-1
	Entity's Exact location: 2254.53, 67.00, 3189.72
	Entity's Block location: World: (2254,67,3189), Chunk: (at 14,4,5 in 140,199; contains blocks 2240,0,3184 to 2255,255,3199), Region: (4,6; contains chunks 128,192 to 159,223, blocks 2048,0,3072 to 2559,255,3583)
	Entity's Momentum: 0.00, 0.00, 0.00
	Entity's Passengers: []
	Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
	at net.minecraft.world.World.func_72939_s(World.java:1756)

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [EntityPlayerSP['Jordy141'/228, l='MpServer', x=2250.48, y=67.10, z=3179.38]]
	Chunk stats: MultiplayerChunkCache: 441, 441
	Level seed: 0
	Level generator: ID 00 - default, ver 1. Features enabled: false
	Level generator options: 
	Level spawn location: World: (2630,134,1836), Chunk: (at 6,8,12 in 164,114; contains blocks 2624,0,1824 to 2639,255,1839), Region: (5,3; contains chunks 160,96 to 191,127, blocks 2560,0,1536 to 3071,255,2047)
	Level time: 1848065 game time, 6000 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: 36 total; [EntityPlayerSP['Jordy141'/228, l='MpServer', x=2250.48, y=67.10, z=3179.38], EntitySheep['Sheep'/256, l='MpServer', x=2294.76, y=69.00, z=3198.70], MagicEntity['unknown'/1, l='MpServer', x=2251.18, y=67.94, z=3181.08], EntitySheep['Sheep'/257, l='MpServer', x=2299.90, y=87.00, z=3153.49], EntitySheep['Sheep'/258, l='MpServer', x=2291.82, y=67.00, z=3183.37], EntitySheep['Sheep'/259, l='MpServer', x=2292.73, y=90.00, z=3150.50], EntitySheep['Sheep'/260, l='MpServer', x=2296.26, y=88.00, z=3145.51], EntitySheep['Sheep'/261, l='MpServer', x=2196.50, y=64.00, z=3255.29], EntitySheep['Sheep'/263, l='MpServer', x=2251.77, y=66.00, z=3166.82], EntitySheep['Sheep'/264, l='MpServer', x=2287.66, y=88.00, z=3148.76], EntitySheep['Sheep'/266, l='MpServer', x=2191.52, y=65.00, z=3258.23], EntitySheep['Sheep'/267, l='MpServer', x=2192.50, y=66.00, z=3245.50], EntitySheep['Sheep'/268, l='MpServer', x=2242.79, y=67.00, z=3167.50], EntitySheep['Sheep'/269, l='MpServer', x=2201.30, y=88.00, z=3194.79], EntitySheep['Sheep'/270, l='MpServer', x=2195.88, y=88.00, z=3200.25], EntitySheep['Sheep'/271, l='MpServer', x=2194.94, y=84.00, z=3204.63], EntitySheep['Sheep'/272, l='MpServer', x=2189.74, y=87.00, z=3192.51], EntitySheep['Sheep'/273, l='MpServer', x=2229.20, y=66.00, z=3139.27], LocomotiveDiesel['ALCO RS-1'/686, l='MpServer', x=2254.53, y=67.00, z=3189.72], EntitySheep['Sheep'/304, l='MpServer', x=2306.73, y=73.00, z=3257.49], EntitySheep['Sheep'/305, l='MpServer', x=2318.52, y=66.00, z=3237.96], EntityCow['Cow'/308, l='MpServer', x=2326.43, y=66.00, z=3245.18], EntitySheep['Sheep'/312, l='MpServer', x=2290.51, y=79.00, z=3256.27], EntitySheep['Sheep'/313, l='MpServer', x=2290.79, y=68.00, z=3249.50], EntitySheep['Sheep'/314, l='MpServer', x=2319.55, y=66.00, z=3238.04], EntitySheep['Sheep'/318, l='MpServer', x=2283.23, y=72.00, z=3255.52], EntitySheep['Sheep'/319, l='MpServer', x=2280.55, y=69.00, z=3255.50], EntitySheep['Sheep'/230, l='MpServer', x=2204.77, y=65.00, z=3143.55], EntitySheep['Sheep'/231, l='MpServer', x=2223.50, y=65.00, z=3133.50], EntitySheep['Sheep'/232, l='MpServer', x=2217.52, y=66.00, z=3137.23], EntitySheep['Sheep'/234, l='MpServer', x=2201.49, y=68.00, z=3123.74], EntitySheep['Sheep'/235, l='MpServer', x=2195.50, y=64.00, z=3135.50], EntitySheep['Sheep'/236, l='MpServer', x=2196.49, y=68.00, z=3130.73], EntitySheep['Sheep'/237, l='MpServer', x=2191.80, y=64.00, z=3132.42], EntitySheep['Sheep'/251, l='MpServer', x=2297.81, y=69.00, z=3187.68], EntitySheep['Sheep'/255, l='MpServer', x=2299.91, y=68.00, z=3190.53]]
	Retry entities: 0 total; []
	Server brand: fml,forge
	Server type: Non-integrated multiplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:532)
	at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2737)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:418)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	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_25, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1540339768 bytes (1468 MB) / 3970170880 bytes (3786 MB) up to 4281597952 bytes (4083 MB)
	JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx4G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
	IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
	FML: MCP 9.42 Powered by Forge 14.23.3.2655 Optifine OptiFine_1.12.2_HD_U_D1 18 mods loaded, 18 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                                |
	|:------ |:-------------------- |:----------------------- |:--------------------------------------------------- |:---------------------------------------- |
	| UCHIJA | minecraft            | 1.12.2                  | minecraft.jar                                       | None                                     |
	| UCHIJA | mcp                  | 9.42                    | minecraft.jar                                       | None                                     |
	| UCHIJA | FML                  | 8.0.99.99               | forge-1.12.2-14.23.3.2655.jar                       | e3c3d50c7c986df74c645c0ac54639741c90a557 |
	| UCHIJA | forge                | 14.23.3.2655            | forge-1.12.2-14.23.3.2655.jar                       | e3c3d50c7c986df74c645c0ac54639741c90a557 |
	| UCHIJA | opencomputers|core   | 1.7.2.67                | minecraft.jar                                       | None                                     |
	| UCHIJA | xray                 | 1.4.0                   | Advanced-XRay-Mod-1.12.2.jar                        | None                                     |
	| UCHIJA | conquest             | 3.0.0                   | ConquestReforged-3.0.0-mc1.12.2.jar                 | None                                     |
	| UCHIJA | blockpalette         | 1.5.0                   | ConquestReforged-3.0.0-mc1.12.2.jar                 | None                                     |
	| UCHIJA | connect              | 1.0.3-mc1.12.2-SNAPSHOT | ConquestReforged-3.0.0-mc1.12.2.jar                 | None                                     |
	| UCHIJA | customnpcs           | 1.12                    | CustomNPCs_1.12.2(20jan18).jar                      | None                                     |
	| UCHIJA | immersiveengineering | 0.12-81                 | ImmersiveEngineering-0.12-81.jar                    | 4cb49fcde3b43048c9889e0a3d083225da926334 |
	| UCHIJA | trackapi             | 1.1                     | TrackAPI-1.1_1.12.jar                               | None                                     |
	| UCHIJA | immersiverailroading | 1.0.1                   | ImmersiveRailroading-1.0.1_1.12.jar                 | None                                     |
	| UCHIJA | opencomputers        | 1.7.2.67                | OpenComputers-MC1.12.2-1.7.2.67.jar                 | None                                     |
	| UCHIJA | valkyrienwarfare     | 0.9_alpha               | ValkyrienWarfareRevamped-1.12.2-v0.9_alpha-full.jar | None                                     |
	| UCHIJA | worldedit            | 6.1.8                   | worldedit-forge-mc1.12-6.1.8-dist.jar               | None                                     |
	| UCHIJA | xaerominimap         | 1.15                    | Xaeros_Minimap_1.15_Forge_1.12.jar                  | None                                     |
	| UCHIJA | xaeroworldmap        | 1.2.4                   | XaerosWorldMap_1.2.4_Forge_1.12.jar                 | None                                     |

	Loaded coremods (and transformers): 
MixinLoaderForge (ValkyrienWarfareRevamped-1.12.2-v0.9_alpha-full.jar)
  
TransformerLoader (OpenComputers-MC1.12.2-1.7.2.67.jar)
  li.cil.oc.common.asm.ClassTransformer
IELoadingPlugin (ImmersiveEngineering-0.12-81-core.jar)
  blusunrize.immersiveengineering.common.asm.IEClassTransformer
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 388.13' Renderer: 'GeForce GTX 960/PCIe/SSE2'
	Launched Version: 1.12.2-forge1.12.2-14.23.3.2655
	LWJGL: 2.9.4
	OpenGL: GeForce GTX 960/PCIe/SSE2 GL version 4.6.0 NVIDIA 388.13, NVIDIA Corporation
	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: Conquest_Reforged_1.12
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 8x Intel(R) Core(TM) i7-6400 CPU @ 3.20GHz```
commented

In addition, my config is configured like this in case that might cause any issues:

`# Configuration file

general {

damage {
    # Trains should break blocks
    B:TrainsBreakBlocks=true

    # Clear blocsk in creative mode when placing tracks
    B:creativePlacementClearsBlocks=true

    # Drop snowballs when the train can't push a block out of the way
    B:dropSnowBalls=false

    # Break blocks around the border of the tracks in creative
    B:enableSideBlockClearing=true

    # km/h to damage 1 heart on collision
    D:entitySpeedDamage=10.0

    # Enable Boiler Explosions
    B:explosionsEnabled=false

    # Requires solid blocks to be placed under the rails
    B:requireSolidBlocks=true
}

balance {
    # Cost to place down rail bed
    D:BedCostMultiplier=0.25

    # All gauges require fuel
    B:FuelRequired=false

    # MilliBuckets per Liter
    I:MB_PER_LITER=1

    # Models require fuel
    B:ModelFuelRequired=false

    # Cost to place down a rail
    D:RailCostMultiplier=0.25

    # Cost to place down a tie
    D:TieCostMultiplier=0.25

    # How heavy is a single block in Kg
    I:blockWeight=10

    # Brake Multiplier: Higher numbers increase slowdown, lower numbers decrease slowdown
    D:brakeMultiplier=1.0

    # Diesel Fuel Efficiency
    I:locoDieselFuelEfficiency=100

    # How fast the locomotive should heat up.  1 is real world (slow), 72 is scaled to minecraft time
    I:locoHeatTimeScale=144

    # Steam Fuel Efficiency
    I:locoSteamFuelEfficiency=100

    # How much water the locomotive should use
    D:locoWaterUsage=5.0

    # Slope Multiplier: Higher numbers increase slowdown, lower numbers decrease slowdown
    D:slopeMultiplier=0.25

    # If more than X% of the tracks are above non solid blocks, break the track
    D:trackFloatingPercent=0.2

    # Traction Multiplier: Higher numbers decreases wheel slip, lower numders increase wheel slip
    D:tractionMultiplier=1.0

    # Distance the villagers will hear the conductor's whistle
    D:villagerConductorDistance=50.0

    # Villager payout items
    S:villagerPayoutItems <
        minecraft:emerald
     >

    # How much you get payed per meter the villager traveled (default 1 emerald per km)
    D:villagerPayoutPerMeter=0.001
}

debug {
    # Range between couplers to try coupling
    D:couplerRange=0.3

    # DEBUG: Buckets infinite fill/empty tanks
    B:debugInfiniteLiquids=false

    # Print extra chunk loading info
    B:debugLog=false

    # Deep Snow on tracks
    B:deepSnow=false

    # Keep rolling stock loaded even when it is not moving
    B:keepStockLoaded=false

    # Time between open computers poll ticks for augments
    I:ocPollDelayTicks=1

    # How fast deep snow should melt, 0 = disabled, 20 = fast, 400 = slow
    I:snowMeltRate=0
}

}

`

commented

Afther further testing, Even removing the mod and the TrackAPI dependency, rendering the entire world so all the blocks are cleared, and re-adding the mod does not fix this issue and still makes the client crash when placing rolling stock.

In fact, once i added the mod back in all the track blocks that i thought were removed from the world got back in as invisible slabs (the 3d track models themselves were not rendered) causing the mod to output "[Server thread/WARN] [immersiverailroading]: Invalid block without parent" to the server console a few hundred times or so at once. I was able to track and remove those invisible blocks thanks to Rei's minimap and Worldedit, otherwise it would have been very hard if not impossible to get all of them cleared.

Lastly, i was able to get some additional information about the circumstances when this issue started appearing. This was when one of the diesel locs (the one with max 105 km/h, can't remember the name) ran off the end of a railway line under construction and froze there, unable to move forwards or backwards. When the player shift + left-clicked the loc to retrieve it into an item is when the client first crashed and when this issue started.

Since i cannot resolve this issue, i will run the server without this mod for now. If you would like to take a look at a copy of the world (or the entire server, which is 1.46gb) i have a copy saved which i can share with you.

commented

That's really strange, I'll take a look tomorrow

commented

Okay, final update. I got this issue resolved for me personally.

i placed a locomotive on a track, on the 'real' world map, and the client crashed as expected.

I then deleted the scheduled tile ticks, NOT the entity in mcedit, and then restarted the server. Upon logging back in, my client did not crash and i saw the locomotive i placed attempt moving on the track but constantly being teleported back to it's starting position. I retrieved the locomotive with shift+left click and it was retrieved successfully.

Since i've performed this action, everything runs as normal again. I was just able to place a bunch of locomotives without any issues, drive them around and retrieve them into item form again.

I can only imagine that the locomotive stuck at the end of a suspended track, unable to move and crashing the client upon trying to retrieve it into item form somehow caused this issue. i wonder how this could possibly cause a type casting error to be thrown upon rolling stock placement though.

That said, the issue has been fixed for me personally. I still have a copy of the world around where this issue exists, if you'd like to use it for testing.

commented

Upon further testing, it looks like this issue is isolated to the specific world. I copied the server, deleted the world and had a new one generated and that 'fixed' the issue.

I'd really rather not lose the world i currently have. Is there any way i might clear data that ImmersiveRailroading left behind in that world?