Author Topic: CRASH CB with a 'script plugin'  (Read 5741 times)

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
CRASH CB with a 'script plugin'
« on: January 26, 2012, 10:17:42 am »
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());
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 !!!
///-----------------------------------------------------------------------------

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 ...
« Last Edit: January 26, 2012, 11:26:40 am by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: CRASH CB with a 'script plugin'
« Reply #1 on: January 27, 2012, 09:25:12 am »
One to help me ?
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CRASH CB with a 'script plugin'
« Reply #2 on: January 27, 2012, 11:43:03 am »
One to help me ?
Did you try to run a debug build to see where this crash occurs?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: CRASH CB with a 'script plugin'
« Reply #3 on: January 27, 2012, 12:19:21 pm »
Quote
Did you try to run a debug build to see where this crash occurs?
thank you.
I do not know how, but I'll get ...
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl