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++ Library : Other (not classified elsewhere) » Unstable 64bit builds
Unstable 64bit builds [message #36867] Sat, 14 July 2012 23:57 Go to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi,

Recent versions of UPP (5110 through 5180 - maybe earlier) are highly unstable in 64bit builds. Popping up a dialogue can repeatably crash applications. This affects both my applications and of course it is not debuggable as x64 debug works fine.

However, I have an example for you. Try compiling the example UWord in MSC10 32 bit and 64 bit and you'll see that the 32 bit version runs fine and the 64 bit version crashes immediately.

I need to revert back to a much earlier version till this is fixed but hopefully it is easy to repeat.

Cheers,

Nick





[Updated on: Sun, 15 July 2012 00:00]

Report message to a moderator

Re: Unstable 64bit builds [message #36870 is a reply to message #36867] Sun, 15 July 2012 20:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
For some reason, I have troubles installing msc10, so I have tried with msc9 which I have installed for some time... seems to work fine, no crashes.

Does the problem still exist? (It is not impossible that it was fixed by chance since 5180)

Mirek

Re: Unstable 64bit builds [message #36876 is a reply to message #36870] Sun, 15 July 2012 22:12 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
I can't build MSC9x64 but I can build MSC9, MSC10 and MSC10x64. This only happens for me with MSC10x64.

The same behaviour is seen with upp5185. I tried debugging the release build with full debug info and get the same crash but also an error which I am emailing to you.

I think it has something to do with TopWindow as it seems to come up for me with about boxes or Prompt dialogs.

Will do a little more research on which other examples crash like this.

Nick

EDIT: also happens with the example Puzzle when you pop up the about dialog and float the mouse over it. Some pointer appears to be getting set to NULL.

Doesn't happen with Optimal builds so that might be my work around for now.

[Updated on: Sun, 15 July 2012 22:35]

Report message to a moderator

Re: Unstable 64bit builds [message #36877 is a reply to message #36876] Mon, 16 July 2012 05:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
nixnixnix wrote on Sun, 15 July 2012 16:12

I can't build MSC9x64 but I can build MSC9, MSC10 and MSC10x64. This only happens for me with MSC10x64.

The same behaviour is seen with upp5185. I tried debugging the release build with full debug info and get the same crash but also an error which I am emailing to you.

I think it has something to do with TopWindow as it seems to come up for me with about boxes or Prompt dialogs.

Will do a little more research on which other examples crash like this.

Nick

EDIT: also happens with the example Puzzle when you pop up the about dialog and float the mouse over it. Some pointer appears to be getting set to NULL.

Doesn't happen with Optimal builds so that might be my work around for now.



Do you get those crashes only while debugging (F5), or also when running without debugger (Ctrl+F5)?

Mirek
Re: Unstable 64bit builds [message #36878 is a reply to message #36877] Mon, 16 July 2012 07:15 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Mirek,

I get them running in release mode with or without debugging information on and with (F5) or without (Ctrl+F5) debugging.

If the crashes didn't happen when trying to run as a straight release executable then it wouldn't be a problem. I was debugging only to try to find more information.

If you can't reproduce this, perhaps it would be useful for us to have a gotomeeting where you can see the behaviour on my machine. Let me know if you think this could help and we can setup a time by email.

Nick





Re: Unstable 64bit builds [message #36879 is a reply to message #36878] Mon, 16 July 2012 11:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
nixnixnix wrote on Mon, 16 July 2012 01:15


If you can't reproduce this, perhaps it would be useful for us to have a gotomeeting where you can see the behaviour on my machine. Let me know if you think this could help and we can setup a time by email.



That definitely would speed up things, I am all in (I just need to know what exactly this gotomeeting is, but I can imagine it is some sort of desktop sharing, right?).

Mirek

[Updated on: Mon, 16 July 2012 11:53]

Report message to a moderator

Re: Unstable 64bit builds [message #36897 is a reply to message #36879] Wed, 18 July 2012 14:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
After 5 hours of hunting, I have identified the cause:

A compiler bug:

http://connect.microsoft.com/VisualStudio/feedback/details/5 73262/incorrect-alignment-with-x64-optimizer-and-movaps

Basically means that MSC 10 64-bit does not work with /O2 Smile

In our case, the problem was exposed when I have added member variable to RichPara::Format:

http://www.ultimatepp.org/redmine/projects/upp/repository/di ff?rev=5059&rev_to=5058

which misalidned styleid member, causing this kind of bug in RichText (because "smart" compiler was using xmm0 and movaps to pass Uuid around).

Mirek
Re: Unstable 64bit builds [message #36898 is a reply to message #36897] Wed, 18 July 2012 14:36 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
P.S.: I have fixed the bug by changing alignement of that variable, however I think that this problem can pop everywhere. Means the only solution is to fix the compiler.
Re: Unstable 64bit builds [message #36916 is a reply to message #36898] Fri, 20 July 2012 18:43 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks Mirek,

I still get the crash with version 5202 but I saw the bug post for the MSC10x64 compiler. Apparently there is a patch available through MS support.

When you say that O2 is effectively not available, that means the FORCE_SPEED build right? It doesn't affect the "optimal" build?

Does anyone know how to get hold of the MSC9x64 compiler? I have installed both VC++ 2008 and VC++2010 but I can't find this compiler.

Cheers,

Nick
Re: Unstable 64bit builds [message #36917 is a reply to message #36916] Sat, 21 July 2012 08:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
nixnixnix wrote on Fri, 20 July 2012 12:43

Thanks Mirek,

I still get the crash with version 5202 but I saw the bug post for the MSC10x64 compiler. Apparently there is a patch available through MS support.



Have you tested it?

Quote:


When you say that O2 is effectively not available, that means the FORCE_SPEED build right? It doesn't affect the "optimal" build?



Well, it just means that - you should not be using /O2 flag with MSC10.

Default configuration of theide assigns /O2 to "speed optimization".

Now optimal mode is using "speed optimization" for some critical files (those marked as "Optimize for speed" either at file or package level), compiling rest with "size optimization". Speed mode compiles all in "speed optimization".

That basically means that you should not use "Optimal" eiter - or you should edit Build method and change "/O2" to "/O1" in "Optimize for speed".

(General note: You are not meant to be using "Speed" for releases; the idea is that usually only 5% of code has any impact on the speed, so you should explicitly mark this code with flag and use Optimal mode. Speed is there only to test that you have marked the right files. In fact, it is in theory even possible that optimal mode can be slightly faster, because of less code to go into the cache...)

Quote:


Does anyone know how to get hold of the MSC9x64 compiler? I have installed both VC++ 2008 and VC++2010 but I can't find this



AFAIK it is one coming with 2008 or Windows Vista SDK. MSC (command line compiler) has its own version, it is only accidental that for 2010 it was 10...

Mirek
Re: Unstable 64bit builds [message #36944 is a reply to message #36917] Wed, 25 July 2012 18:48 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
So the answer for now is to just use FORCE_SIZE?

At some point I will try to get hte patch from MS and will let you know if it works.

Thanks,

Nick
Re: Unstable 64bit builds [message #36945 is a reply to message #36944] Wed, 25 July 2012 19:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
The correct anwswer IMO is to change build method to use /O1 in both cases.

Mirek
Re: Unstable 64bit builds [message #36946 is a reply to message #36945] Wed, 25 July 2012 20:04 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
I am not familiar with changing these settings. I am assuming that /O2 is the -O2 in Setup->Build Methods

The per package settings are in Project->Package Organizer as a checkbox at the bottom right? If I don't have any of those checkboxes checked then that would mean the "Optimal" would use -O1 correct?

Is -O1 the same as optimise for size?

Cheers,

Nick



[Updated on: Wed, 25 July 2012 20:06]

Report message to a moderator

Re: Unstable 64bit builds [message #36947 is a reply to message #36946] Wed, 25 July 2012 20:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12020
Registered: November 2005
Ultimate Member
nixnixnix wrote on Wed, 25 July 2012 14:04



The per package settings are in Project->Package Organizer as a checkbox at the bottom right? If I don't have any of those checkboxes checked then that would mean the "Optimal" would use -O1 correct?



U++ has some packages/files set for speed - those have small "F" in the icon.

Quote:


Is -O1 the same as optimise for size?



Yes.
Re: Unstable 64bit builds [message #37069 is a reply to message #36947] Wed, 15 August 2012 07:55 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hey Mirek,

Just found this as I was having trouble installing the MSC10x64 compiler. I am wondering if this is the fabled patch

<a href=" http://connect.microsoft.com/VisualStudio/feedback/details/6 83852/fail-to-install-windows-sdk-to-add-x64-cross-compiler- to-visual-c-2010-express-running-on-x86-pc-based">here</a>

and

<a href=" http://www.microsoft.com/en-us/download/details.aspx?id=4422">here<a/>

Will experiment and report back but wanted a record of it on here in case I forget where I found it Smile

N

EDIT - no that doesn't fix it but this might be useful to anyone having trouble getting the 64 bit compilers so I'll leave it here.

[Updated on: Wed, 15 August 2012 08:01]

Report message to a moderator

Previous Topic: HexView and Unix
Next Topic: DropList events
Goto Forum:
  


Current Time: Wed Sep 18 23:50:45 CEST 2019

Total time taken to generate the page: 0.00941 seconds