Comments (12)
Does this happen consistently? Can you describe reproduction steps in more detail?
from truecraft.
I can reproduce this consistently: it happens every single time. Steps are (sorry if this is stupidly verbose, but I just in case):
- Open game.
- "Play offline".
- "Singleplayer".
- "New world".
- Enter some random name.
- Click that world, create.
- Select that world, play.
- The launcher says "Generating world..." for a bit, then "Simulating world..."
- The launcher hides, screen flashes (like something draws for a single frame or something)
- The launcher reappears.
Selecting a pre-existing world has the same result.
I believe these dependencies are relevant:
- mono: 5.0.0.100
- gtk2: 2.24.31
- gtk-sharp-2: 2.12.42
- sdl_mixer: 1.2.12
- webkitgtk2: 2.4.11-6
I also tried deleting ~/.config/truecraft
.
from truecraft.
I can reproduce. Will look into it.
from truecraft.
I've been getting the same error as well. When I try to just run the client I got this as an output.
Unhandled Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at TrueCraft.Client.Program.Main (System.String[] args) [0x0001c] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at TrueCraft.Client.Program.Main (System.String[] args) [0x0001c] in :0
from truecraft.
I'm having the same issue with @hobarrera
from truecraft.
same issue with @BearzRobotics
i think this game is dead. too bad prob no fix.
from truecraft.
Send me a patch and I'll merge it.
from truecraft.
Ended up figuring this out by accident. The fast path for HandleChunkData seems to assume the chunk size when it may, for example, only have block IDs without metadata, light, or sky light. This fixes the crash for me, but I'm guessing the packet is supposed to have all of these things...?
diff --git a/TrueCraft.Client/Handlers/ChunkHandlers.cs b/TrueCraft.Client/Handlers/ChunkHandlers.cs
index 254299f..ede145a 100644
--- a/TrueCraft.Client/Handlers/ChunkHandlers.cs
+++ b/TrueCraft.Client/Handlers/ChunkHandlers.cs
@@ -52,16 +52,31 @@ namespace TrueCraft.Client.Handlers
&& packet.Height == Chunk.Height
&& packet.Depth == Chunk.Depth) // Fast path
{
+ // Chunk data offsets
+ int metadataOffset = chunk.Data.Length;
+ int lightOffset = metadataOffset + chunk.Metadata.Length;
+ int skylightOffset = lightOffset + chunk.BlockLight.Length;
+
// Block IDs
Buffer.BlockCopy(data, 0, chunk.Data, 0, chunk.Data.Length);
// Block metadata
- Buffer.BlockCopy(data, chunk.Data.Length, chunk.Metadata.Data, 0, chunk.Metadata.Data.Length);
+ if (metadataOffset < data.Length)
+ {
+ Buffer.BlockCopy(data, metadataOffset,
+ chunk.Metadata.Data, 0, chunk.Metadata.Data.Length);
+ }
// Block light
- Buffer.BlockCopy(data, chunk.Data.Length + chunk.Metadata.Data.Length,
- chunk.BlockLight.Data, 0, chunk.BlockLight.Data.Length);
+ if (lightOffset < data.Length)
+ {
+ Buffer.BlockCopy(data, lightOffset,
+ chunk.BlockLight.Data, 0, chunk.BlockLight.Data.Length);
+ }
// Sky light
- Buffer.BlockCopy(data, chunk.Data.Length + chunk.Metadata.Data.Length + chunk.BlockLight.Data.Length,
- chunk.SkyLight.Data, 0, chunk.SkyLight.Data.Length);
+ if (skylightOffset < data.Length)
+ {
+ Buffer.BlockCopy(data, skylightOffset,
+ chunk.SkyLight.Data, 0, chunk.SkyLight.Data.Length);
+ }
}
else // Slow path
{
from truecraft.
Can you send this as a pull request instead of a diff thrown into a commit? You can email me a patch if you want, too.
from truecraft.
Done: #282
from truecraft.
Using latest commit still warrants the same effect. However, I want to note that this happens regardless of offline, or online mode and whether or not I load an already generated world. I am also compiling on VS 2017. Does the same with the precompiled binaries available on the website, with no errors.
from truecraft.
Weird, on my side it runs fine.
- Gentoo Linux
- Mono 5.2.0.196
Do you actually have the same error?
from truecraft.
Related Issues (20)
- Finally the Lighting bugs are still there and when digging straight down the world does not load
- Crash on modern ping packet HOT 4
- Mod API Suggestions
- Random crashes and running in the background HOT 2
- SSL certificate of truecraft.io has expired HOT 2
- System.DllNotFoundException: libwebkitgtk-1.0.0.dylib HOT 4
- Building in Monodevelop on Ubuntu HOT 6
- Broken recipies
- [Linux] Failure to Launch HOT 9
- [Request] a java version of Truecraft HOT 1
- Game Crash HOT 2
- Crash on single player launch HOT 1
- Crash while playing the game
- Another crash while playing the game
- Impossible to tab out of the game
- Broken sky/sun renderer
- Mouse extremly sensitive
- macOS HOT 1
- Crash on Opening a furnace, chest, dispenser windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from truecraft.