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++ Library support » U++ Core » crash on exit from XmlView example
crash on exit from XmlView example [message #24234] Wed, 06 January 2010 21:40 Go to next message
jaynorwood is currently offline  jaynorwood
Messages: 7
Registered: May 2008
Promising Member
If I exit by just closing the selection dialog, the XmlView example crashes in b1824 on Windows Debug build, VS9.

I think what is happening is the call to StoreToFile is with a null pointer for file in Stream.cpp.

If I add the test below, it doesn't crash.

bool StoreToFile(Callback1<Stream&> serialize, const char *file, int version) {
FileOut f(Cfgname(file));
if (!file) return false;
return f ? Store(serialize, f, version) : false;
}


Re: crash on exit from XmlView example [message #24237 is a reply to message #24234] Wed, 06 January 2010 22:05 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks, bug was in Serialize, files cannot be serialized this way - need to call SerializeSettings instead:


void XmlView::Serialize(Stream& s)
{
	int version = 0;
	s / version;
	SerializePlacement(s);
	files.SerializeSettings(s);
	s % dir;
	s % splitter;
}
Previous Topic: ptr
Next Topic: File/Folder deleting, Recycle Bin and Read only files
Goto Forum:
  


Current Time: Mon Apr 29 14:16:39 CEST 2024

Total time taken to generate the page: 0.03118 seconds