Jump to content
  • 0

Game crashes after playing for a few minutes.


GeorgePaul

Question

Greetings, I just bought PZ on Steam and I am very excited because I wanted to play this game for months. To my surprise though the game crashes after playing for a few minutes. It happens on both Survival and Sandbox, the game suddenly freezes after playing for 10-15 minutes and then closes, without popping up an error message. What can I do to solve this? Thanks for your time.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Welcome, hope you get to play & enjoy the game.

 

First; there's some info required to try to troubleshoot...

What are your system specs (CPU, RAM, Video card, etc.)

 

Are you getting any errors in the console or logs?   And there are ways to get extra logs... which I'll go into shortly.

 

Second; having said that... now I'll ignore myself and try troubleshooting blindly. 

Because that's the sort of Computer guy I am. :P

 

There is an issue I and some others have had where (depending on system specs) the game requires more RAM for Java than the Java defaults will allow; so you end up with a Java "OutOfMemory" error that crashes the game.  I'll pretend that's what you're seeing.

 

Which is sad, and disappointing; and if you're ok running the game outside of Steam... totally fixable. 

You'll end up running a lightly modified batch file from a batch file they provided (so it's pretty normal).

 

http://theindiestone.com/forums/index.php/topic/2620-bugs-build-17-0010/page-2#entry39285

 

Now my system is integrated video, dual core, with 8Gb of RAM... so I had a lot of ram to play with and decide to allow the game 4Gb.  If you've only got say 4GB you might shutter at 2048 instead of 4096 in the change at the link provided.

 

I tend run actually run at 1.3-1.4Gb of memory used for the ProjectZomboid process with this batch file; but I don't get hardly any lag; and my crashing issues stopped.

 

IF this doesn't help (and it very well may not help) it WILL give you more info to provide.  you'll get an error logfile (I called it err64.txt, you can change that in the bat file) which dumps into the Steam Project Zomboid folder... and with a logfile it's a lot more likely you'll get more detailed and specific help. :)

Link to comment
Share on other sites

Here are my PC specs:
Intel Core i5-3350P CPU
8 GB RAM
NVIDIA GeForce GT630 Graphics Card
Windows 64-bit 
 
I checked the files on the installation folder and found a log file called error.log with this written on it:
java.lang.ClassNotFoundException: zombie.gameStates.MainScreenState
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
 
I also found a .txt file called hs_err_pid7724.log

It has a lot of stuff written in it but something interesting that caught my eye are the very first few lines:

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 24 bytes for AllocateHeap
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (memory/allocation.inline.hpp:60), pid=7724, tid=5296
#
# JRE version: 7.0_25-b17
# Java VM: Java HotSpot Server VM (23.25-b01 mixed mode windows-x86 )
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
 
It may possibly be what you said, i 'll try your method out and post if it worked.
Link to comment
Share on other sites

I did what you said it it workes fine now. Thanks for the help.

 

HOORAY! :D

 

Oh, and a note for anyone else...

 

EnigmaGrey posted on another thread:

Just a note, if you're on a 64-bit system with only Java 32-bit installed, you'd use %ProgramFiles(x86)%.

 

Trying to keep this up-to-date-ish... as I may refer back here later. :)

Link to comment
Share on other sites

Hi. My game is crashing randomly and every time it crashes i see this 'exception' at the end of cmd window:

Exception in thread "Thread-5" java.lang.IllegalStateException: No context is cu

rrent

        at org.lwjgl.opengl.WindowsContextImplementation.swapBuffers(WindowsCont

extImplementation.java:65)

        at org.lwjgl.opengl.ContextGL.swapBuffers(ContextGL.java:175)

        at org.lwjgl.opengl.DrawableGL.swapBuffers(DrawableGL.java:90)

        at org.lwjgl.opengl.Display.swapBuffers(Display.java:618)

        at org.lwjgl.opengl.Display.update(Display.java:646)

        at zombie.core.opengl.RenderThread$1.run(RenderThread.java:96)

        at java.lang.Thread.run(Unknown Source)

 

Crashes are random: on game start, in menu window, when loading a save, when playing. Sometimes it crash, sometimes don't.

I am using 2.9.9.16 forum test release version as the new version is working very slowly on my rig. I think it may be one of the mods i use. I modified some of the lua files too, some minor changes. 

Anybody may know what could cause those crashes?

 

My comp:

AMD FX-4100 3.66

8GB ram

Windows 7 Ultimate 64-bit

AMD Radeon HD 6800 series

ASRock 970 Extreme3

SSD OCZ 128GB

Link to comment
Share on other sites

I've got a feeling that this is a problem with 64-bit windows users - I'm using a bootcamped iMac with Windows Professional 64-bit. Admittedly the rig is old and I have a max of 4GB RAM, but that should be fine to run the game as is, however I've encountered quite a few crash on start errors or the game just freezes after a small while.

 

As mentioned above, running the batch file outside of steam helps reduce the amount of crashes (also helps running 32 bit as well),

is this a fixable problem for the future?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...