A simple ‘new’ statement is crashing on iPad2 with iOS-5, but the same code works fine on Mac/Windows player builds.
Xcode 4.2 on MacOSX 10.6, gdb outputs: “compute_class_bitmap: Invalid type 13 for field GraphNode`1[T]:data”
Below is the details of the object i am creating.
//A generic base class for graph node
//
public class GraphNode<T> {
//ctor
public GraphNode(string nodeId, T data) {
this.Id = nodeId;
this.data = data;
}
...
//fields
string Id;
T data;
List< GraphNode<T> > neighbors = new List< GraphNode<T> >();
...
}
public class Puzzle {
public class Checkpoint {
...
}
//A graph of some checkpoints
//
public class CheckpointsGraphNode : GraphNode<Checkpoint> {
//ctor
public CheckpointsGraphNode(string chkptId, Checkpoint chkpt) : base(chkptId, chkpt) {
...
}
...
}
...
}
...
...
Puzzle.CheckpointsGraphNode node = new Puzzle.CheckpointsGraphNode(nodeId, chkpt);
//
//The program crashes here on iPad
// at runtime with error "compute_class_bitmap: Invalid type 13 for field GraphNode`1[T]:d"
...
Can anybody please help me out? I believe this is some trivial problem, but im unable to solve it. This is my first project with unity and also C#. I come from C/C++ background.
I am using .NET subset Api compatibility level and Unity iOS.