Author Topic: Crash with too many Programm Arguments  (Read 5698 times)

Offline Brillus

  • Single posting newcomer
  • *
  • Posts: 2
Crash with too many Programm Arguments
« on: September 23, 2011, 10:20:51 am »
Hallo,

1: as it seems is the bugtracker currently offline(I always get unable to connect), so I post this Bugreport without checking if it is already reported.

2: I use Code::Blocks at work and so I have only the Version which is provided there(10.05, Build Feb 8 2011 11:10:26 - wx2.8.11 (Linux unicode) 64 Bit)  and not the newest. I am runnning Fedora 13.

Bugreport:

Short: Code::Blocks crashes if you set too many Programm arguments and try to run your program. (It simply closes without any message).
(At least for Console Applications, have only tried it with them)

Long Version:
Step 1: Create a new Console Project. (which will give you a "Hello World Programm")
Step 2: Use Menu point Project -> Set Programm's argument ...
Step 3: Add following in the Programm Argument text Box:
Code
DP
-f
1
ADD
-f
2
SUB
-f
3
MUL
-f
4
DIV
-f
5
Round to Zero
-f
6
Round up
-f
7
Round down
-f
8
Round nearest
-u
UCDB/fpu_uc_add_roundDown1.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest1.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp1.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero1.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown1.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest1.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp1.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero1.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown1.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest1.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp1.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero1.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown1.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest1.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp1.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero1.ucdb
2
5
-u
UCDB/fpu_uc_add_roundDown2.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest2.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp2.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero2.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown2.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest2.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp2.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero2.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown2.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest2.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp2.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero2.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown2.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest2.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp2.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero2.ucdb
2
5
-u
UCDB/fpu_uc_add_roundDown3.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest3.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp3.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero3.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown3.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest3.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp3.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero3.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown3.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest3.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp3.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero3.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown3.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest3.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp3.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero3.ucdb
2
5
-u
UCDB/fpu_uc_add_roundDown4.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest4.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp4.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero4.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown4.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest4.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp4.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero4.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown4.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest4.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp4.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero4.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown4.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest4.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp4.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero4.ucdb
2
5
-u
UCDB/fpu_uc_add_roundDown5.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest5.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp5.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero5.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown5.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest5.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp5.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero5.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown5.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest5.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp5.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero5.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown5.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest5.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp5.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero5.ucdb
2
5
-u
UCDB/fpu_uc_add_roundDown6.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest6.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp6.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero6.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown6.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest6.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp6.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero6.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown6.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest6.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp6.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero6.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown6.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest6.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp6.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero6.ucdb
2
5
-u
UCDB/fpu_uc_add_roundDown7.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest7.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp7.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero7.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown7.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest7.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp7.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero7.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown7.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest7.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp7.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero7.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown7.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest7.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp7.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero7.ucdb
2
5
-u
UCDB/fpu_uc_add_roundDown8.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest8.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp8.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero8.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown8.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest8.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp8.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero8.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown8.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest8.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp8.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero8.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown8.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest8.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp8.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero8.ucdb
2
5
-u
UCDB/fpu_uc_add_roundDown9.ucdb
1
7
-u
UCDB/fpu_uc_add_roundNearest9.ucdb
1
8
-u
UCDB/fpu_uc_add_roundtoUp9.ucdb
1
6
-u
UCDB/fpu_uc_add_roundtoZero9.ucdb
1
5
-u
UCDB/fpu_uc_div_roundDown9.ucdb
4
7
-u
UCDB/fpu_uc_div_roundNearest9.ucdb
4
8
-u
UCDB/fpu_uc_div_roundtoUp9.ucdb
4
6
-u
UCDB/fpu_uc_div_roundtoZero9.ucdb
4
5
-u
UCDB/fpu_uc_mul_roundDown9.ucdb
3
7
-u
UCDB/fpu_uc_mul_roundNearest9.ucdb
3
8
-u
UCDB/fpu_uc_mul_roundtoUp9.ucdb
3
6
-u
UCDB/fpu_uc_mul_roundtoZero9.ucdb
3
5
-u
UCDB/fpu_uc_sub_roundDown9.ucdb
2
7
-u
UCDB/fpu_uc_sub_roundNearest9.ucdb
2
8
-u
UCDB/fpu_uc_sub_roundtoUp9.ucdb
2
6
-u
UCDB/fpu_uc_sub_roundtoZero9.ucdb
2
5

Step 4: click OK

Step 5: click on the Run Symbol -> Code::Blocks crashes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Crash with too many Programm Arguments
« Reply #1 on: September 23, 2011, 10:26:14 am »
Why are you adding such long programming arguments?
Why not save those text in a file, and just take the file's name as one argument?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Crash with too many Programm Arguments
« Reply #2 on: September 23, 2011, 10:35:56 am »
Are you aware, that almost any OS has a limited program line length ?

Offline Brillus

  • Single posting newcomer
  • *
  • Posts: 2
Re: Crash with too many Programm Arguments
« Reply #3 on: September 23, 2011, 10:57:14 am »
Are you aware, that almost any OS has a limited program line length ?

Which OS do you mean? I can ensure you neither Windows nor Linux have Problem which such Argument lines(and even far longer are no Problem). And in the console it runs perfectly.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Crash with too many Programm Arguments
« Reply #4 on: September 23, 2011, 11:04:58 am »
Windows is limited to 32k characters or something like that.
Most linuxes has similar limit.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Crash with too many Programm Arguments
« Reply #5 on: September 23, 2011, 01:24:38 pm »
Windows is limited to 32k characters or something like that.
Most linuxes has similar limit.

And wxExecute, whis is used to start a program, has a limit too, if I remember correctly.