|
|
Home » Developing U++ » U++ Developers corner » MSC15 and 2014 sources - problem with Stream
MSC15 and 2014 sources - problem with Stream [message #46742] |
Fri, 22 July 2016 08:26 |
NilaT
Messages: 70 Registered: November 2011 Location: Austria
|
Member |
|
|
Hello,
I already started a thread on a wrong forum, please move or delete the Thread from there and put it in here.
http://www.ultimatepp.org/forums/index.php?t=msg&th=9720 &start=0&
My problem is, I'm using the latest Upp (9251) with 2014 sources and compile with MSC15.
But when I call Cout() in my prog, it crashes.
This only happens with MT flag and in optimal mode (debug runs fine)
The same error can be produced on the newest 2015 sources, when putting CoutUTF8() before the first Cout().
I'm running Win 10 Pro.
You can see the error in the other thread as well, but it's:
Exception at 0x00AB60C7 (address changes every time) in (Projectname).exe: 0xC0000005:
Access violation at read at position 0x0000004.
The error seems to occur in function void Stream::Put(const char *s).
See attachment.
Thanks for the quick reply, as I need this program really quick.
//edit:
Okay guys, I'm kind of confused now.
When I start the little test program from the other thread with 2015 sources, it works fine. In 2014 sources, it crashes.
BUT, when I start MY program in 2015 sources, it crashes as well as on 2014 sources.
Very confusing.
Any help would be very appreciated.......
-
Attachment: crash.png
(Size: 166.61KB, Downloaded 280 times)
[Updated on: Fri, 22 July 2016 09:45] Report message to a moderator
|
|
|
|
|
|
Re: MSC15 and 2014 sources - problem with Stream [message #46746 is a reply to message #46745] |
Fri, 22 July 2016 11:51 |
NilaT
Messages: 70 Registered: November 2011 Location: Austria
|
Member |
|
|
Not to compile but to debug, because VS has more capabilities in debugging release/optimal versions.
May I can call you and you can do a TV session?
Because I don't know what to do anymore.
Things are very strange... Because our project works fine with 2012 compiler and 2014 sources.
But won't work with 2014 sources and 2015 compiler.
And it won't work with 2015 sources and 2015 compiler either.
When I do a little testprog, it works with 2015 sources, but won't with 2014. Compiler is 2015.
I think it's better if you actually see what I do...
Sources = Uppsrc
Compiler = MSC15
//edit: I did get another error recently, but only once and I didn't made a screenshot, sorry. But the callstack said something like: Put > printf (is put really calling printf?!) > lambda ....
So, could it be some sort of C++11 issue?
[Updated on: Fri, 22 July 2016 13:39] Report message to a moderator
|
|
|
|
|
|
|
Re: MSC15 and 2014 sources - problem with Stream [message #46753 is a reply to message #46750] |
Tue, 26 July 2016 10:33 |
NilaT
Messages: 70 Registered: November 2011 Location: Austria
|
Member |
|
|
Well, it seems like there are more and more problems coming up with MSC15, this time with 2010 sources (in another project).
A simple Format("%s %d", "bla", 1); results in a crash in optimal mode, debug works fine though.
Exception: C0000005 at 150C170
EXCEPTION_ACCESS_VIOLATION
reading at 0000001C
Callstack is in the picture.
Thanks for help.
//edit: Same fix seems to work. I changed Single to:
template <class T>
T& Single() {
#ifndef flagMSC15
static T *p;
ONCELOCK {
static T o;
p = &o;
}
return *p;
#else
static T x;
return x;
#endif
}
-
Attachment: crash.png
(Size: 149.59KB, Downloaded 245 times)
[Updated on: Tue, 26 July 2016 11:33] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Wed May 15 04:01:18 CEST 2024
Total time taken to generate the page: 0.02417 seconds
|
|
|