[Bug 39011] New: Sierra Chart hangs when drawing polygon fill line type: gdi32.Polygon()

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Aug 1 13:54:58 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=39011

            Bug ID: 39011
           Summary: Sierra Chart hangs when drawing polygon fill line
                    type: gdi32.Polygon()
           Product: Wine
           Version: 1.7.48
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdi32
          Assignee: wine-bugs at winehq.org
          Reporter: spam at brettcave.net
      Distribution: ---

Created attachment 51965
  --> https://bugs.winehq.org/attachment.cgi?id=51965
v1.7.44 WINEDEBUG log segment with THREAD_DETACH errors

Sierra Chart is a stock market, forex, and other market price graphing program.
They use C/C++ and avoid java and .net. Normally it runs well under wine, but
there is a long term issue that they've known about: Drawing chart lines with a
polygon fill (Fill Top, Fill Bottom in the program) will hang wine for a minute
or 2 but works fine under regular windows. This hanging will release and then
hang again shortly after making the chart unusable.

I'm using ubuntu 14.04 LTS with wine 1.7.44 from the ppa archive.

I've also compiled 1.7.48 32bit using the lxc instructions. I was able to get
the X11 socket running inside lxc after some work. Sierra Chart runs at full
speed with it.

My hardware for testing is a laptop, dual core 2.2ghz AMD K10e, Mobile Radeon
HD 4250 using generic linux drivers, and 8g RAM. Sierra Chart isn't known to
directly bang video hardware, so chip and driver shouldn't be an issue. This
laptop can play 1080i mpeg2 off my DVR faster than normal, so it is capable
enough to handle a chart.

Both were tested with cleanly created wine prefixes. Sierra Chart is 32bit
compiled and normally works fine with wine.

I've been able to reproduce the bug by using the polygon fill line type and by
scrolling the chart back and forth. If I change the line type to something
plain, the freezing problem doesn't happen.

The bug is harder to reproduce with debugging activated. It's probably allowing
extra time for whatever is causing the hang to finish before it hangs.

*** file: wine_SC_THREAD_DETACH.wine1.7.44.log.txt

I've attached a small log file segment from ubuntu version 1.7.44:
WINEDEBUG=+timestamp,+relay,+seh,+tid,+message,+msgbox,+dll,+loaddll

It starts out with the gdi32 draw commands, has the freezing section in the
middle, and then continues with the gdi32 draw commands.

The problem is from time stamp 1306647.286 to 1306718.051. It's about 71
seconds total.

There are a bunch of THREAD_DETACH entries in the log. Sierra Chart support
says that graph drawing is not multi threaded and that they don't know what
that is. The only other threads are when downloading real time price data
updates and loading chart price data from disk.

Note: the next 1.7.48 versions were run from inside the 32bit lxc build
environment.

One thing I noticed when testing with 1.7.48 is that my memory usage bar applet
was jumping around a lot during a freeze. I didn't get exact figures but the
range was over 3g. That's huge for a 32bit program. I wasn't watching for the
first log.

*** file: wine_SC_ConsoleLog_wine1.7.48.log.txt

This is the regular shell console log.

*** file: wine_SC_wine1.7.48.log.txt

I've attached a second small log file segment from compiled version 1.7.48:
WINEDEBUG=+timestamp,+relay,+seh,+tid,+message,+msgbox,+dll,+loaddll

It starts out with the gdi32 draw commands, has a very small freezing section
in the middle, and then continues with the regular gdi32 draw commands.

The problem is from time stamp 1485052.556 to 1485124.153. It's about 71
seconds total.

In this log I didn't see the THREAD_DETACH entries. It was small and clean with
no errors reported. I don't know what to make of the difference between the 2
logs.

I can see that there's a problem, but I don't have enough programming and
debugging skills to understand what is going on.

If this looks like a programming error in Sierra Chart, please give me
something I can tell them that they won't brush off.

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

Download Instructions.

Download page:
http://www.sierrachart.com/index.php?page=doc/SCInstallerList.php

The page will list multiple versions ranging from current to past.

The file to get is: SierraChartSetupNoCLR.exe

The file date in the list: 2015/7/31

The "NoCLR" (No Common Language Runtime) doesn't use poorly supported windows
functions and is wine friendly. This is the version Sierra Chart support
normally recommends.

sha1sum:
4454a0ef2e3a2bb525098ea5620f8d4bb23edb2a  SierraChartSetupNoCLR.exe

In a week or so, this current version will "probably" be named:
1280SierraChartSetupNoCLR.exe

Help / About shows version number 1280.

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

Account Setup Instructions.

Sierra Chart has a free demo account for testing. Their install is almost
entirely self contained to a directory and won't scatter files everywhere.

Instructions are here:
http://www.sierrachart.com/index.php?page=doc/setup.php

Step 1: Download program. Since Sierra Chart support isn't going to do anything
with this bug, the current version will very likely have it since this is an
old bug of unknown age. If not using this link, use the download link above.

Step 2: "Create Your Account" to get a free demo account. I recommend something
alone the lines of "Wine Debug". They will know what that is. A support ticket
will need to be opened to activate the account. They're very easy going with
programmers. Just mention that you're someone from the wine debug team. If
y'all want more than the 15 day trial, request it there. They will usually
activate the account the same day.

Support Link:
http://www.sierrachart.com/index.php?page=doc/support.html#SCAccounts
This is Section #2, instructions in the yellow box with the link.

