Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Segmentation fault

 
Tommy Tucker
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'am uisng kxml to do xml parsing but i keep getting a "Segmentation fault" error when i try to preverify my classes. I'am using CLDC1.1 on fedora core 2. The following line of code is causing the problem.
long bufsize = Runtime.getRuntime().freeMemory() >= 1048576 ? 8192 : 1;.

Anyone know why this is causing a problem? Is is a problem with long? The following line of code works ok
System.out.println(Runtime.getRuntime().freeMemory());

Thanks for any help

Tom
 
Johann Evans
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should not be caused by this, but try grouping your conditional -> ie. (foo.foo() >= 104727) ? (27763) : (2344)
 
Tommy Tucker
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently this should be a common problem with preveifying on red hat or fedora. I found the solution here http://forum.java.sun.com/thread.jsp?forum=76&thread=468349

It worked for me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic