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
Crash on Cout with MSC15 [message #46722] Wed, 20 July 2016 16:12 Go to previous message
NilaT is currently offline  NilaT
Messages: 70
Registered: November 2011
Location: Austria
Member
Hello,

// edit:
For those who don't want to read all the text below:
What changes have to be done to 2014 sources that MT flag will work with MSC15 like newest (2015) sources do???
Thanks Wink

-----

I formated my Laptop recently and decided to install the newest version of Upp and MS VS afterwards.
So I installed Upp 2015.2 (Version 9251) and MS Visual Studio Community 2015 (which is free to download).
I work on a Windows 10 Pro N Laptop.

So, after a few tweaks here and there, everything seems to work fine (despite the Win XP incompatibility, but thats okay)
BUT, I discovered one error which drives me nuts...

Cout() doesn't seem to work properly... printf is no problem though.
Sure I could change all Cout() calls to printf but that's not a solution.

The funny thing is, in debug everything works fine, only in optimal the program crashes immediately.
I tried to debug the optimal version in Visual Studio, the error seems to be in:
void Stream::Put(const char *s)
{
	while (*s) Put(*s++);
}


The error is always the same: (The error is german and I tried to translate it to english as good as I can)
Exception at 0x00AB60C7 (address changes every time) in (Projectname).exe: 0xC0000005:
Access violation at read at position 0x0000004.


But the funniest thing is, that this must be something depending on my includes (it's a rather big project)
Because, I made a new test application, only containing the following code:
#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	Cout() << "\n-----------------------------------\n";
	ReadStdIn();
}

and this just works fine, using the SAME sources as the big project.
The \n----... is also the first line in my other project.

Any suggestions?
Any help is very appreciated!

I also tried differend compiler flags (GS) and sources (2014, 2015), always the same result...
Everything works, except my "old" project.

//edit: I narrowed it down to the MT flag... Please just create a new multithreaded console project with the content I posted above and try it... It will crash. But why?

//edit2: Okay, only 2014 sources are affected. The newest sources work fine with MT... I'm on it. Please keep this thread if other people have the same issue

[Updated on: Wed, 20 July 2016 16:26]

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: Wed Apr 24 03:00:35 CEST 2024

Total time taken to generate the page: 0.03255 seconds