In the future if the trial account expires, open another support ticket,
mention that you're with the wine debug team and need to run some more tests.
They'll usually reactivate the account the same day.

So long as you're actively programming or debugging and not using their product
to trade for free, Sierra Chart support is very laid back about continuing
accounts.

Ignore the rest of the Sierra Chart account steps web page and follow my steps
below to reproduce the bug once the demo account is activated.

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

Steps to reproduce the bug.

#create a new prefix
WINEPREFIX=/home/user1/.wine3 winecfg

Applications / Windows Version: Windows 7
#earlier tests have shown different windows versions don't matter.

No library overrides.

Turned off Graphics: Allow the window manager to decorate the windows.

Sierra Chart has alert sounds, but they are irrelevant for the bug
reproduction.

"OK" to exit out of winecfg.

#install Sierra Chart
WINEPREFIX=/home/user1/.wine3 wine SierraChartSetupNoCLR.exe

Accept defaults options and locations in the installer. Run when finished.

Note: I recommend to run Sierra Chart in normal / non-debug mode the first time
as the freezing bug is easier to reproduce.

Enter user name and password.

When the main window comes up, press "No" at the Data and Trade Service prompt
to use demo mode defaults.

Hit "Close Log" on "Message Log" to get it out of the way.

Menu: File / Find Symbol

Expand "Forex".

I prefer to select "GBPUSD" as the symbol since it has good volume and is
easily recognized.

Hit the "Open Intraday Chart" button.

Hit the "Close" button to get rid of the find screen.

A full screen chart will open and download price data for a minute.

Click once in the middle of the chart to select it. Press the keyboard down
arrow 11 times. At the very bottom right corner will be a tiny green box with a
number in it. Every time the down arrow gets hit, it will decrement and the
chart will show more bars per screen. The bar should read "1". If it is red,
hit the "End" key on the keyboard. Color doesn't matter much for this
reproduction, though.

Note: If the hanging problem below gets to be too severe to do anything, only
press the down arrow several times to not compress the chart view as much.
Maybe go down to "5" instead of "1".

Quick side note before the hanging bug gets triggered: Menu: Help / About will
show the build number / version number for verification. The latest installer
file usually won't have a version number in the name.

Menu: Analysis / Studies

Hit "Add Custom Study" button at the bottom.

Double click to expand "User Contributed Studies".

Scroll down to "RSI Bands". Select it and hit "Add". It will show up on the
right panel list. This study won't cause the bug alone. It is used to put an
extra load on the graph.

Hit "Add Custom Study" button again.
Scroll down a little to "RSI w/Trend". Select it and hit "Add". It will show up
on the right panel list. This study has the polygon fill that will trigger the
freezing bug.

Note for Bug Settings:
Something to point out to come back to later... Select "RSI w/Trend" and hit
the "Settings" button. Hit the "Subgraphs" tab at the top. At the top middle
will be a "Draw Style" column. This is how the study line types are drawn on
the graph. The bug versions will have "Trans. Fill Top" for "Fast MA" and
"Trans. Fill Bottom" for "Medium MA". Selecting these two entries and changing
them with the "Draw Style" drop down box to "Line" then "Solid" and "1" will
allow them to not trigger the bug (but do that later). Changing the two entires
to "Fill Top" and "Fill Bottom" will still trigger the bug regardless of
transparency settings. For now, don't change the settings for the bug
reproduction, but come back to this afterwards. Hit "Cancel" to get out of the
settings screen.

Hit "OK" on the "Chart Studies" window to get back to the main chart. New lines
will be drawn on the screen from the two added studies.

The graph "should" come back immediately, but sometimes it will trigger the
hanging bug. Click on another virtual desktop and come back or click on a
window below Sierra Chart to bring it forwards and then go back to Sierra
Chart. If the screen doesn't redraw within a second or two, then the bug was
triggered. It will take a minute or two for Sierra Chart to come back. Note
that the CPU will be maxed out and RAM usage will be jumping around.

To save these settings so far, Menu: File / Save All. Enter a brief chart book
name for a file name at the bottom (like "test1"). Afterwards the chart book
can be quickly reloaded by that name in the recent files list on the right side
of the File menu. This will allow for skipping the "Menu: Analysis / Studies"
steps on next program reload. ...That is if the hanging bug isn't triggered
again... and again... and again...

In wine debug mode, the hanging bug "usually won't" be triggered yet.

To manually trigger the hanging bug, use the mouse to grab the horizontal
scroll bar at the bottom of the screen and drag it back and forth. This will
scroll the chart back and forth causing a lot of redraws.

If Sierra Chart stops responding, click on another virtual desktop and come
back or click on a window below Sierra Chart to bring it forwards and then go
back to Sierra Chart. If the screen doesn't redraw within a second or two, then
the bug was triggered. It will take a minute or two for Sierra Chart to come
back. Note that the CPU will be maxed out and RAM usage will be jumping around.

With the wine debug mode log it is hard to see where the bug was triggered. I
use the "+timestamp" option and a stop watch/timer app to note the hang and
resume times so they can be matched up later in the debug log. When dragging
the chart horizontal scroll bar, they will be surrounted by gdi32 draw
commands.

In future tests, the Sierra Chart process may have to be killed. To restart it,
I go into the drive_c/SierraChart folder and run SierraChart.exe. Sierra Chart
will remember your login name and password. When the authentication window pops
up, just leave it for a couple seconds and it will go away and the main chart
will pop up.

Now that the hanging bug has been experienced, the line type can be changed
from the Note instructions above to see the comparison with a plain line.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list