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 » ScatterDraw & ScatterCtrl » crash while using scatterctrl
crash while using scatterctrl [message #44409] Sat, 07 March 2015 13:20 Go to next message
aftershock is currently offline  aftershock
Messages: 143
Registered: May 2008
Experienced Member


Hi,

I have a problem, I do not seem to able to use scatterctrl.
I have a tabctrl. I have a layout which contains scatterctrl.


Layout is added to the tabctrl.
Vector<Pointf> data_equity,data_balance;
performance.chart.RemoveAllSeries();

for (int i=0; i< order_history.order_info.GetCount();i++)
{
data_equity << Pointf(i,order_history.order_info.Get(i,7));
data_balance << Pointf(i,order_history.order_info.Get(i,Cool);

}
performance.chart.AddSeries(data_balance).Legend("balance");
performance.chart.AddSeries(data_equity).Legend("equity").Units( "km/h").NoMark().Stroke(2, Gray()).Dash(LINE_SOLID).Fill(LtGray());;
/
if I add series , it crashes when I switch to the tab which contains the scatterctrl.


case WM_PAINT:
ASSERT_(!painting || IsPanicMode(), "WM_PAINT invoked for " + Name() + " while in Paint routine");
ASSERT(hwnd);
if(hwnd) {
PAINTSTRUCT ps;




It fails for M_PAINT invoked for " + Name() + " while in Paint routine");

I use the latest upp.

aftershock

Re: crash while using scatterctrl [message #44411 is a reply to message #44409] Sat, 07 March 2015 16:37 Go to previous messageGo to next message
aftershock is currently offline  aftershock
Messages: 143
Registered: May 2008
Experienced Member

Not a scatterctrl bug...
It was caused by using parameters as vector<> which was allocated on stack.
Re: crash while using scatterctrl [message #44421 is a reply to message #44411] Mon, 09 March 2015 10:29 Go to previous message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello aftershock

In addition, please remember that ScatterDraw does not keep any data, so data has to be kept safely.

For example, if data is declared in a function that fills the Scatter, and if you need the Scatter after leaving the function, you will get errors as Scatter will try to use data that has been freed.


Best regards
IƱaki

[Updated on: Mon, 09 March 2015 10:29]

Report message to a moderator

Previous Topic: zooming produces too many labels on x axis
Next Topic: New ZoomToFit() replaces FitToData()
Goto Forum:
  


Current Time: Thu Apr 18 18:44:39 CEST 2024

Total time taken to generate the page: 0.02260 seconds