Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
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  
  Strange Annotation related compilation problem in xith-tk  (Read 991 times)
0 Members and 1 Guest are viewing this topic.
Offline cylab

JGO Ninja


Medals: 43



« Posted 2006-09-28 18:42:52 »

I had a really strange compilation problem after updating my xith-tk from cvs:

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  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
An exception has occurred in the compiler (1.5.0_08). Please file a bug at the Java Developer Connection
(http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates.
Include your program and the following diagnostic in your report.  Thank you.
java.lang.AssertionError: {unused}
   at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.visitArray(TreeMaker.java:634)
   at com.sun.tools.javac.code.Attribute$Array.accept(Attribute.java:124)
   at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.translate(TreeMaker.java:637)
   at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.visitCompoundInternal(TreeMaker.java:628)
   at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.translate(TreeMaker.java:641)
   at com.sun.tools.javac.tree.TreeMaker.Annotation(TreeMaker.java:649)
   at com.sun.tools.javac.tree.TreeMaker.Annotations(TreeMaker.java:570)
   at com.sun.tools.javac.tree.TreeMaker.VarDef(TreeMaker.java:554)
   at com.sun.tools.javac.comp.Lower.visitArrayForeachLoop(Lower.java:2808)
   at com.sun.tools.javac.comp.Lower.visitForeachLoop(Lower.java:2757)
   at com.sun.tools.javac.tree.Tree$ForeachLoop.accept(Tree.java:597)
   at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
   at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:54)
   at com.sun.tools.javac.tree.TreeTranslator.visitBlock(TreeTranslator.java:145)
   at com.sun.tools.javac.comp.Lower.visitBlock(Lower.java:2927)
   at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:535)
   at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
   at com.sun.tools.javac.comp.Lower.visitIf(Lower.java:2382)
   at com.sun.tools.javac.tree.Tree$If.accept(Tree.java:715)
   at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
   at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:54)
   at com.sun.tools.javac.tree.TreeTranslator.visitBlock(TreeTranslator.java:145)
   at com.sun.tools.javac.comp.Lower.visitBlock(Lower.java:2927)
   at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:535)
   at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
   at com.sun.tools.javac.tree.TreeTranslator.visitMethodDef(TreeTranslator.java:129)
   at com.sun.tools.javac.comp.Lower.visitMethodDefInternal(Lower.java:2267)
   at com.sun.tools.javac.comp.Lower.visitMethodDef(Lower.java:2186)
   at com.sun.tools.javac.tree.Tree$MethodDef.accept(Tree.java:478)
   at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
   at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:1989)
   at com.sun.tools.javac.tree.Tree$ClassDef.accept(Tree.java:434)
   at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
   at com.sun.tools.javac.comp.Lower.translate(Lower.java:1901)
   at com.sun.tools.javac.comp.Lower.translateTopLevelClass(Lower.java:3064)
   at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:487)
   at com.sun.tools.javac.main.Main.compile(Main.java:592)
   at com.sun.tools.javac.main.Main.compile(Main.java:544)
   at com.sun.tools.javac.Main.compile(Main.java:67)
   at com.sun.tools.javac.Main.main(Main.java:52)


luckily I found this equivalent problem. It seems to be a known compiler bug fixed in mustang and was caused by an improper placed Annotation in DaeExporter line 1244:
1  
2  
         for ( @SuppressWarnings("unused")
      final TransformNode  viewNode : viewNodes )

it is stated in th the bug report, that @SuppressWarnings is not allowed inside a statement (the for-loop), but the compiler should not crash this way.

So THAT was a tough one Shocked. It's really great if your compiler is so helpful Undecided
I hope this helps someone with the same problem...

Have you guys ever encountered this or are you using mustang?


Mathias - I Know What [you] Did Last Summer!
Offline rafa_es

Junior Member





« Reply #1 - Posted 2006-09-28 18:49:25 »


it is stated in th the bug report, that @SuppressWarnings is not allowed inside a statement (the for-loop), but the compiler should not crash this way.

So THAT was a tough one Shocked. It's realy great if your compiler is so helpful Undecided
I hope this helps someone with the same problem...

Have you guys ever encountered this or are you using mustang?



Got the same problem here, Thanks for the help
Offline croft

Junior Member




Java, Java, Java


« Reply #2 - Posted 2006-09-28 19:31:22 »

fixed in mustang and was caused by an improper placed Annotation in DaeExporter line 1244:
1  
2  
         for ( @SuppressWarnings("unused")
      final TransformNode  viewNode : viewNodes )

it is stated in th the bug report, that @SuppressWarnings is not allowed inside a statement (the for-loop), but the compiler should not crash this way.

So THAT was a tough one Shocked. It's really great if your compiler is so helpful Undecided
I hope this helps someone with the same problem...

Have you guys ever encountered this or are you using mustang?

That is the same as this bug:
http://www.java-gaming.org/forums/index.php?topic=14948.0

I'll delete the offending code today.

That bug has been there for 2 months.  Odd that you and I would discover it at about the same time.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cylab

JGO Ninja


Medals: 43



« Reply #3 - Posted 2006-09-28 19:38:50 »

I already changed the offending code in xith-tk and committed it.

Mathias - I Know What [you] Did Last Summer!
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.

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

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

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

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

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

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

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

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
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!