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 » Developing U++ » Bugs (& fixes) » Crash on Cout with MSC15
Re: Crash on Cout with MSC15 [message #46733 is a reply to message #46732] Thu, 21 July 2016 08:25 Go to previous message
NilaT is currently offline  NilaT
Messages: 70
Registered: November 2011
Location: Austria
Member
Could somebody please confirm the following?
New Console App in latest upp with latest sources, MSC15 on Win 10.
Compile and run in optimal with MT flag!
Code:
#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	CoutUTF8(); // Without this line, works perfect. With this line = crash (same error as with 2014 upp sources)
	Cout() << "\n-----------------------------------\n";
	ReadStdIn();
}


And explain me where and why?
Thanks.

--------------

//edit: Because we work with 2014 sources in our project, please forget that 2015 example.
I tried to apply the changes in CoutStream from 2015 to 2014 sources, because I thought a wrong Charset causes the error.
Afterwards I edited the Stream::Put method:
void Stream::Put(const char *s)
{
	while (*s)
	{
		Put(*s);
		*s++;
	}
}


In debug, Put calls void Put(int c) in Stream.h:
void      Put(int c)             
{ 
  if(ptr < wrlim) 
    *ptr++ = c; 
  else 
    _Put(c); 
}

and then calls _Put, which, in endeffect calls the "new" Put0 which converts the charset.

BUT, in optimal, the error raises in Stream::Put -> Put call.
I debug in Visual Studio, put a Breakpoint on the Put(*s); call and press F11, but I can't jump into the function...

What the heck...

// edit:
I tried to compile our project with 2015 sources, same result.
Debug runs fine, optimal crashes.

I attach a pick of our project, compiled with 2014 sources and MSC15 in optimal.
  • Attachment: crash.png
    (Size: 166.61KB, Downloaded 163 times)

[Updated on: Thu, 21 July 2016 13:04]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dont work Debug F5
Next Topic: Since Raspberry have not RTC clock, I propose add SetTime functionality
Goto Forum:
  


Current Time: Mon Mar 01 14:56:05 CET 2021

Total time taken to generate the page: 0.01139 seconds