Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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 800 times)
0 Members and 1 Guest are viewing this topic.
Offline cylab

JGO Knight


Medals: 30



« Posted 2006-09-28 20: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 20: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 21: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!
Try the Free Demo of Revenge of the Titans
Offline cylab

JGO Knight


Medals: 30



« Reply #3 - Posted 2006-09-28 21: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.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (73 views)
2013-05-17 21:29:12

alaslipknot (85 views)
2013-05-16 21:24:48

gouessej (114 views)
2013-05-16 00:53:38

gouessej (109 views)
2013-05-16 00:17:58

theagentd (120 views)
2013-05-15 15:01:13

theagentd (109 views)
2013-05-15 15:00:54

StreetDoggy (154 views)
2013-05-14 15:56:26

kutucuk (176 views)
2013-05-12 17:10:36

kutucuk (173 views)
2013-05-12 15:36:09

UnluckyDevil (182 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.305 seconds with 21 queries.