Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » TheIde crashes when there is an error in translation file
TheIde crashes when there is an error in translation file [message #39816] Fri, 03 May 2013 16:55 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

TheIde crashes when there is an error in translation file in the main package (e.g. it contains empty source string T_(""))
SyncT function adds index to mainsT even if nothing is added to tfile.

for(int iFile = 0; iFile < pk.file.GetCount(); iFile++) {
	String file = SourcePath(n, pk.file[iFile]);
	String ext = GetFileExt(file);
	if(ext == ".t" || ext == ".jt") {
		VectorMap<String, LngEntry> tmap(pmap, 0);
		if(LngParseTFile(file, tmap)) {
			TFile& tf = tfile.Add();
			tf.java = (ext == ".jt");
			tf.package = n;
			tf.file = pk.file[iFile];
			tf.map = tmap;
			tf.MakeLS();
		}
		// mark that we've found a local translation file
		localT = true;
		
		// store index of main package translation(s) file(s)

		//ERROR
		if(iPackage == 0)
			mainsT.Add(tfile.GetCount() - 1);
	}
}


I guess that it should look like this:
for(int iFile = 0; iFile < pk.file.GetCount(); iFile++) {
	String file = SourcePath(n, pk.file[iFile]);
	String ext = GetFileExt(file);
	if(ext == ".t" || ext == ".jt") {
		VectorMap<String, LngEntry> tmap(pmap, 0);
		if(LngParseTFile(file, tmap)) {
			TFile& tf = tfile.Add();
			tf.java = (ext == ".jt");
			tf.package = n;
			tf.file = pk.file[iFile];
			tf.map = tmap;
			tf.MakeLS();

			// mark that we've found a local translation file
			localT = true;
		
			// store index of main package translation(s) file(s)
			if(iPackage == 0)
				mainsT.Add(tfile.GetCount() - 1);
		}
	}
}



Re: TheIde crashes when there is an error in translation file [message #40027 is a reply to message #39816] Sun, 26 May 2013 20:26 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks, patch applied.

Mirek
Previous Topic: IDE crash
Next Topic: TheIde doesn't detect svn properly
Goto Forum:
  


Current Time: Thu Mar 28 21:20:16 CET 2024

Total time taken to generate the page: 0.01274 seconds