Browsing this Thread:
1 Anonymous Users
Run an app: shell vs wanderer |
||
|---|---|---|
Joined:
2009/5/15 13:18 From Naples, Italy
Group:
Member Posts:
326
![]() |
I ask this here because i'm having strange behaviour (it's not the first time) i write something.
Is it normal that a program crashes if run from the shell and works fine if run from wanderer? Thx!
Posted on: 12/30 13:56
|
|
|
_________________
Somethin'nothin'o'u have: a working MPS1550 (Commodore Dot Matrix Color Printer) :p:p:p & 1 "amiga computer of the year 1986" sticker with an original 1987 coffee stain upon it!!! |
||
Transfer
|
||
Re: Run an app: shell vs wanderer |
||
|---|---|---|
Joined:
2008/1/7 12:41 From Poland
Group:
Member Posts:
2098
![]() |
First difference is that in both methods stack assigned to the program is different. When running from Wanderer stack is set on icon, when running from shell, stack is taken from environment configuration.
Posted on: 12/30 13:59
|
|
|
_________________
Krzysztof "There is no such thing as software for free. If it is not the user who covers the cost of software creation with money, it is the developer who covers this cost with his own free time." www.aros3d.org www.twitter.com/ddeadwood |
||
Transfer
|
||
Re: Run an app: shell vs wanderer |
||
|---|---|---|
Joined:
2009/5/15 13:18 From Naples, Italy
Group:
Member Posts:
326
![]() |
thx! i'll start from this!
Posted on: 12/30 14:23
|
|
|
_________________
Somethin'nothin'o'u have: a working MPS1550 (Commodore Dot Matrix Color Printer) :p:p:p & 1 "amiga computer of the year 1986" sticker with an original 1987 coffee stain upon it!!! |
||
Transfer
|
||
Re: Run an app: shell vs wanderer |
||
|---|---|---|
|
Joined:
2012/1/16 5:57 Group:
Member Posts:
199
![]() |
Quote:
I've checked if there's a difference in stack availability when starting from icon or from CLI (on a recent nightly build). In both cases it is 40960 bytes. In Icaros the stack available is 1024000 bytes. Weird thing, I've tried changing the default stack either using the STACK command in the ToolTypes tab of my application's icon or from CLI, but in both cases it seems it has no effect; what am I doing wrong? The check is done executing FindTask() as specified here: http://en.wikibooks.org/wiki/Aros/Dev ... r/Docs/Examples/StackSwap The avail flush command crashes the nightly build. thanks
Posted on: 12/30 18:07
|
|
Transfer
|
||
Re: Run an app: shell vs wanderer |
||
|---|---|---|
Joined:
2008/1/7 12:41 From Poland
Group:
Member Posts:
2098
![]() |
I'm not sure if STACK tooltype is handled. Using Info on icon, on first tab you will have separate field for stack.
Try running your application and then invoke tasklist from shell. This command also shows stack allocated to each process/task.
Posted on: 12/31 0:08
|
|
|
_________________
Krzysztof "There is no such thing as software for free. If it is not the user who covers the cost of software creation with money, it is the developer who covers this cost with his own free time." www.aros3d.org www.twitter.com/ddeadwood |
||
Transfer
|
||
Re: Run an app: shell vs wanderer |
||
|---|---|---|
Joined:
2008/1/7 12:41 From Poland
Group:
Member Posts:
2098
![]() |
If I do the following:
Create shell > Stack 512000 > TaskList Than in output I see TaskList process with 512000 stack.
Posted on: 12/31 0:10
|
|
|
_________________
Krzysztof "There is no such thing as software for free. If it is not the user who covers the cost of software creation with money, it is the developer who covers this cost with his own free time." www.aros3d.org www.twitter.com/ddeadwood |
||
Transfer
|
||
Re: Run an app: shell vs wanderer |
||
|---|---|---|
|
Joined:
2011/9/25 1:23 From Hungary
Group:
Member Posts:
875
![]() |
If you want a consistent stack size in shell and wanderer, without messing with the stack command or the icon, you can use my header. Just define a global variable named __stack (a'la LibNIX), and include the header. If the stack size is smaller then the one you defined it'll allocate memory for it. A couple of shell commands which need large stack do this.
Posted on: 12/31 3:57
|
|
Transfer
|
||
Re: Run an app: shell vs wanderer |
||
|---|---|---|
|
Joined:
2012/1/16 5:57 Group:
Member Posts:
199
![]() |
@deadwood: you're right, the right way to set the stack size is from that specific field in the icon. Too obvious to even notice that
![]() Also, I've noticed that stack size increments are automatically rounded in steps of four bytes (e.g. 40960, 40964, 40968, ...); I feel that it makes sense, but I don't quite understand why. Is it because if I could allocate 40961 instead of 40960 the remaining 3 bytes would be useless? Thanks for clarifying this. @BSzili: thanks, that'll come in handy. I've also stumbled upon your posts in the other thread about temporary stack allocation, your suggestions helped me too!
Posted on: 1/1 9:49
|
|
Transfer
|
||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.


Transfer
incstack.h






