Changes between Version 7 and Version 8 of FAQ/General Questions


Ignore:
Timestamp:
Dec 27, 2016, 8:51:10 PM (3 years ago)
Author:
Thore Böckelmann
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • FAQ/General Questions

    v7 v8  
    88However, for image buttons there exists a special feature which removes the frame chosen by MUI if the image comes with its own frame within the imagery and the file has a special name. For example if an image file is named "ArrowUp_framed.mim" instead of "ArrowUp.mim" MUI will set not set the standard image button frame for the created object as this would result in a double frame (one by MUI and the second by the image itself) which definitely is not intended and would look bad. In this case MUI will trust the imagery to provide a proper frame and will not draw the frame defined for image buttons.
    99
    10 == How much stack memory is required for MUI? ==
     10== How much stack memory is required for MUI based applications? ==
    1111MUI applications require a certain amount of stack memory during creation of the GUI due to the typical deeply nested code. The default stack size of 8K (8192 bytes) is usually not enough. A too low stack size will cause unpredictable crashes of either the MUI application or random other applications due to a stack overflow and hence trashed memory.
    1212
    1313Since AmigaOS has no concept of automatic stack enlargement the only solution is to provide enough stack memory from the beginning. Its size can be defined either in the application's Workbench icon or, if the application is started from a shell or a script, by setting a sufficiently large stack by running C:Stack with an appropriate size.
    1414
    15 MUI for AmigaOS has a built-in check whether the stack size of an application is large enough. If the stack size is found to be too small a warning requester will be displayed to inform the user about this nuisance. The current minimum stack size requirement is at least 32K (32768 bytes) to avoid the stack overflows mentioned above. Please note that this size is '''NO''' guarantee. It is just a compromise between safety and excessive memory usage. There may be applications with a complex GUI which requires more stack memory.
     15MUI for AmigaOS has a built-in check whether the stack size of an application is large enough. If the stack size is found to be too small a warning requester will be displayed to inform the user about this nuisance. The current minimum stack size requirement is at least 32K (32768 bytes) to avoid the stack overflows mentioned above. Please note that this size is '''NO''' guarantee. It is just a compromise between safety and excessive memory usage. There may be applications with a complex GUI which requires more stack memory. MUI cannot know the required amount of stack memory as the application defines the complexity of the GUI. Further the warning requester might be opened too late and the possible harm was done already, because usually the Application object is created '''after''' the GUI, but only the Application class can do all the necessary checks and build an appropriate warning requester with all necessary informations.
    1616
    1717Unfortunately there exist some applications which launch a subprocess which then creates the MUI application and the GUI. Most of the time this subprocess' stack size is fixed and too low and cannot be adjusted by the user. In this situation the only way to increase the stack size to avoid the warning requester and possible crashes is a patch like [http://aminet.net/package/util/boot/StackAttack StackAttack], [http://aminet.net/package/util/boot/StackAttack2 StackAttack2] or [http://aminet.net/package/util/boot/MinStack MinStack]. Such patches will apply to '''all''' applications, not just MUI applications.