Exec Bug Report

This forum is for general developer support questions.
User avatar
rwo
Posts: 15
Joined: Thu Mar 10, 2011 11:03 am
Location: Denmark

Exec Bug Report

Post by rwo »

Okay .. I'm on a roll .. this very old Exec function crashes.. IExec->Alert();

exec.library 53.94 (03/03-2017) (A1222 version)

Code: Select all


#include <proto/exec.h>

int main( int argc UNUSED, char **argv UNUSED )
{
	IExec->Alert( 0 );

	return( 0 );
}

User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Exec Bug Report

Post by broadblues »

When you say it "crashes" what do you see?

What you *should* see is Grim Reaper displaying the Alert number you passed to IExec->Alert(). Ie 00000000 in the test case you wrote above.

Alerts() have been redirected to GRs for sometime now.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Exec Bug Report

Post by Hypex »

broadblues wrote:What you *should* see is Grim Reaper displaying the Alert number you passed to IExec->Alert(). Ie 00000000 in the test case you wrote above.
Generally this is true but to my understanding only the deadend type should evoke a Grim Reaper. A zero alert value should fall under the recover type and evoke a yellow alert. Last time I checked this was still the case. I'm not aware of any change in this behaviour. Though it would in fact be a welcome change as a yellow alert kills multitasking which in turn kills USB input devices.

Code: Select all

#define AT_DeadEnd	0x80000000
#define AT_Recovery	0x00000000
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Exec Bug Report

Post by broadblues »

No all crash alerts are redirected to the GR (from FE at least, possibly earlier) haven't seen a 'yellow alert' for quite a while.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Exec Bug Report

Post by Hypex »

I just tested an old Alert program I wrote and bug fixed last year. Running it now it keeps bringing up a GR which isn't right. The SDK says nothing about it but the function has certainly changed. This is on my X1000.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Exec Bug Report

Post by broadblues »

Running it now it keeps bringing up a GR which isn't right
This is how alerts are dealt with now, classic style yelow recevreable alrts kill the system, so are no longer appropriate, so yes it *is* "right".

There is no real reason to use an alert on Amiga OS4 anyway.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Exec Bug Report

Post by Hypex »

broadblues wrote:This is how alerts are dealt with now, classic style yelow recevreable alrts kill the system, so are no longer appropriate, so yes it *is* "right".

There is no real reason to use an alert on Amiga OS4 anyway.
It's not right for my program which uses the alert function to bring up an alert. ;-) The Grim Reaper makes it look like it's crashed. When it hasn't and the message from the program isn't displayed at all. It looks confusing now. I wrote it on my A1200 years ago so it's a 68K program. IIRC there were two functions in the system for user alerts.

In any case the yellow alerts never looked right on OS4. They overwrote the screen instead of pushing it down. Since screen dragging was supported I saw no reason for them not to push down the screen.
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Exec Bug Report

Post by trixie »

Hypex wrote: It's not right for my program which uses the alert function to bring up an alert. ;-)
Why not use a requester for that instead?
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
thomasrapp
Posts: 310
Joined: Sat Jun 18, 2011 11:22 pm

Re: Exec Bug Report

Post by thomasrapp »

trixie wrote:
Hypex wrote: It's not right for my program which uses the alert function to bring up an alert. ;-)
Why not use a requester for that instead?
Interesting suggestion because the documentation says that if the requester fails to open, it will revert to an alert. Now we have an infinite loop, don't we.

I wouldn't say something about IExec-Alert, because it is meant to show an error code. Displaying this in a GrimReaper is ok.

But the GR also opens for IIntuition->DisplayAlert and IIntuition->TimedDisplayAlert. I surely consider this a bug. These functions are meant to give some information to the user if everything else fails. But if a GR opens instead, the information is lost.

Besides that these functions are meant as a last resort if the system is almost dead. In such situation the GR cannot run any more, too.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Exec Bug Report

Post by Hypex »

trixie wrote:Why not use a requester for that instead?
Because my original program was intended to use alerts and the shock value they provide. I originally wrote it as a prank that acted as if a virus had entered the system. It used to do a tease and provide some options for left mouse and right mouse and indicate it was trying to kill a virus. But either way it just looked worse! Finally after three "levels" it stopped playing games and the virus was gone. :lol:

It could be translated to use requesters but the effect wouldn't be the same. And you'd need to press a gadget. Just not the same look and feel as a shocking warning on screen with the immediate action of left or right mouse. :)

I could emulate the effect but that is beyond the scope of the program.
Post Reply