Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for http://www.yacy-forum.de/viewtopic.php?p=32470#32470

orbiter958ebea5c570
diff --git a/source/de/anomic/plasma/plasmaCrawlBalancer.java b/source/de/anomic/plasma/plasmaCrawlBalancer.java
index a99be7c66..e01753e11 100644
--- a/source/de/anomic/plasma/plasmaCrawlBalancer.java
+++ b/source/de/anomic/plasma/plasmaCrawlBalancer.java
@@ -303,7 +303,12 @@ public class plasmaCrawlBalancer {
// 3rd: take entry from file
if ((result == null) && (fileStack.size() > 0)) {
kelondroRow.Entry topentry = fileStack.top();
- if (topentry != null) {
+ if (topentry == null) {
+ // emergency case: this means that something with the stack organization is wrong
+ // the file appears to be broken. We kill the file.
+ kelondroStack.reset(fileStack);
+ serverLog.logSevere("PLASMA BALANCER", "get() failed to fetch entry from file stack. reset stack file.");
+ } else {
String top = new String(topentry.getColBytes(0));
// check if the time after retrieval of last hash from same