Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Random JVM crashes. (no JNI) on: 2013-06-20 12:47:37
Joen is right, there's lots of free memory. Funny but accurate explanation here: http://www.linuxatemyram.com/

Also, I do output the memory in a private log, it didn't exceed more than 10mb at one point. Plus, you'd think it would throw OutOfMemoryException not just crash the JVM.
2  Game Development / Newbie & Debugging Questions / Re: Random JVM crashes. (no JNI) on: 2013-06-19 13:18:59
- I am changing out the hardware so hopefully that will rule out that problem.
- Detailed info on the server and JVM is in http://pastebin.java-gaming.org/cfa70551363 but I tried both 6.0_27-b07 and 7.0_06-b24.
- The Linux box is: Linux 2.6.32-220.13.1.el6.x86_64 OS:CentOS release 6.4

I will ask why they installed 7.0_06 and try upgrading to the latest and see if that helps.
3  Game Development / Newbie & Debugging Questions / Random JVM crashes. (no JNI) on: 2013-06-18 20: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/cfa70551363

Jesse
4  Game Development / Performance Tuning / Random JVM crashes (no JNI) --- wrong subforum... remove on: 2013-06-18 20: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/cfa70551363

Jesse

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 / Re: Avoiding "The application's digital signature cannot be verified" on: 2012-03-05 01:19:08
Right, of course! Brilliant! Thank you.
6  Game Development / Newbie & Debugging Questions / Re: Avoiding "The application's digital signature cannot be verified" on: 2012-03-04 23:50:18
Is Verisign the one to use if I have to pay?

I actually tried completely removing the clipboard and robot and it is still showing... is there some way to show what in my project is causing this thing to appear?
7  Game Development / Newbie & Debugging Questions / Avoiding "The application's digital signature cannot be verified" on: 2012-02-28 17: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.
8  Game Development / Newbie & Debugging Questions / Re: Weird rendering glitch on: 2010-03-20 16:49:40
I store the Graphics object of the backbuffer as a member variable of the main frame. It's just an image I use for double buffering to prevent flickering.  I don't store the Graphics object of the paint() method that's passed as a parameter. 
9  Game Development / Newbie & Debugging Questions / Re: Weird rendering glitch on: 2010-03-20 02: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://www.java.com</A>.
</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?
10  Game Development / Newbie & Debugging Questions / Weird rendering glitch on: 2010-03-19 14: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  Games Center / Archived Projects / Multiplayer Strategy RPG - Immortal Empire on: 2010-01-30 00:42:59
Hey guys,

I've posted here a few times and this community has always been very helpful to our cause.  Our game just launched, Immortal Empire: http://www.tacticstudios.com/empire

It's a Multiplayer Strategy RPG.  Play co-op, or PvP, has a free trial.  $10 and you get a permanent account, could not be cheaper.

Here is the trailer: http://www.youtube.com/watch?v=j-cyLJmBe_U

Screens below:




Javagaming.org makes the credits for your help Smiley

Thanks,

Jesse Attard
12  Game Development / Newbie & Debugging Questions / Re: Jar Indexing progress bar on: 2009-11-27 16:38:03
Yes that's what I'm currently debating. It seems like that will work fine.  But it makes me cry on the inside
13  Game Development / Newbie & Debugging Questions / Re: Jar Indexing progress bar on: 2009-11-27 14: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
14  Game Development / Newbie & Debugging Questions / Re: Jar Indexing progress bar on: 2009-11-26 19: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
15  Game Development / Newbie & Debugging Questions / Re: Jar Indexing progress bar on: 2009-11-26 14:41:46
How do you wrap the stream? Would you mind sharing your code?

Jesse
16  Game Development / Newbie & Debugging Questions / Jar Indexing progress bar on: 2009-11-26 04: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
17  Java Game APIs & Engines / Java Sound & OpenAL / Re: Fast way to play sounds in Java Applet on: 2009-06-11 03:26:38
Been a while before I was able to try this out, but wanted to post thanks because this totally worked and solved the problem.  Plays mega fast now
18  Java Game APIs & Engines / Java Sound & OpenAL / Fast way to play sounds in Java Applet on: 2009-04-12 14: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();
// I close the clip object with a linelistener once it's done playing


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-10-07 01:25:13
Umm so I named it resources.Jar with a capital J.  Wow I'm bad.  Umm... yeah. embarassed
20  Game Development / Newbie & Debugging Questions / Re: Loading resources from multiple JARs on: 2008-10-07 01:06:15
Sorry it took so long to reply. I just tried with no space in the ARCHIVE tag, and it made no difference.

No one has deployed a game through an applet like this? =(
21  Game Development / Newbie & Debugging Questions / Re: Loading resources from multiple JARs on: 2008-09-29 13: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
22  Game Development / Newbie & Debugging Questions / Loading resources from multiple JARs on: 2008-09-28 13: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
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (18 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

atombrot (39 views)
2014-08-19 09:29:53

Tekkerue (36 views)
2014-08-16 06:45:27

Tekkerue (33 views)
2014-08-16 06:22:17

Tekkerue (22 views)
2014-08-16 06:20:21

Tekkerue (33 views)
2014-08-16 06:12:11

Rayexar (70 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32

BurntPizza (37 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!