Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  VM crash in Joint.setParam(...)  (Read 1243 times)
0 Members and 1 Guest are viewing this topic.
Offline sanchofx1

Senior Newbie




Java games rock!


« Posted 2005-04-07 13:35:27 »

Hey folks,
don't know wether this is a bug, but I get a VM crash when I cast my JointHinge to Joint and call setParam(x,y) on this. No crash is happening when I use the JointHinge reference in the same code.
Is it not possible to set the parameters from a Joint reference ?

Greetings,
Marcus
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #1 - Posted 2005-04-07 13:55:58 »

Heah ?? I think if you cast something it shouldn't affect anything, because even when casted down the overwritten function gets executed - isn't that the power of object oriented programming ? So what I'm saying with that your error is probably somewhere else.

:: JOODE :: Xith3d :: OdeJava ::
Offline sanchofx1

Senior Newbie




Java games rock!


« Reply #2 - Posted 2005-04-07 15:09:43 »

public void configure(Joint joint) {
((JointHinge)joint).setParam(cc.option,cc.value);
}
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #3 - Posted 2005-04-07 15:15:21 »

Hmm... it sounds like the Joint is not actually a JointHinge, but I would think that would result in a ClassCastException.  You can verify the Class of the Joint using joing.getClass().getName().  Alternatively, the option may not be valid for a JointHinge.
Offline sanchofx1

Senior Newbie




Java games rock!


« Reply #4 - Posted 2005-04-07 15:57:19 »

Oh, now it suddenly works again. Thats strange, I have repeated the test two times bevor I wrote here - it was reliably crashing without hte casting??? Now it works - again. Doesn't make any sense to me... I think there must evetually be passed somthing illegal (or maby null) into the method? Now it's gone, but I will now include a != null check, just to be on the save side.
Thanks guys!
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #5 - Posted 2005-04-07 16:45:36 »

Are you using the latest CVS?  There have been some native crash problems solved since the last release.
Offline sanchofx1

Senior Newbie




Java games rock!


« Reply #6 - Posted 2005-04-09 11:32:36 »

No actually not. I tried several times to build from cvs, but never succeeded. Maye I should give it a try again? I think my version is  0.2.4, and I'm strugglingquite  hard with several VM crashes...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (19 views)
2014-09-12 09:08:26

Norakomi (54 views)
2014-09-10 13:57:51

TehJavaDev (63 views)
2014-09-10 06:39:09

Tekkerue (31 views)
2014-09-09 02:24:56

mitcheeb (53 views)
2014-09-08 06:06:29

BurntPizza (37 views)
2014-09-07 01:13:42

Longarmx (23 views)
2014-09-07 01:12:14

Longarmx (27 views)
2014-09-07 01:11:22

Longarmx (27 views)
2014-09-07 01:10:19

mitcheeb (35 views)
2014-09-04 23:08:59
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!