unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* mac - crash when scrolling wheely mouse when all frames are minimized
@ 2003-01-20 15:34 John Paul Wallington
  2003-01-20 16:20 ` Andrew Choi
  2003-01-20 16:54 ` Steven Tamm
  0 siblings, 2 replies; 4+ messages in thread
From: John Paul Wallington @ 2003-01-20 15:34 UTC (permalink / raw)


On Mac OS X.1.5, minimizing all frames (but ensuring that Emacs has the
focus; the global menubar is Emacs') then scrolling the mouse wheel
causes a crash:

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x0013d2dc in XTread_socket (sd=0, bufp=0xbffd11c8, numchars=2407900, expected=-1073934024) at macterm.c:12660
12660                   XSETFRAME (bufp->frame_or_window, mwp->mFP);

-- 
John Paul Wallington

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mac - crash when scrolling wheely mouse when all frames are minimized
  2003-01-20 15:34 mac - crash when scrolling wheely mouse when all frames are minimized John Paul Wallington
@ 2003-01-20 16:20 ` Andrew Choi
  2003-01-20 16:53   ` John Paul Wallington
  2003-01-20 16:54 ` Steven Tamm
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Choi @ 2003-01-20 16:20 UTC (permalink / raw)
  Cc: emacs-devel

jpw@shootybangbang.com (John Paul Wallington) writes:

> On Mac OS X.1.5, minimizing all frames (but ensuring that Emacs has the
> focus; the global menubar is Emacs') then scrolling the mouse wheel
> causes a crash:
> 
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> 0x0013d2dc in XTread_socket (sd=0, bufp=0xbffd11c8, numchars=2407900, expected=-1073934024) at macterm.c:12660
> 12660                   XSETFRAME (bufp->frame_or_window, mwp->mFP);

I don't use a wheel mouse so I can't test this.  But please try adding
the following lines:

	  if (!IsValidWindowPtr (window_ptr))
	    {
	      SysBeep (1);
	      UNBLOCK_INPUT;
	      return 0;
	    }

in macterm.c (XTread_socket):

  	  case kEventClassMouse:
	    if (GetEventKind (eventRef) == kEventMouseWheelMoved) 
	      {
		SInt32 delta;
		Point point;
		WindowPtr window_ptr = FrontNonFloatingWindow ();
		struct mac_output *mwp = (mac_output *) GetWRefCon (window_ptr);
                <=== add the code here

		GetEventParameter(eventRef, kEventParamMouseWheelDelta,
				  typeSInt32, NULL, sizeof (SInt32),
				  NULL, &delta);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mac - crash when scrolling wheely mouse when all frames are minimized
  2003-01-20 16:20 ` Andrew Choi
@ 2003-01-20 16:53   ` John Paul Wallington
  0 siblings, 0 replies; 4+ messages in thread
From: John Paul Wallington @ 2003-01-20 16:53 UTC (permalink / raw)
  Cc: emacs-devel

Andrew Choi wrote:

> > Program received signal EXC_BAD_ACCESS, Could not access memory.
> > 0x0013d2dc in XTread_socket (sd=0, bufp=0xbffd11c8,
> > numchars=2407900, expected=-1073934024) at macterm.c:12660 12660
> > XSETFRAME (bufp->frame_or_window, mwp->mFP);
>  
>  I don't use a wheel mouse so I can't test this.  But please try
>  adding the following lines:
>  
>  	  if (!IsValidWindowPtr (window_ptr))
>  	    {
>  	      SysBeep (1);
>  	      UNBLOCK_INPUT;
>  	      return 0;
>  	    }
>  
>  in macterm.c (XTread_socket):
>  
>    	  case kEventClassMouse: if (GetEventKind (eventRef) ==
>  	    kEventMouseWheelMoved) { SInt32 delta; Point point;
>  	    WindowPtr window_ptr = FrontNonFloatingWindow ();
>  	    struct mac_output *mwp = (mac_output *) GetWRefCon
>  	    (window_ptr); <=== add the code here

Your fix works.  Thanks!

-- 
John Paul Wallington

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mac - crash when scrolling wheely mouse when all frames are minimized
  2003-01-20 15:34 mac - crash when scrolling wheely mouse when all frames are minimized John Paul Wallington
  2003-01-20 16:20 ` Andrew Choi
@ 2003-01-20 16:54 ` Steven Tamm
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Tamm @ 2003-01-20 16:54 UTC (permalink / raw)
  Cc: emacs-devel

Fixed & checked in.   Andrew's changes worked for me (on 10.2.3).

Thanks,
-Steven

On Monday, January 20, 2003, at 07:34  AM, John Paul Wallington wrote:

> On Mac OS X.1.5, minimizing all frames (but ensuring that Emacs has the
> focus; the global menubar is Emacs') then scrolling the mouse wheel
> causes a crash:
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> 0x0013d2dc in XTread_socket (sd=0, bufp=0xbffd11c8, numchars=2407900, 
> expected=-1073934024) at macterm.c:12660
> 12660                   XSETFRAME (bufp->frame_or_window, mwp->mFP);
>
> -- 
> John Paul Wallington
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-20 16:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-20 15:34 mac - crash when scrolling wheely mouse when all frames are minimized John Paul Wallington
2003-01-20 16:20 ` Andrew Choi
2003-01-20 16:53   ` John Paul Wallington
2003-01-20 16:54 ` Steven Tamm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).