Bonjour à tous,

Je suis tombé aujourd'hui sur une erreur un poil bizarre. J'ai un nombre énorme de données que je peux télécharger depuis un serveur, et jusqu'à présent ça a toujours fonctionné !
Mais depuis quelque temps je souhaite accéder à des données différentes, mais exactement de même type, et ça plante. J'ai l'erreur suivante à la dernière accolade fermante de la fonction loadPlasmaData():
Run-Time Check Failure #2 - Stack around the variable 'plasma' was corrupted.
J'ai évidemment débogué pas à pas, et je n'obtiens que des bonnes valeurs!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
void loadPlasmaData(const std::vector<std::string> & data,int num_choc, bool graph_one)
{
	if( data.size() != 0 )
	{
		PlasmaData plasma(num_choc); // la variable en question
		std::vector<Point<double>> point(2);
		point[0]=Point<double>(0,0);
		point[1]=Point<double>(1,1);
 
		GraphFrame * frame;
		if( graph_one ) 
		{
			frame = createGraph(_T("Plasma data, choc ")+wxString::Format(_T("%d"),(int)num_choc),DisplayManager::frame_parent);
			static_cast<PlotContext2D*>(frame->Context())->SetAxisLegend(_T("temps (s)"),_T("Data"));
			frame->Context()->SetGraphTitle(_T("Plasma data, choc ")+wxString::Format(_T("%d"),(int)num_choc));
		}
 
		for(int i=0;i<data.size();i++)
		{
			PlasmaData::vecteur_data m_vect = plasma.GetData(data[i]); // Ok tout va bien
			if (!m_vect.empty() )
			{
				if( ! graph_one )
				{
					frame= createGraph(wxString(data[i].c_str(),wxConvLocal )+_T(", choc ")+wxString::Format(_T("%d"),(int)num_choc),DisplayManager::frame_parent);
					static_cast<PlotContext2D*>(frame->Context())->SetAxisLegend(_T("Time (s)"),_T("Data"));
					frame->Context()->SetGraphTitle(wxString(data[i].c_str(),wxConvLocal )+_T(", choc ")+wxString::Format(_T("%d"),(int)num_choc));
				}
 
				for(int j = 0; j<m_vect.size();j++)
				{
					PlotData * plot = new Plot2DSerie((PlotAxisSimple*)NULL,(PlotAxisSimple*)NULL,&m_vect[j][0],m_vect[j].size());//,p,STRAIGHT_LINE);
					plot->SetName(wxString(data[i].c_str(),wxConvLocal ));
					frame->Context()->AddPlot(plot);
				}
			}
			else { // on ne passe pas ici, OK
				std::cout << "Data " << data[i] << " not available" << std::endl;
			}		
		}//for
	}// if
} // ERREUR ICI
Je comprend vraiment pas ce que c'est. Si quelqu'un pouvait me donner une piste, je lui en serais très reconnaissant !