Vector error? Freezes on arbitary index

I am having a problem which I've isolated to the following part of my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
while(!EventData.eof())
	{
        while (!EventData.eof() && (event_number == current_event_number || event_number == 0)) {
			if (event_number != 0) {
				// cout << "Writing pop(" << fiber << ", "<<time<<") to event " << current_event_number << "\n";
				current_pop = new pop(fiber,time);
				current_event->AddPop(*current_pop);
				//cout << "Pop vector size: " << current_event->pops.size() << "/" << current_event->pops.capacity() << "\n";
				}
			EventData >> event_number >> fiber >> time;
			// cout << event_number << " " << fiber << " " << time << "\n";
		}

                //Blahblahblah making histograms out of the data

		current_event_number++;
		current_event->number = current_event_number;
		current_event->pops.clear();
	}

(current_event does nothing except hold a vector of pop objects and an int index_number. Pops just have an int fiber, double time, and a couple member functions.)

The objective is to read an ascii data file of this form:
1
2
3
4
5
6
7
8
9
10
11
12
0	0	0
1	115	90
1	96	93.8
1	115	102.4
0	0	0
2	105	105.9
0	0	0
3	54	88.2
3	119	85.7
0	0	0
4	93	78.4
...etc


This works fine for a while, but eventually it stops (on event 137 - nothing special about it, looks like all the other events) and gives me this error:
root [2] viperfish()
Reading pops...
Error: Symbol #include is not defined in current scope  C:\Users\anotherghost\Wo
rk\viperfish.C(175)
Error: Symbol exception is not defined in current scope  C:\Users\anotherghost\W
ork\viperfish.C(175)
Syntax Error: #include <exception> C:\Users\anotherghost\Work\Belle\working\vipe
rfish.C(175)
Error: Symbol G__exception is not defined in current scope  C:\Users\anotherghos
t\Work\viperfish.C(175)
Error: type G__exception not defined FILE:C:\Users\anotherghost\Work\viperfish.C LINE:175
*** Interpreter error recovered ***


Can anyone explain this error to me? I haven't called #include, don't know what G__exception is, and most importantly, I don't understand why the code works for the first 136 events in the loop but locks up on 137.
Last edited on
Can't say. Post the whole code and the input file so that I can test it myself. Put it in pastebin.com if they are long.
Topic archived. No new replies allowed.