Menu

#854 Assertion failed

open
open
nobody
None
5
2004-05-28
2004-05-28
Anonymous
No

Using Jikes 1.21 to compile JDK 1.3 code

*Cannot* reproduce in a standalone case, so it may be cumulative... but here is the error and source for 2 classes that *mimic* the pattern of our original failing class.
Basically, ObjectA compiles fine... but when compiling a 2nd project which depends on ObjectA - while jikes is reading in the dependant classes (in -verbose mode) - it fails while reading in the inner class of ObjectA.
Hopefully the error message itself can help you figure it out.
This worked fine in 1.19
Jikes is being called by Ant in this case.

[javac] [read C:/proj/tms50/tms50/working.dir/enterprise/compile/java/com/nextjet/enterprise/order/OrderNoteData.class]
[javac] [read C:/proj/tms50/tms50/working.dir/enterprise/compile/java/com/nextjet/enterprise/order/OrderNoteData$1.class]
[javac] Assertion failed: (! IsLocal() && ! Anonymous()) || (IsNested() && ! ACC_STATIC()), file ../../jikes-1.21/src/symbol.h, line 1110

import java.io.*;
import java.util.*;

public class ObjectA implements Serializable {

public Date aDate;

public static Comparator getComparator() {
return new Comparator() {
public int compare(Object o1, Object o2) {
ObjectA a1 = (ObjectA)o1;
ObjectA a2 = (ObjectA)o2;
return a1.aDate.compareTo(a2.aDate);
}
};
}

}

public class ObjectB {

ObjectA a;

public ObjectB() {
a = new ObjectA();
}

}

Discussion

  • Nobody/Anonymous

    This looks like a duplicate of bug 3978, which contains a similar test case that causes the same assertion failed error message.

    The problem seems to occur (as the submitter suggests) when a +F dependency check tries to read an anonymous inner class, and is a recently introduced regression.

    The cvs logs for symbol.h line 1110 don't show any recent changes to the lines causing the assertion error, so there must have been a change to another file that calls the method there: IsInner().

     
  • Jesse Byler

    Jesse Byler - 2005-10-04

    Logged In: YES
    user_id=907105

    Following up on the previous comment, which I posted before
    the transition from devloperworks to sourceforge.net: I
    believe this bug to be a duplicate of bug 1148525 (new
    SourceForge bug number), which has a small, reproducible
    test case.

     

Log in to post a comment.