• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
MAINTENANCE ANNOUNCEMENT - JIRA will undergo maintenance starting 1:00am PDT through 3:00am on Saturday 2010.03.20. Please do not enter issues during this time as the system maybe restarted.
Issue Details (XML | Word | Printable)

Key: VWR-247
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Sardonyx Linden
Reporter: Zorin Frobozz
Votes: 7
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

Viewer generates undesired dialog when IM comes in while minimized

Created: 15/Mar/07 01:29 PM   Updated: 27/Jun/07 12:13 PM
Component/s: User Interface
Affects Version/s: First Look: Render Pipeline
Fix Version/s: 1.17.1

Time Tracking:
Not Specified

File Attachments: None
Image Attachments:

1. baddialog.png
(11 kB)

2. baddialog2.png
(16 kB)

3. repro.png.jpg
(261 kB)
Environment: MacOS X 10.4.9, First Look 1.13.3 (59036) Mar 9 2007 15:09:55
Issue Links:
Relates
 

Linden Lab Issue ID: SL-44583
Patch attached: Patch attached


 Description  « Hide
The attached image shows the dialog. Bouncing the dock icon should be enough! This dialog gets in the way if you're busy doing other things with Second Life minimized.

Perhaps make it a configuration option if not remove it completely?

-Zorin



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Rob Linden added a comment - 26/Apr/07 02:54 PM
I haven't seen this on my Mac. Could you describe how you got this?

Zorin Frobozz added a comment - 11/May/07 04:03 PM
Problem is still happening with 1.15.0 (2) – to reproduce, login and minimize SL. Use another application. The dialog will pop up and steal focus from the other application.

SL also crashes frequently if an IM comes in while it is minimized. I will report this in another bug.


Simon Nolan added a comment - 11/May/07 04:12 PM
Zorin brought this issue up in Group IM with Macintosh Users. I minimized SL to the dock, and as soon as another IM came in from the group, I got the same dialog. The dialog dismissed itself after only a few seconds. Attaching screenshot.

Simon Nolan added a comment - 11/May/07 04:15 PM
Reopening for repro steps.

Zorin Frobozz added a comment - 12/May/07 10:41 AM
I also found that if you click OK in the dialog, Second Life crashes. However, (at least so far) if you just let the dialog disappear naturally, there is no crash.

So not only are we getting an unwanted dialog, but clicking on it crashes SL. Why is this code needed at all? Just dike it out. A bouncing dock icon should be enough to get our attention when IM comes in.

-Z


Zorin Frobozz added a comment - 23/May/07 04:15 PM
This problem is still in 1.16.0(5). But, somebody obviously munged around in the code, because the dialog is slightly different now.

I attached a screenshot of the new dialog; please just fix this! Why should there be a dialog at all?


Zorin Frobozz added a comment - 23/May/07 04:16 PM
This is the dialog as it now appears.

Aimee Congrejo added a comment - 31/May/07 01:55 PM
I've seen this occasionally as well when minimized. grrr

Zorin Frobozz added a comment - 05/Jun/07 04:35 PM
I just fixed this. (Is this the new strategy of LL? don't fix simple but annoying bugs so that your users will? Come on guys...)

In llwindowmacosx.cpp at around line 1538, we have this bit of code:

mBounceTime = seconds;
memset(&mBounceRec, sizeof(mBounceRec), 0);
mBounceRec.qType = nmType;
mBounceRec.nmMark = 1;
err = NMInstall(&mBounceRec);

Now, let's take a look at http://developer.apple.com/documentation/mac/Processes/Processes-108.html

NMInstall is what bounces the icon. But you neglected to set the nmStr (dialog box) and nmResp (response function) members of the mBounceRec struct, so they are completely undefined. Failing to set nmStr results in the dialog, sometimes with random text from whatever poor innocent area of memory the undefined pointer points to, and failing to set nmResp results in the crash if you hit OK on the dialog, since you're jumping to an undefined address. In any case, the above code should look like this:

mBounceTime = seconds;
memset(&mBounceRec, sizeof(mBounceRec), 0);
mBounceRec.qType = nmType;
mBounceRec.nmMark = 1;
mBounceRec.nmStr = 0;
mBounceRec.nmResp = 0;
err = NMInstall(&mBounceRec);

If you don't set nmResp, the viewer will crash immediately upon bounce with no dialog, since it's the equivalent of having hit OK on the dialog.

Make those changes and everything is happy. No dialog, no crash, just a nice inconspicuous bounce of the dock icon.

Your bill for my work is $0, because I'm in a generous mood. Please fix it, now that it's a cut&paste job. I implore you. Please.

-Zorin


tenebrous pau added a comment - 05/Jun/07 04:56 PM
Surely the memset should set nmStr and nmResp to zero anyway?

tenebrous pau added a comment - 05/Jun/07 04:58 PM
I think the problem is this:

memset(&mBounceRec, sizeof(mBounceRec), 0);

should read

memset(&mBounceRec, 0, sizeof(mBounceRec) );


Zorin Frobozz added a comment - 05/Jun/07 05:11 PM
You nailed it tenebrous. I wasn't even looking at the memset. Either way it looks we have this one nailed.

tenebrous pau added a comment - 05/Jun/07 05:12 PM
I'll split the $0 with you.

Nicholaz Beresford added a comment - 05/Jun/07 05:40 PM

I'm marking this patch attached, hopefully this will get the attention of the Lindens.

Thanks fellow open-sorcerers (although I'm a Windoozer )


Nicholaz Beresford added a comment - 06/Jun/07 04:04 AM

Test, please ignore this comment.

Torley Linden added a comment - 06/Jun/07 07:52 AM
Assigned to Sardonyx for review, linked internally. Thanks for the help guys!

Sardonyx Linden added a comment - 06/Jun/07 09:40 AM
Fixed. Thanks, tenebrous!

Zorin Frobozz added a comment - 13/Jun/07 12:28 PM
This is NOT FIXED in 1.17.0 (12)

Looks like I'll be pulling the source and building my own fixed viewer again. What happened guys?


Torley Linden added a comment - 13/Jun/07 12:32 PM
Zorin – "Fixed Internally" status means that the fix is not public yet. This fix is in an internal Maintenance branch and will be included with many other forthcoming fixes in a future version. When that happens, we can change this issue to be "Fixed", meaning it's resolved publicly.