Show Posts
|
|
Pages: [1]
|
|
1
|
Game Development / Newbie & Debugging Questions / Random JVM crashes. (no JNI)
|
on: 2013-06-18 22:08:45
|
Hello, I have a J2SE application that is running the server for my game. It runs on a Linux box that is getting a number of various JVM crashes. The program has no JNI and does not use any libraries, it's all just Java. The call stacks are always different, and I don't see any consistency in what is happening in the application when the JVM crashes. It does however always seem to be a SIGSEGV. Sometimes they happen after 2 minutes of uptime, sometimes after days. I tried upgrading the JVM from 6.0_27-b07 to 7.0_06-b24 but it has made no difference. I uploaded all the hs_err logs here: http://www.tacticstudios.com/downloads/logs.rar if you would like to take a look. Due to the inconsistent call stacks my only assumption is that memory is getting corrupted in some way, and the crash is occurring later on. Maybe it is a hardware problem? I'm not certain what would cause this. Any assistance you can provide in how to debug this, or any ideas would be extremely appreciated. Here is the most recent log: http://pastebin.java-gaming.org/cfa70551363Jesse
|
|
|
|
|
2
|
Game Development / Performance Tuning / Random JVM crashes (no JNI) --- wrong subforum... remove
|
on: 2013-06-18 22:04:09
|
Hello, I have a J2SE application that is running the server for my game. It runs on a Linux box that is getting a number of various JVM crashes. The program has no JNI and does not use any libraries, it's all just Java. The call stacks are always different, and I don't see any consistency in what is happening in the application when the JVM crashes. It does however always seem to be a SIGSEGV. Sometimes they happen after 2 minutes of uptime, sometimes after days. I tried upgrading the JVM from 6.0_27-b07 to 7.0_06-b24 but it has made no difference. I uploaded all the hs_err logs here: http://www.tacticstudios.com/downloads/logs.rar if you would like to take a look. Due to the inconsistent call stacks my only assumption is that memory is getting corrupted in some way, and the crash is occurring later on. Maybe it is a hardware problem? I'm not certain what would cause this. Any assistance you can provide in how to debug this, or any ideas would be extremely appreciated. Here is the most recent log: http://pastebin.java-gaming.org/cfa70551363Jesse EDIT: This was put in the wrong forum... I guess I had multiple windows open. Meant to be under "Newbie" questions... Posting over there. Please delete!
|
|
|
|
|
5
|
Game Development / Newbie & Debugging Questions / Avoiding "The application's digital signature cannot be verified"
|
on: 2012-02-28 18:24:41
|
|
I self-sign my applets and of course the user is presented with a screen that prompts them to confirm the digital signature every time they visit the page (unless they confirm they don't want to see the message again).
It's appearing because I request access to the user's clipboard (so they can cut & paste text), and to lock their mouse to the applet (so they can scroll around in the game easier)
Is there seriously no way of avoiding this message? Like getting the applet signed or approved by Verisign or somebody that can confirm it's just a game and not out to steal your private information.
|
|
|
|
|
7
|
Game Development / Newbie & Debugging Questions / Re: Weird rendering glitch
|
on: 2010-03-20 03:05:54
|
Yeah the browsers are IE, Mozilla, and Chrome. All 3 it's doing this on his machine. I've tried all three locally and they all work fine for me. The applet calls repaint() on the Canvas every frame. ie. there is a main thread that runs the game and calls the repaint method every X milliseconds. I add the main Canvas to the JApplet's ContentPane on applet initialization. I can try calling repaint() on the Applet itself... will let you know how that goes. For the load screen (which I'm less concerned about if the game ends up working fine) the HTML is as follows: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| <html> <title>Immortal Empire</title> <link rel="stylesheet" href="iempire.css" type="text/css"> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <body> <TABLE WIDTH=100% border=0 cellpadding=0 cellspacing=0> <TR ALIGN=CENTER HEIGHT=80%> <TD ALIGN=CENTER VALIGN=CENTER> <BR><BR> <applet code=Main.IsoGame.class width="800" height="600"> <param name="boxbgcolor" value="#000000"> <param name="boxfgcolor" value="#000000"> <param name="progresscolor" value="#9B5000"> <param name="boxborder" value="false"> <param name="image" value="ie_loadscreen.gif"> <param name="cache_archive" value="IsoGame.jar,IsoImages_interface.jar,IsoImages_game.jar,IsoSounds_interface.jar,IsoSounds_game.jar,IsoMusic_bossbattle.jar,IsoMusic_cinematic_standard.jar,IsoMusic_cinematic_vuldreth.jar,IsoMusic_desert.jar,IsoMusic_dialog_dazo.jar,IsoMusic_dialog_elder.jar,IsoMusic_dialog_maielle.jar,IsoMusic_grasslands.jar,IsoMusic_menu_0.jar,IsoMusic_menu_1.jar,IsoMusic_volcanic.jar,IsoLib_jogg.jar,IsoLib_jorbis.jar,IsoLib_tritonius.jar,IsoLib_vorbis.jar"> <param name="cache_option" value="Plugin"> <param name="cache_version" value="0.0.3.4,0.0.1.D,0.0.1.C,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8,0.0.1.8"> You cannot play this game because you do not have Java installed. Java is a free download, please acquire it from <A HREF="http://www.java.com" target="_blank">http:</applet> </TD> </TR> </TABLE> </body> </html> |
It took me a while to settle on this type of deployment since it handles JAR caching and JAR indexing correctly in all browsers without needing javascript. I don't use JNLP - but maybe I should?
|
|
|
|
|
8
|
Game Development / Newbie & Debugging Questions / Weird rendering glitch
|
on: 2010-03-19 15:48:17
|
Hello, One of my customers is experiencing a very strange problem when trying to access my game. It's a Java Applet. Just to be clear - this is the applet loading screen. It does it when displaying the game too. He says it's happening in all 3 browsers (ie, firefox, chrome). Given that it's happening on the applet load screen I feel like the HTML must be the culprit, but to be honest I'm completely stumped here. Here's a screenshot:  Here's how it's supposed to look:  Here's another example of the login screen (this is in-game code)  and how it's supposed to look:  Ignore the debug info - was just some stuff I printed to help debug the problem. Anyone seen this before or have any idea what's going on here? Most of my customers have no problem. Website is www.immortal-empire.com
|
|
|
|
|
11
|
Game Development / Newbie & Debugging Questions / Re: Jar Indexing progress bar
|
on: 2009-11-27 15:53:27
|
|
There's no particular reason I'm using the class loader - other than that it works and caches in the way I want it to. Just has this problem with the progress bar.
I have not used the URLConnection before, but I will definitely give that a shot. I am concerned however that the caching it would use sounds like it is not as persistent as the JAR caching. (for example, it mentions circumventing the cache if the user hits refresh on their browser) With Jar Caching, the file is cached until the user manually deletes it or it is updated server-side.
Jesse
|
|
|
|
|
12
|
Game Development / Newbie & Debugging Questions / Re: Jar Indexing progress bar
|
on: 2009-11-26 20:03:22
|
Okay, I follow what you are saying. I can do this no problem - however in my calling code, I am not actually "reading" the data into memory. I am simply "touching" it so Jar Indexing decides to download the JAR. My code looks like: 1
| GetClass().getResourceAsStream(filename); |
This is the function that blocks until the JAR is finished downloading. Now I could wrap this in a subclass like you suggest, such as 1
| new WrappedInputStream(getClass().getResourceAsStream(filename)); |
but this will just block in the same way as before. My overloaded read methods would never be executed. Jesse
|
|
|
|
|
14
|
Game Development / Newbie & Debugging Questions / Jar Indexing progress bar
|
on: 2009-11-26 05:37:54
|
|
Hello,
I am using Jar Indexing to load certain parts of the game at opportune times for the end user.
For example, most of the source (1mb worth or so) is in one JAR, whereas sfx and music are in another (27mb or so).
So they are able to download the basic 1mb app and show an in-game load screen. The problem is, there doesn't seem to be any callback for when elements inside a jar are loaded from indexing.
Does anyone know a way around this? I'm referencing the audio in a separate thread, but that thread just blocks until the whole 27mb is downloaded. Best I can do right now is a spinner, but some indication of progress would be great.
Thanks for any help,
Jesse
|
|
|
|
|
16
|
Java Game APIs & Engines / Java Sound & OpenAL / Fast way to play sounds in Java Applet
|
on: 2009-04-12 16:25:02
|
Saw a post slightly below this asking same question but didn't find an answer so I'll repost his question since I am having the same problem. I am playing small 22khz 16 bit WAV sound clips in a Java Applet using the following code: 1 2 3 4 5 6 7
| InputStream is = loadFile(filename); AudioInputStream ain = AudioSystem.getAudioInputStream(is); DataLine.Info info = new DataLine.Info(Clip.class, ain.getFormat()); Clip clip = (Clip)AudioSystem.getLine(info); clip.open(ain); clip.start();
|
Works great, but takes about 6ms to execute, even on sounds that have already been loaded. I need to be able to play this sound more than once, and allow overlapping of that same sound. Would like something more responsive - anyone have a faster method to play sound? Some things I have tried: - Holding a reference to the clip instance rather than reinstantiating seems to drop from 6ms to 2ms, but then repeating the same sound interrupts itself... I could get around this by keeping say, 4 references to the same clip but I'm also having issues with sounds entirely cutting out (never playing again) using this method. - The basic play(getCodeBase(), filename) stuff is slow and doesn't allow overlapping whatsoever - OGG code streaming in a separate thread, this seems decent for music but for sound clips not responsive enough Thanks, Jesse
|
|
|
|
|
19
|
Game Development / Newbie & Debugging Questions / Re: Loading resources from multiple JARs
|
on: 2008-09-29 15:05:45
|
|
From what I've read, having no leading slash prepends the class's package name converting all .'s to /'s. I suppose this is useful when you want to load resources that are in subdirectories from your class files, but I have my resources in a separate directory. I tried having no slash and this fails whether I have the files together or in separate JARs.
I haven't tried applet.getCodeBase() + "images/temp/test.png" (is that what you mean by user.dir?) ... maybe I'll give that a shot.. but I don't see how it knows then to open up a JAR and not some resource sitting on a server.
And as I'm sure you know there are no JNLP files for applets =(. Everything I've read seems to imply that getResourceAsStream() should search the full classpath, including both JARs, to look for resources... so I must be doing something wrong here.
Jesse
|
|
|
|
|
20
|
Game Development / Newbie & Debugging Questions / Loading resources from multiple JARs
|
on: 2008-09-28 15:48:06
|
|
Cross-posting with sun forums since I'm getting no response, maybe you guys can help with this issue as I'm sure other games have needed this behaviour.
I am attempting to load various resources (images, sounds, files) from a separate JAR from my source class. I have two jars:
source.jar <- contains all my class files resources.jar <- contains all my images/sounds.
If I do not split these into two jars, everything works as expected. I am using the following HTML tag:
<applet code=Main.MyClass.class ARCHIVE="source.jar, resources.jar" width="800" height="600">
And the following resource loading code with and without the slash '/':
applet.getClass().getResourceAsStream("images/temp/test.png") <- Does not work, Returns null. applet.getClass().getResourceAsStream("/images/temp/test.png") <- Works when I have everything in the same JAR, but not when they are separate. Returns null.
I am splitting up the JARs so the large resources can download separately via JAR Indexing. But, I cannot access this test image with or without indexing when the JARs are separated. Directory structure is:
source.jar: Main/MyClass.class Lib/OtherClass.class Data/SomeData.bin ^ all load fine
resources.jar: images/temp/test.png sounds/mysound.ogg ^ cannot access these =(
Am I missing something here?
Jesse
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|