Posted 13 August 2013 - 12:21 PM
So, I've had the game die on me a couple of times over the last weeks. Turns out, it really was ComputerCraft. Dump of the threads in deadlock below.
I did not see this posted, if it has been, I'm sorry, please merge this to the existing thread.
Version Information
CC 1.56, MC 1.62, Forge 9.10.0.804
Thread deadlock captured in VisualVM in SSP but I have seen this in SMP, too.
No other mods were installed.
Description
After a random amount of time, the game logic locks up. I can still move around and will not get disconnected, but when breaking blocks they don't drop anything, when trying to interact with objects nothing happens (e.g. a GUI should open but it doesn't) and the inventory won't open anymore. When closing the game (Esc->Save and Quit to Title) the game will just stay in the shutting down internal server screen forever.
Steps to reproduce
Run MC, start a map. I'm pretty sure this is related to the disk drive,though I'm not sure the wired connection is related. Here's my actual testing setup:
Computer hooked up via a wired connection to a disk drive with a disk in it, next to said disk drive is a turtle. This is the starting layout.
The computer runs this program:
The turtle runs this program (could probably simplified, but I like feedback):
Regarding the movement pattern: I was actually trying to reproduce another issue I had run into a couple of times, that being that a disk would occasionally not be mounted until the turtle was manually rebooted. Didn't have any luck with that, yet. Possibly related, though.
Update: much simpler test-case! This actually happens with just a turtle and a disk drive (with a disk in it). Here's how the setup looks:
This is the program the turtle runs (starting next to the disk drive):
The turtle should obviously be fueled up quite a bit before this is being run. This time, after about one hour the deadlock happened.
The Deadlock
Here is the full thread dump:
Interestingly enough the line numbers were slightly different with the updated test case - note that I managed to reproduce this three times with that approach alone, and for these the line numbers were equal. I didn't update MC or CC since then, so I can only assume it depends on the order in which the threads lock up (before or after the respective synchronize). Anyway, here's the alternative numbers:
I am aware that this may be a pain to figure out, as race conditions are wont to be, but I would really appreciate if this were fixed, since from what I've seen the game rarely (never?) properly saves in such cases, meaning anything written to disk by Lua programs will be in the world's "future", so, among other things, custom program persistence will break.
Quite frequently turtles have lost their identity via this kind of "crash", too (this has been reported before, though in the context of other crashes as far as I'm aware), meaning they get a new ID, lose any peripherals and their inventory. This only happened if there were multiple turtles, so I assume this was in the context of one turtle causing the deadlock and others moving at that moment. This is just conjecture, though, hence the grey text color. Still, I wanted to get it out there.
PS: On a possibly unrelated note, I noticed this NPE in the log, recently, though it didn't cause a crash. But it's also involving the disk drive, so I guess this is the best place to mention it. Before and after there's just random unrelated logging, so I doubt this will be very enlightening, but you never know…
Edit: made title a bit more descriptive now that I'm pretty sure what the actual cause is.
I did not see this posted, if it has been, I'm sorry, please merge this to the existing thread.
Version Information
CC 1.56, MC 1.62, Forge 9.10.0.804
Thread deadlock captured in VisualVM in SSP but I have seen this in SMP, too.
No other mods were installed.
Description
After a random amount of time, the game logic locks up. I can still move around and will not get disconnected, but when breaking blocks they don't drop anything, when trying to interact with objects nothing happens (e.g. a GUI should open but it doesn't) and the inventory won't open anymore. When closing the game (Esc->Save and Quit to Title) the game will just stay in the shutting down internal server screen forever.
Steps to reproduce
Run MC, start a map. I'm pretty sure this is related to the disk drive,
Spoiler
Spoiler
Computer hooked up via a wired connection to a disk drive with a disk in it, next to said disk drive is a turtle. This is the starting layout.
The computer runs this program:
local path = disk.getMountPath("drive_0") -- adjust as necessary
path = fs.combine(path, "test")
print("Polling file '" .. path .. "'")
while true do
local f = fs.open(path, "r")
local d = f and f.readAll() or "no file"
if f then f.close() end
local x, y = term.getCursorPos()
term.clearLine()
term.write(d)
term.setCursorPos(x, y)
os.sleep(0.1)
end
Spoiler
local function getDiskPath()
for _, name in ipairs(peripheral.getNames()) do
if disk.isPresent(name) then
return disk.getMountPath(name)
end
end
end
local i = 1
local function test()
local path
local tries = 1
repeat
path = getDiskPath()
local now = math.floor((os.day() * 24 + os.time()) * 1000 / 20)
if path then
print(now .. ": success [" .. tries .. "]")
else
print(now .. ": fail")
tries = tries + 1
end
os.sleep(0.1)
until path
local f = fs.open(fs.combine(path, "test"), "w")
f.write(i)
f.close()
i = i + 1
end
while true do
repeat until turtle.down()
repeat until turtle.up()
test()
turtle.turnLeft()
test()
end
Regarding the movement pattern: I was actually trying to reproduce another issue I had run into a couple of times, that being that a disk would occasionally not be mounted until the turtle was manually rebooted. Didn't have any luck with that, yet. Possibly related, though.
Update: much simpler test-case! This actually happens with just a turtle and a disk drive (with a disk in it). Here's how the setup looks:
This is the program the turtle runs (starting next to the disk drive):
while true do
repeat until turtle.up()
repeat until turtle.down()
end
The turtle should obviously be fueled up quite a bit before this is being run. This time, after about one hour the deadlock happened.
The Deadlock
Spoiler
Found one Java-level deadlock:
=============================
"Thread-8478":
waiting to lock monitor 0x0000000012ed93b0 (object 0x0000000718b3e988, a dan200.computer.core.Computer),
which is held by "Server thread"
"Server thread":
waiting to lock monitor 0x0000000012ed96f8 (object 0x0000000719550e60, a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;),
which is held by "Thread-8478"
Java stack information for the threads listed above:
===================================================
"Thread-8478":
at dan200.computer.core.Computer.queueLuaEvent(Computer.java:958)
- waiting to lock <0x0000000718b3e988> (a dan200.computer.core.Computer)
at dan200.computer.core.Computer$APIEnvironment.queueEvent(Computer.java:95)
at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.queueEvent(PeripheralAPI.java:224)
- locked <0x000000071aaa11e0> (a dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computer.shared.TileEntityDiskDrive.mountDisk(TileEntityDiskDrive.java:574)
- locked <0x0000000719569940> (a dan200.computer.shared.TileEntityDiskDrive)
at dan200.computer.shared.TileEntityDiskDrive.attach(TileEntityDiskDrive.java:520)
at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.attach(PeripheralAPI.java:83)
- locked <0x000000071aaa11e0> (a dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computer.core.apis.PeripheralAPI$2.execute(PeripheralAPI.java:310)
- locked <0x0000000719550e60> (a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computer.core.ComputerThread$1$1.run(ComputerThread.java:118)
at java.lang.Thread.run(Thread.java:722)
"Server thread":
at dan200.computer.core.apis.PeripheralAPI.advance(PeripheralAPI.java:353)
- waiting to lock <0x0000000719550e60> (a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computer.core.Computer.advance(Computer.java:511)
- locked <0x000000071af2ef38> (a java.util.ArrayList)
- locked <0x0000000718b3e988> (a dan200.computer.core.Computer)
at dan200.computer.shared.NetworkedComputerHelper.update(NetworkedComputerHelper.java:128)
at dan200.turtle.shared.TileEntityTurtle.func_70316_g(TileEntityTurtle.java:2458)
at net.minecraft.world.World.func_72939_s(World.java:2204)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:548)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:666)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:585)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:129)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:582)
Here is the full thread dump:
Spoiler
2013-08-13 17:29:53
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.21-b01 mixed mode):
"Thread-8478" prio=6 tid=0x0000000012bd2000 nid=0x1b78 waiting for monitor entry [0x0000000037e2e000]
java.lang.Thread.State: BLOCKED (on object monitor)
at dan200.computer.core.Computer.queueLuaEvent(Computer.java:958)
- waiting to lock <0x0000000718b3e988> (a dan200.computer.core.Computer)
at dan200.computer.core.Computer$APIEnvironment.queueEvent(Computer.java:95)
at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.queueEvent(PeripheralAPI.java:224)
- locked <0x000000071aaa11e0> (a dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computer.shared.TileEntityDiskDrive.mountDisk(TileEntityDiskDrive.java:574)
- locked <0x0000000719569940> (a dan200.computer.shared.TileEntityDiskDrive)
at dan200.computer.shared.TileEntityDiskDrive.attach(TileEntityDiskDrive.java:520)
at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.attach(PeripheralAPI.java:83)
- locked <0x000000071aaa11e0> (a dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computer.core.apis.PeripheralAPI$2.execute(PeripheralAPI.java:310)
- locked <0x0000000719550e60> (a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computer.core.ComputerThread$1$1.run(ComputerThread.java:118)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"RMI TCP Connection(idle)" daemon prio=6 tid=0x0000000012bd9800 nid=0x3380 waiting on condition [0x000000003717e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000715fbb3d8> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"RMI TCP Connection(2)-10.74.254.202" daemon prio=6 tid=0x0000000012bd6800 nid=0x32a4 runnable [0x0000000034ace000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
- locked <0x000000071cbeebe0> (a java.io.BufferedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:83)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- <0x000000071bb9f1a0> (a java.util.concurrent.ThreadPoolExecutor$Worker)
"JMX server connection timeout 3330" daemon prio=6 tid=0x0000000012bd0000 nid=0x1e44 in Object.wait() [0x000000003468f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000071caec690> (a [I)
at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:168)
- locked <0x000000071caec690> (a [I)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"RMI Scheduler(0)" daemon prio=6 tid=0x0000000012bcd000 nid=0x28c4 waiting on condition [0x00000000333ef000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007158dd178> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1090)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"File IO Thread" prio=2 tid=0x0000000012bd1800 nid=0x3338 waiting on condition [0x000000002310f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at net.minecraft.world.storage.ThreadedFileIOBase.func_75736_b(SourceFile:44)
at net.minecraft.world.storage.ThreadedFileIOBase.run(SourceFile:23)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Coroutine-9" prio=6 tid=0x0000000012bd0800 nid=0x289c in Object.wait() [0x000000002232e000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000071c8ab838> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread$State.lua_yield(Unknown Source)
- locked <0x000000071c8ab838> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread.yield(Unknown Source)
at org.luaj.vm2.lib.CoroutineLib.invoke(Unknown Source)
at org.luaj.vm2.lib.VarArgFunction.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaThread$State.run(Unknown Source)
- locked <0x000000071c8ab838> (a org.luaj.vm2.LuaThread$State)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Coroutine-8" prio=6 tid=0x0000000012bd3000 nid=0x1ee4 in Object.wait() [0x00000000208dd000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000071b608c20> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread$State.lua_yield(Unknown Source)
- locked <0x000000071b608c20> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread.yield(Unknown Source)
at org.luaj.vm2.lib.CoroutineLib.invoke(Unknown Source)
at org.luaj.vm2.lib.VarArgFunction.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source)
at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.TailcallVarargs.arg1(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source)
at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaThread$State.run(Unknown Source)
- locked <0x000000071b608c20> (a org.luaj.vm2.LuaThread$State)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Coroutine-7" prio=6 tid=0x0000000012bd3800 nid=0x25c4 in Object.wait() [0x0000000021dae000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000071c8ab860> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread$State.lua_yield(Unknown Source)
- locked <0x000000071c8ab860> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread.yield(Unknown Source)
at org.luaj.vm2.lib.CoroutineLib.invoke(Unknown Source)
at org.luaj.vm2.lib.VarArgFunction.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.TailcallVarargs.arg1(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source)
at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaThread$State.run(Unknown Source)
- locked <0x000000071c8ab860> (a org.luaj.vm2.LuaThread$State)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Coroutine-6" prio=6 tid=0x0000000012bd6000 nid=0x2bd8 in Object.wait() [0x0000000023cbf000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000071b7d8588> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread$State.lua_yield(Unknown Source)
- locked <0x000000071b7d8588> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread.yield(Unknown Source)
at org.luaj.vm2.lib.CoroutineLib.invoke(Unknown Source)
at org.luaj.vm2.lib.VarArgFunction.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaThread$State.run(Unknown Source)
- locked <0x000000071b7d8588> (a org.luaj.vm2.LuaThread$State)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Coroutine-5" prio=6 tid=0x0000000012bd5000 nid=0x32f4 in Object.wait() [0x00000000236ed000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000071b7d85b0> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread$State.lua_yield(Unknown Source)
- locked <0x000000071b7d85b0> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread.yield(Unknown Source)
at org.luaj.vm2.lib.CoroutineLib.invoke(Unknown Source)
at org.luaj.vm2.lib.VarArgFunction.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source)
at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.TailcallVarargs.arg1(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source)
at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaThread$State.run(Unknown Source)
- locked <0x000000071b7d85b0> (a org.luaj.vm2.LuaThread$State)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Coroutine-4" prio=6 tid=0x0000000012bd4800 nid=0x3154 in Object.wait() [0x000000001964e000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000071b608180> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread$State.lua_yield(Unknown Source)
- locked <0x000000071b608180> (a org.luaj.vm2.LuaThread$State)
at org.luaj.vm2.LuaThread.yield(Unknown Source)
at org.luaj.vm2.lib.CoroutineLib.invoke(Unknown Source)
at org.luaj.vm2.lib.VarArgFunction.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
at org.luaj.vm2.TailcallVarargs.arg1(Unknown Source)
at org.luaj.vm2.LuaClosure.call(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source)
at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Source)
at org.luaj.vm2.LuaClosure.execute(Unknown Source)
at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
at org.luaj.vm2.LuaThread$State.run(Unknown Source)
- locked <0x000000071b608180> (a org.luaj.vm2.LuaThread$State)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Thread-19" prio=6 tid=0x0000000012bcf000 nid=0x265c waiting for monitor entry [0x00000000204be000]
java.lang.Thread.State: BLOCKED (on object monitor)
at dan200.computer.core.Computer.abort(Computer.java:288)
- waiting to lock <0x0000000718b3e988> (a dan200.computer.core.Computer)
at dan200.computer.core.ComputerThread$1.run(ComputerThread.java:137)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Server thread" prio=6 tid=0x0000000012bce800 nid=0x229c waiting for monitor entry [0x000000002005e000]
java.lang.Thread.State: BLOCKED (on object monitor)
at dan200.computer.core.apis.PeripheralAPI.advance(PeripheralAPI.java:353)
- waiting to lock <0x0000000719550e60> (a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computer.core.Computer.advance(Computer.java:511)
- locked <0x000000071af2ef38> (a java.util.ArrayList)
- locked <0x0000000718b3e988> (a dan200.computer.core.Computer)
at dan200.computer.shared.NetworkedComputerHelper.update(NetworkedComputerHelper.java:128)
at dan200.turtle.shared.TileEntityTurtle.func_70316_g(TileEntityTurtle.java:2458)
at net.minecraft.world.World.func_72939_s(World.java:2204)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:548)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:666)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:585)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:129)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:582)
Locked ownable synchronizers:
- None
"Snooper Timer" daemon prio=6 tid=0x0000000012bcd800 nid=0x2ae4 in Object.wait() [0x000000001faef000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000071904c0a8> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:552)
- locked <0x000000071904c0a8> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:505)
Locked ownable synchronizers:
- None
"Thread-16" prio=6 tid=0x0000000012bcc000 nid=0x1d30 waiting on condition [0x000000001f62f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at paulscode.sound.SimpleThread.snooze(SimpleThread.java:196)
at paulscode.sound.StreamThread.run(StreamThread.java:98)
Locked ownable synchronizers:
- None
"LWJGL Timer" daemon prio=6 tid=0x0000000012bcb800 nid=0x2c98 waiting on condition [0x000000001f04f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.lwjgl.opengl.Sync$1.run(Sync.java:116)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Thread-13" prio=6 tid=0x0000000011ea4800 nid=0x23c0 waiting on condition [0x000000001c52f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at paulscode.sound.SimpleThread.snooze(SimpleThread.java:196)
at paulscode.sound.CommandThread.run(CommandThread.java:133)
Locked ownable synchronizers:
- None
"Java2D Disposer" daemon prio=10 tid=0x000000001236a000 nid=0x33d0 in Object.wait() [0x0000000016def000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007159ed5a8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
- locked <0x00000007159ed5a8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
at sun.java2d.Disposer.run(Disposer.java:145)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Timer hack thread" daemon prio=6 tid=0x00000000125e5800 nid=0x33cc waiting on condition [0x000000001596f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at net.minecraft.client.ThreadClientSleep.run(SourceFile:211)
Locked ownable synchronizers:
- None
"Snooper Timer" daemon prio=6 tid=0x0000000012f3b000 nid=0x23b0 in Object.wait() [0x00000000154ff000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000716ce3d88> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:552)
- locked <0x0000000716ce3d88> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:505)
Locked ownable synchronizers:
- None
"Thread-1" daemon prio=6 tid=0x0000000010734000 nid=0x2b0 waiting on condition [0x000000001198e000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000716157788> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at cpw.mods.fml.relauncher.FMLRelaunchLog$ConsoleLogThread.run(FMLRelaunchLog.java:82)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"RMI TCP Accept-0" daemon prio=6 tid=0x0000000010748800 nid=0x3328 runnable [0x00000000111ee000]
java.lang.Thread.State: RUNNABLE
at java.net.DualStackPlainSocketImpl.accept0(Native Method)
at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:121)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:183)
- locked <0x000000071586e950> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:522)
at java.net.ServerSocket.accept(ServerSocket.java:490)
at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:52)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:387)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:359)
at java.lang.Thread.run(Thread.java:722)
Locked ownable synchronizers:
- None
"Service Thread" daemon prio=6 tid=0x000000000dbe4000 nid=0x5b4 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"C2 CompilerThread1" daemon prio=10 tid=0x000000000dbe0000 nid=0x31ac waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"C2 CompilerThread0" daemon prio=10 tid=0x000000000dbdb800 nid=0x33bc waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Attach Listener" daemon prio=10 tid=0x000000000dbd8800 nid=0x1e10 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Signal Dispatcher" daemon prio=10 tid=0x000000000dbd3000 nid=0x2b64 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Surrogate Locker Thread (Concurrent GC)" daemon prio=6 tid=0x000000000dbd1800 nid=0x1224 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Finalizer" daemon prio=8 tid=0x000000000db4f800 nid=0x32bc in Object.wait() [0x000000000ea2f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007160f7ba8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
- locked <0x00000007160f7ba8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:189)
Locked ownable synchronizers:
- None
"Reference Handler" daemon prio=10 tid=0x000000000db49000 nid=0x32ac in Object.wait() [0x000000000e47f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007160f7bd8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
- locked <0x00000007160f7bd8> (a java.lang.ref.Reference$Lock)
Locked ownable synchronizers:
- None
"Minecraft main thread" prio=6 tid=0x000000000045f800 nid=0x3344 waiting on condition [0x000000000285e000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.lwjgl.opengl.Sync.sync(Sync.java:72)
at org.lwjgl.opengl.Display.sync(Display.java:411)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1021)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
at net.minecraft.client.main.Main.main(SourceFile:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Locked ownable synchronizers:
- None
"VM Thread" prio=10 tid=0x000000000db41800 nid=0x1088 runnable
"Gang worker#0 (Parallel GC Threads)" prio=10 tid=0x000000000221f000 nid=0x3364 runnable
"Gang worker#1 (Parallel GC Threads)" prio=10 tid=0x0000000002224800 nid=0x3368 runnable
"Concurrent Mark-Sweep GC Thread" prio=10 tid=0x0000000002283800 nid=0x2af0 runnable
"VM Periodic Task Thread" prio=10 tid=0x0000000010749800 nid=0x1ef4 waiting on condition
JNI global references: 14769
Found one Java-level deadlock:
=============================
"Thread-8478":
waiting to lock monitor 0x0000000012ed93b0 (object 0x0000000718b3e988, a dan200.computer.core.Computer),
which is held by "Server thread"
"Server thread":
waiting to lock monitor 0x0000000012ed96f8 (object 0x0000000719550e60, a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;),
which is held by "Thread-8478"
Java stack information for the threads listed above:
===================================================
"Thread-8478":
at dan200.computer.core.Computer.queueLuaEvent(Computer.java:958)
- waiting to lock <0x0000000718b3e988> (a dan200.computer.core.Computer)
at dan200.computer.core.Computer$APIEnvironment.queueEvent(Computer.java:95)
at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.queueEvent(PeripheralAPI.java:224)
- locked <0x000000071aaa11e0> (a dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computer.shared.TileEntityDiskDrive.mountDisk(TileEntityDiskDrive.java:574)
- locked <0x0000000719569940> (a dan200.computer.shared.TileEntityDiskDrive)
at dan200.computer.shared.TileEntityDiskDrive.attach(TileEntityDiskDrive.java:520)
at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.attach(PeripheralAPI.java:83)
- locked <0x000000071aaa11e0> (a dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computer.core.apis.PeripheralAPI$2.execute(PeripheralAPI.java:310)
- locked <0x0000000719550e60> (a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computer.core.ComputerThread$1$1.run(ComputerThread.java:118)
at java.lang.Thread.run(Thread.java:722)
"Server thread":
at dan200.computer.core.apis.PeripheralAPI.advance(PeripheralAPI.java:353)
- waiting to lock <0x0000000719550e60> (a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computer.core.Computer.advance(Computer.java:511)
- locked <0x000000071af2ef38> (a java.util.ArrayList)
- locked <0x0000000718b3e988> (a dan200.computer.core.Computer)
at dan200.computer.shared.NetworkedComputerHelper.update(NetworkedComputerHelper.java:128)
at dan200.turtle.shared.TileEntityTurtle.func_70316_g(TileEntityTurtle.java:2458)
at net.minecraft.world.World.func_72939_s(World.java:2204)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:548)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:666)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:585)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:129)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:582)
Found 1 deadlock.
Interestingly enough the line numbers were slightly different with the updated test case - note that I managed to reproduce this three times with that approach alone, and for these the line numbers were equal. I didn't update MC or CC since then, so I can only assume it depends on the order in which the threads lock up (before or after the respective synchronize). Anyway, here's the alternative numbers:
Spoiler
Found one Java-level deadlock:
=============================
"Thread-259807":
waiting to lock monitor 0x00000000134017f8 (object 0x0000000724174510, a dan200.computer.core.Computer),
which is held by "Server thread"
"Server thread":
waiting to lock monitor 0x0000000011a84310 (object 0x0000000722971a88, a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;),
which is held by "Thread-259807"
Java stack information for the threads listed above:
===================================================
"Thread-259807":
at dan200.computer.core.Computer.queueLuaEvent(Computer.java:956)
- waiting to lock <0x0000000724174510> (a dan200.computer.core.Computer)
at dan200.computer.core.Computer$APIEnvironment.queueEvent(Computer.java:94)
at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.queueEvent(PeripheralAPI.java:223)
- locked <0x00000007286dede0> (a dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computer.shared.TileEntityDiskDrive.mountDisk(TileEntityDiskDrive.java:572)
- locked <0x0000000720df1838> (a dan200.computer.shared.TileEntityDiskDrive)
at dan200.computer.shared.TileEntityDiskDrive.attach(TileEntityDiskDrive.java:519)
at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.attach(PeripheralAPI.java:82)
- locked <0x00000007286dede0> (a dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper)
at dan200.computer.core.apis.PeripheralAPI$2.execute(PeripheralAPI.java:308)
- locked <0x0000000722971a88> (a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computer.core.ComputerThread$1$1.run(ComputerThread.java:117)
at java.lang.Thread.run(Thread.java:722)
"Server thread":
at dan200.computer.core.apis.PeripheralAPI.advance(PeripheralAPI.java:351)
- waiting to lock <0x0000000722971a88> (a [Ldan200.computer.core.apis.PeripheralAPI$PeripheralWrapper;)
at dan200.computer.core.Computer.advance(Computer.java:511)
- locked <0x00000007240af328> (a java.util.ArrayList)
- locked <0x0000000724174510> (a dan200.computer.core.Computer)
at dan200.computer.shared.NetworkedComputerHelper.update(NetworkedComputerHelper.java:128)
at dan200.turtle.shared.TileEntityTurtle.func_70316_g(TileEntityTurtle.java:2458)
at net.minecraft.world.World.func_72939_s(World.java:2204)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:548)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:666)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:585)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:129)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:582)
Found 1 deadlock.
I am aware that this may be a pain to figure out, as race conditions are wont to be, but I would really appreciate if this were fixed, since from what I've seen the game rarely (never?) properly saves in such cases, meaning anything written to disk by Lua programs will be in the world's "future", so, among other things, custom program persistence will break.
Quite frequently turtles have lost their identity via this kind of "crash", too (this has been reported before, though in the context of other crashes as far as I'm aware), meaning they get a new ID, lose any peripherals and their inventory. This only happened if there were multiple turtles, so I assume this was in the context of one turtle causing the deadlock and others moving at that moment. This is just conjecture, though, hence the grey text color. Still, I wanted to get it out there.
PS: On a possibly unrelated note, I noticed this NPE in the log, recently, though it didn't cause a crash. But it's also involving the disk drive, so I guess this is the best place to mention it. Before and after there's just random unrelated logging, so I doubt this will be very enlightening, but you never know…
Spoiler
2013-08-11 18:16:09 [INFO] [STDOUT] computercraft: Error running task.
2013-08-11 18:16:09 [INFO] [STDERR] java.lang.NullPointerException
2013-08-11 18:16:09 [INFO] [STDERR] at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.unmount(PeripheralAPI.java:203)
2013-08-11 18:16:09 [INFO] [STDERR] at dan200.computer.shared.TileEntityDiskDrive.unmountDisk(TileEntityDiskDrive.java:584)
2013-08-11 18:16:09 [INFO] [STDERR] at dan200.computer.shared.TileEntityDiskDrive.detach(TileEntityDiskDrive.java:525)
2013-08-11 18:16:09 [INFO] [STDERR] at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.detach(PeripheralAPI.java:90)
2013-08-11 18:16:09 [INFO] [STDERR] at dan200.computer.core.apis.PeripheralAPI$1.execute(PeripheralAPI.java:275)
2013-08-11 18:16:09 [INFO] [STDERR] at dan200.computer.core.ComputerThread$1$1.run(ComputerThread.java:117)
2013-08-11 18:16:09 [INFO] [STDERR] at java.lang.Thread.run(Thread.java:722)
Edit: made title a bit more descriptive now that I'm pretty sure what the actual cause is.
Edited on 14 August 2013 - 08:50 AM