I'm working on an old OS3 program that's ported to OS4 and uses Intuition DisplayAlert(). When testing the compiled program, I get a Grim Reaper instead of an alert. The example code in the WIKI DisplayAlert() documentation also brings up a Grim Reaper instead of an Intuition alert. Has the DisplayAlert() command been rerouted to a Grim Reaper or is there a bug in the DisplayAlert() command?
I plan to eventually replace the DisplayAlert() function calls with requesters but I spent a lot of time trying to debug the program when I got unexpected Grim Reapers. Eventually I suspected that the Grim Reapers might be due to a change in OS4 and not a bug in the program. Compiling & running the DisplayAlert() example in the WIKI convinced me that it's either an undocumented change in OS4 or an OS4 bug.
If this was an intentional change in DisplayAlert(), can someone please update the WIKI documentation so others don't waste time like I did? If it's a bug, could someone else confirm it and add it to the bugzilla?
Intuition DisplayAlert() issues
Intuition DisplayAlert() issues
AmigaOne X1000 with 2GB memory - OS4.1 FE
- colinw
- AmigaOS Core Developer
- Posts: 207
- Joined: Mon Aug 15, 2011 9:20 am
- Location: Brisbane, QLD. Australia.
Re: Intuition DisplayAlert() issues
From the Releasenotes of intuition...
intuition.library 53.51 (11.6.2014)
- TimedDisplayAlert() and DisplayAlert() now output only via DebugPrintF() and then call IExec->Alert().
intuition.library 53.51 (11.6.2014)
- TimedDisplayAlert() and DisplayAlert() now output only via DebugPrintF() and then call IExec->Alert().
- tonyw
- AmigaOS Core Developer
- Posts: 1479
- Joined: Wed Mar 09, 2011 1:36 pm
- Location: Sydney, Australia
Re: Intuition DisplayAlert() issues
Can you provide your code (that crashes) and a serial log showing the crash stack trace? You could send it to me if you don't want to make it public.
cheers
tony
tony
Re: Intuition DisplayAlert() issues
It's not really a crash. It's a recoverable alert posted by old code. Colin Wenzel already comfirmed that DisplayAlert() has been rerouted to serial output and IExec->Alert(). If you really want to see what's happening, just compile the example code on the "Intuition Alerts" page of the AmigOS Documentation WIKI.tonyw wrote:Can you provide your code (that crashes) and a serial log showing the crash stack trace? You could send it to me if you don't want to make it public.
Most of the "Intuition Alerts" page needs to be replaced with a short explanation of the changes that were made. I need to replace most of the DisplayAlert() function calls in the code I'm working on, so this post is just about outdated documentation and the need to fix it.
AmigaOne X1000 with 2GB memory - OS4.1 FE
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: Intuition DisplayAlert() issues
Yes, IExec->Alert() now alerts via a GrimReaper with the alert number in the first window.xenic wrote:I'm working on an old OS3 program that's ported to OS4 and uses Intuition DisplayAlert(). When testing the compiled program, I get a Grim Reaper instead of an alert.
The reason being that old style Alerts kill multitasking and render most OS4 machines unusable.
It's not a bug.
And it still does exactly what's asked of it, insofar as it alerts you to a problem, just via a GR window (which you can continue from) rather than a system disabling retro trick.... you even get a stack trace, so you can tell which point your program dis something nasty.
You should not use them in new code IMHO or even porting old code, unless there is no way out.
Re: Intuition DisplayAlert() issues
As I said in my original post I plan on replacing them. However, I'm in the process of fixing other stuff first and my first impression when I got a Grim Reaper was that DisplayAlert() was crashing. I wasted time trying to diagnose the problem because the OS4 AutoDocs and OS4 Documentation WIKI contain outdated information. Now that I know it's not a bug and that DisplayAlert() is being rerouted to a Grim Reaper, I'm requesting that the AutoDocs and Documentation WIKI be updated to reflect the change and possibly declare DisplayAlert() obsolete. A single sentence at the top of the documentation would eliminate the kind of confusion I experienced.broadblues wrote:You should not use them in new code IMHO or even porting old code, unless there is no way out.
AmigaOne X1000 with 2GB memory - OS4.1 FE
Re: Intuition DisplayAlert() issues
I used also some time before forum search told me this to be a new feature. I also hope that in the future the Autodocs show this change.xenic wrote:As I said in my original post I plan on replacing them. However, I'm in the process of fixing other stuff first and my first impression when I got a Grim Reaper was that DisplayAlert() was crashing. I wasted time trying to diagnose the problem because the OS4 AutoDocs and OS4 Documentation WIKI contain outdated information. Now that I know it's not a bug and that DisplayAlert() is being rerouted to a Grim Reaper, I'm requesting that the AutoDocs and Documentation WIKI be updated to reflect the change and possibly declare DisplayAlert() obsolete. A single sentence at the top of the documentation would eliminate the kind of confusion I experienced.broadblues wrote:You should not use them in new code IMHO or even porting old code, unless there is no way out.
Marko
P.S: BTW, I should replace my "Out of memory" and "Window won't open" Alerts with some other way of communicating. Which would be the recommended route when an error requester may not be available?
Marko
- nbache
- Beta Tester
- Posts: 1714
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: Intuition DisplayAlert() issues
An error requesterblmara wrote:Which would be the recommended route when an error requester may not be available?
I may be wrong, but logic tells me that a GR would need the same or more memory to open than a simple requester. So if you are that low on memory, you won't be able to open anything anyway. I'm not sure if the system falls back to the old displayalert in that case - even though most users on't be able to interact with it after that?
Best regards,
Niels
Re: Intuition DisplayAlert() issues
That's why I replaced the DisplayAlert() function calls with serial debug output. The DisplayAlerts were only used for debugging anyway; they weren't active in a user version of the program.nbache wrote:An error requesterblmara wrote:Which would be the recommended route when an error requester may not be available?
I may be wrong, but logic tells me that a GR would need the same or more memory to open than a simple requester. So if you are that low on memory, you won't be able to open anything anyway. I'm not sure if the system falls back to the old displayalert in that case - even though most users on't be able to interact with it after that?
AmigaOne X1000 with 2GB memory - OS4.1 FE