From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: "Attempt to modify read-only object" error with set-frame-configuration Date: Sat, 22 Dec 2007 21:06:23 +0200 Message-ID: References: <47698DF5.2080106@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1198350393 12563 80.91.229.12 (22 Dec 2007 19:06:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Dec 2007 19:06:33 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 22 20:06:45 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J69gK-0003zl-VD for ged-emacs-devel@m.gmane.org; Sat, 22 Dec 2007 20:06:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J69g0-0007rW-GM for ged-emacs-devel@m.gmane.org; Sat, 22 Dec 2007 14:06:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J69fw-0007qg-Av for emacs-devel@gnu.org; Sat, 22 Dec 2007 14:06:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J69fu-0007q4-Lc for emacs-devel@gnu.org; Sat, 22 Dec 2007 14:06:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J69fu-0007q1-JS for emacs-devel@gnu.org; Sat, 22 Dec 2007 14:06:18 -0500 Original-Received: from nitzan.inter.net.il ([213.8.233.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J69fu-0004qm-6p for emacs-devel@gnu.org; Sat, 22 Dec 2007 14:06:18 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-84-229-233-247.inter.net.il [84.229.233.247]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id IPU16040 (AUTH halo1); Sat, 22 Dec 2007 21:03:46 +0200 (IST) In-reply-to: (lekktu@gmail.com) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:85379 Archived-At: > Date: Thu, 20 Dec 2007 00:59:07 +0100 > From: "Juanma Barranquero" > Cc: emacs-devel > > On Dec 19, 2007 10:32 PM, martin rudalics wrote: > > > (visibility . t) > > I'd bet this causes the bug. Setting visibility causes problems on > Windows since the multi-tty merge. See > > http://thread.gmane.org/gmane.emacs.devel/77325 I debugged this a bit. The error is thrown from Fsetcdr, when it checks its first arg `cell' for being pure. Looking for the reason of this, I found that Fsetcdr is called by store_frame_param in this snippet (around line 2300 in frame.c): /* Update the frame parameter alist. */ old_alist_elt = Fassq (prop, f->param_alist); if (EQ (old_alist_elt, Qnil)) f->param_alist = Fcons (Fcons (prop, val), f->param_alist); else Fsetcdr (old_alist_elt, val); GDB shows that old_alist_elt's value is 18412069 decimal or 118f225 hex, which indeed seems to be in pure space. The value of f->param_alist includes `(visibility)', and I verified by stepping into Fassq that it finds this element of the alist, and then this last line of Fassq: return CAR (list); returns the offending value of 18412069, as the car of this list: ((visibility) (scroll-bar-width) (cursor-type . box) (auto-lower) (auto-raise) (icon-type) (title) (buffer-predicate) (tool-bar-lines . 1) (menu-bar-lines . 1) (right-fringe) (left-fringe) (line-spacing) (screen-gamma) (border-color . "black") (cursor-color . "black") (mouse-color . "black") (background-color . "SystemWindow") (foreground-color . "SystemWindowText") (vertical-scroll-bars . right) (internal-border-width . 0) (border-width . 2) (font . "-outline-Courier New-normal-r-normal-normal-13-97-96-96-c-*-iso8859-1")) This is where I ran out of time. Someone, please continue debugging. The way to reproduce this is to run Emacs under GDB with the following command: (gdb) r -Q --eval "(setq default-frame-alist '((visibility . t)))"