Markers on charts are not displayed
Added by Christophe Delépine over 1 year ago
Hello,
If you run the sinusoid chart in the widgetgallery example in release (works in debug), then the markers are not displayed.
See the snapshots attached.
I have tried both Wt3.1.3 and 3.1.4, same bug
The bug also appears in my application
Is that a known issue ?
I use Firefox 3.5.7
Regards
Christophe
chart_debug.jpg (34.1 KB)
chart_release.jpg (32.4 KB)
Replies
RE: Markers on charts are not displayed - Added by Christophe Delépine over 1 year ago
Hello Koen & Wim,
I have tried in 32-bit and the markers are correctly displayed in both debug and release builds.
So the problem only occurs in 64-bit (windows VS2005).
Could you please tell me if you can reproduce the problem ?
Best Regards
Christophe
RE: Markers on charts are not displayed - Added by Christophe Delépine over 1 year ago
Hi,
I have fetched today's git and the bug is still there : no markers in 64-bit release in the sinusoid chart demo
Best Regards
Christophe
RE: Markers on charts are not displayed - Added by Wim Dumon over 1 year ago
Christophe,
I can't reproduce this because I don't have such compiler. Could you give me some extra information about the bug? Is it only the sinusoid demo that fails? Is it because it is a sinusoid? Is it because of the use of 'double' in boost::any? Does it help if you replace the double by an int (and multiply the sin() result by e.g. 100)? Any other thoughts?
Best regards,
Wim.
RE: Markers on charts are not displayed - Added by Christophe Delépine over 1 year ago
Wim,
I will do some testing on monday. I can already tell you the problem is not specific to the sinusoid demo. I have the same bug in my application's chart which also use boost::any (with floats instead of doubles) and i don't use the sin() function.
Regards
Christophe
RE: Markers on charts are not displayed - Added by Christophe Delépine over 1 year ago
Hi,
I have done some testing and the results are very strange.
It works if i change the code of MarkerRenderIterator::newValue as follows :
virtual void newValue(const WDataSeries& series, double x, double y,
double stackY,
const WModelIndex& xIndex,
const WModelIndex& yIndex)
{
std::cout << x << "\n";
if (!Utils::isNaN(x) && !Utils::isNaN(y) && !marker_.isEmpty()) {
It also works if i change the code as follows :
virtual void newValue(const WDataSeries& series, double x, double y,
double stackY,
const WModelIndex& xIndex,
const WModelIndex& yIndex)
{
if (/*!Utils::isNaN(x) && !Utils::isNaN(y) && */ !marker_.isEmpty()) {
I cannot spend more time trying to debug. It would be nice if you could investigate when you have a Windows 64-bit machine.
My compiler is :
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727 SP2
Installed Edition: Professional
Microsoft Visual Basic 2005 77626-009-0000007-41387
Microsoft Visual Basic 2005
Microsoft Visual C# 2005 77626-009-0000007-41387
Microsoft Visual C# 2005
Microsoft Visual C++ 2005 77626-009-0000007-41387
Microsoft Visual C++ 2005
Microsoft Visual Web Developer 2005 77626-009-0000007-41387
Microsoft Visual Web Developer 2005
Microsoft Web Application Projects 2005 77626-009-0000007-41387
Microsoft Web Application Projects 2005
Version 8.0.50727.762
ClearCase Search 1.0
ClearCase search is a toolwindow implemented as a VSIP pkg. This pkg adds support for WAN views (web views) to the legacy "FindCheckouts"and "FindModified Files" functionality, as well as combines both the dialogs in one single toolwindow interface (akin to CCRC Eclipse version).
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)
This service pack is for Microsoft Visual Studio 2005 Professional Edition - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/926601
Rational ClearCase
Rational ClearCase
Copyright 2002 by Rational Software Corporation.
All Rights Reserved.
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB971090)
This Security Update is for Microsoft Visual Studio 2005 Professional Edition - ENU.
If you later install a more recent service pack, this Security Update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/971090
Xoreax IncrediBuild 3.51 (build 1106)
Xoreax IncrediBuild 3.51 (build 1106)
Qt4 Add-in 1.1.3
For more information about the Qt 4 Add-in, see
http://qt.nokia.com
Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies)
Regards
Christophe
RE: Markers on charts are not displayed - Added by Wim Dumon over 1 year ago
Christophe,
Thank you for pointing us in this direction. This looks like a weird bug in MSVC's optimizer? Does it work for you to modify Utils.h, around line 196 from:
inline bool isNaN(double d) {
return !(d == d);
}
to
inline bool isNaN(double d) {
return _isnan(d);
}
(you may need to include float.h)
If that works, I'll update Wt so that this bug goes away.
Regards,
Wim.
RE: Markers on charts are not displayed - Added by Christophe Delépine over 1 year ago
Great!
It works.
Thank you very much!
RE: Markers on charts are not displayed - Added by Wim Dumon over 1 year ago
The fix is on its way to public git and the next release.
Wim.