Heap Space errors
I've attempted to convert the Shandalar quest IO code into the new XML questData IO (which also uses the new Deck class, which does not implement Serializable, so gives me trouble when I try the old IO).
However, I'm running into some Heap Space errors in this piece of code, which has been copied from loadData() in QuestDataIO.java:
Now, I'm storing a lot more stuff in Adventure_QuestData.java compared to the regular old QuestData, which also includes a lot of ArrayLists and Maps (which probably explains why this count is so ridiculously high).
Any ideas anyone? In particular, whoever ported the Quest code to use the new XML format. Maybe it's just not feasible to use XML when using a bunch of Maps.
I can always use the old IO / Deck code, I suppose.
However, I'm running into some Heap Space errors in this piece of code, which has been copied from loadData() in QuestDataIO.java:
- Code: Select all
...
while (reader.ready()) {
System.out.println("count: "+ count++);
int len = reader.read(buf);
xml.append(buf, 0, len); //<--- here
}
Now, I'm storing a lot more stuff in Adventure_QuestData.java compared to the regular old QuestData, which also includes a lot of ArrayLists and Maps (which probably explains why this count is so ridiculously high).
Any ideas anyone? In particular, whoever ported the Quest code to use the new XML format. Maybe it's just not feasible to use XML when using a bunch of Maps.
I can always use the old IO / Deck code, I suppose.