Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

CRASH CB with a 'script plugin'

(1/1)

LETARTARE:
I am a bit distraught ..
Here is a script that 'CRASH CB' on my configuration, depending on the value of 'int max'
Have I made ​​a mistake or not ?


--- Code: ---///-----------------------------------------------------------------------------
/// test_console .script : LETARTARE 25-01-2012
///-----------------------------------------------------------------------------

function SetBuildOptions (base) {

}
///-----------------------------------------------------------------------------
function main() {

//local title = _("Capacity display ...");
//local max = wxGetNumberFromUser (_T("Enter number (0..100) ") , _("Choice : "), title, 92);
local max = 467 ;
local msg =::wxString();
local mes = _T("");
local txt = _T("\tThis is a capacity test to verify ....\n") ;

for (local u=0; u< max; u++) {
mes = _T("L ") + u.tostring() + txt ;
msg +=  _T("\t") + mes;
//::print(mes)
}
::print (msg);

::print (max.tostring());
::print (txt.len().tostring());
::print(msg.len().tostring());

--- End code ---
hese are the test results

--- Quote ---///-----------------------------------------------------------------------------
///  Vista Basic Pack 2,   Mingw32 with TDM-GCC 4.4/4.5 Series
///  C::B 10.05 release (wxWidgets unicode 2.8.11), r7550, r7600, r7639, r7678, 7711
///-----------------------------------------------------------------------------
///   text.len() == 40, this test is repetitive
///-----------------------------------------------------------------------------
///  with r7711
///  1-   max = 467 -> msg.len() == 21280 ==> ok
///  2-   max = 468 -> msg.len() == ????? ==> CRASH C::B !!!
///-----------------------------------------------------------------------------
///  with r7678
///  1-   max = 72 -> msg.len() == 3230 ==> ok
///  2-   max = 73 -> msg.len() == 3275 ==> CRASH C::B !!!
///-----------------------------------------------------------------------------
///  with r7639
///  1-   max = 63 -> msg.len() == 2825 ==> ok
///  2-   max = 64 -> msg.len() == 2870 ==> CRASH C::B !!!
///-----------------------------------------------------------------------------
///  with r7600
///  1-   max = 66 -> msg.len() == 2960 ==> ok
///  2-   max = 67 -> msg.len() == 3005 ==> CRASH C::B !!!
///-----------------------------------------------------------------------------
///  with r7550
///  1-   max = 66 -> msg.len() == 2920 ==> ok
///  2-   max = 67 -> msg.len() == 3005 ==> CRASH C::B !!!
///-----------------------------------------------------------------------------
///  with 10.05 idem r7550
///  1-   max = 66 -> msg.len() == 2920 ==> ok
///  2-   max = 67 -> msg.len() == 3005 ==> CRASH C::B !!!
///-----------------------------------------------------------------------------
--- End quote ---

Note that there is no *. RPT after the CRASH!

1 - Open the console script
2 - Load the script into the editor
3 - Adjust 'local max =??'
4 - Load this script in the console
5 - Run this script with the command 'main()'
6 - Wait and see ...

LETARTARE:
One to help me ?

MortenMacFly:

--- Quote from: LETARTARE on January 27, 2012, 09:25:12 am ---One to help me ?

--- End quote ---
Did you try to run a debug build to see where this crash occurs?

LETARTARE:

--- Quote ---Did you try to run a debug build to see where this crash occurs?
--- End quote ---
thank you.
I do not know how, but I'll get ...

Navigation

[0] Message Index

Go to full version