Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 00:50:17 +0000



[User Discussion] - Memory leak (?) when using Ichimoku indicators

View Count: 2129

[2013-05-03 13:39:45]
dkasak - Posts: 4
I'm running the latest (969) non-.NET version of SierraChart on Arch Linux with Wine 1.5.29. Until recently, I have had no problems with SierraChart. However, recently I've started using the Ichimoku indicators and now switching to a study collection containing the indicators, SierraCharts start leaking memory, often north of 3GB which prompts the OOM (out-of-memory) killer to kill the process. This doesn't happen every time I switch to the study collection and it seems to me the bug has certain "trigger points"; it only crashes if such a point is currently displayed on the chart (note: I'm not certain this is true, but this is how it seemed to me). Specifically, I think the Senkou Span A & B indicator is causing the problem since I did not encounter it a few days ago when I was only using the tenkan-sen and kijun-sen.

The study collection that triggers it:
BetterVolume (for colouring the price graph)
BetterVolume (histogram)
Current Price Line
Kijun-sen
Tenkan-sen
Chikou Span
Senkou Span A & B

I'm using a tick chart (specifically, 50-tick chart), but it happens on other charts too.

Please tell me what other information you need.

[2013-05-03 13:50:24]
Sierra Chart Engineering - Posts: 104368
It is not possible for any of the Sierra Chart studies to have memory leaks. That just cannot happen.

If you are using any custom studies, remove those. If you are using transparent Draw Styles, try not using transparent Draw Styles. Maybe transparency causes a memory leak within Wine.

Sierra Chart has no known memory leaks. In all of our experience since the beginning of Sierra Chart, memory leaks are rare problem and none exist at this time.

Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-05-03 14:04:56]
dkasak - Posts: 4
I'm not using transparent draw styles and I have now removed all studies except for Senkou Span A & B. This triggers the bug. Turning everything back on except Senkou Span A & B makes the bug go away. This study is definitely what triggers it. Also, I have now replicated the condition of "trigger points" I mentioned above; if I am zoomed in to the last couple of bars, everything is normal. Zooming out, step by step, triggers the bug every time when it reaches a specific point in time.

I will try investigating further including trying on different SC and Wine versions. Do you have any other advice?

Also, could you explain to me why it is not possible for studies to have leaks, in technical terms? Feel free to go full engineer on me, I'm a computer scientist. :D
Date Time Of Last Edit: 2013-05-03 14:05:19
[2013-05-03 14:17:42]
Sierra Chart Engineering - Posts: 104368
It is impossible for those particular studies to cause memory leaks because they do not allocate memory themselves.

There is a common method for the allocation of memory for the arrays used by the Subgraphs of graphs in the chart. And there has never been any known memory leaks with that. There simply is no chance of that.

When the graphs are drawn, there also is no allocation of memory.

The only studies which will allocate memory, but in a controlled and structured way would be studies like the Volume by Price study and the TPO Profile Chart study.

Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-05-03 14:28:23]
dkasak - Posts: 4
Thank you for the explanation, that seems reasonable and I agree with your assessment.

I had a hunch it might be related to the default draw style for the study (fill bottom/top) so I tried drawing the Senkous as lines and sure enough, the problem went away. It appears it gets triggered when the A and B lines are very close together, so since a fill top/bottom was used, perhaps it's some kind of a clipping/floating point precision bug that makes the Wine graphics library try to paint/allocate to infinity since it "overshoots" the top/bottom? You have more insight into how exactly are the fill top/bottom draw styles implemented so you'll know better if this is possible. If this is indeed a Wine bug/corner case due to the differences in how the graphics API calls are implemented, would it be feasible to implement a workaround for Wine?
[2013-05-04 12:56:07]
dkasak - Posts: 4
I would also appreciate information on what library you're using to draw graphs so that I can try replacing that library in Wine with the native version. i.e. do the calls boil down to GDI+ calls?
Date Time Of Last Edit: 2013-05-04 13:02:30
[2013-05-04 21:32:15]
Sierra Chart Engineering - Posts: 104368
Sierra Chart uses the Windows GDI.

Not GDI plus.

In the case of Fill Top and Fill Bottom Draw Styles, Sierra Chart uses the Polygon() Function.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-10-22 08:01:52
[2019-10-22 01:15:35]
User494044 - Posts: 2
@dkasak Were you ever able to resolve this issue? I also came to the same conclusion with the fill areas causing the crash in wine. I updated to the latest wine dvel version 4.17 to try to solve it. Still not working so now i just have the bare lines on the chart.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account