unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: nljlistbox2@gmail.com (N. Jackson)
To: Eli Zaretskii <eliz@gnu.org>
Cc: 25851@debbugs.gnu.org
Subject: bug#25851: 25.2; GTK warning when starting Emacs when desktop file has more than one frame
Date: Thu, 23 Feb 2017 21:33:33 -0500	[thread overview]
Message-ID: <87lgswmi6a.fsf@moondust.localdomain> (raw)
In-Reply-To: <831suoub86.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 23 Feb 2017 18:24:09 +0200")

At 18:24 +0200 on Thursday 2017-02-23, Eli Zaretskii wrote:
>
> Thanks. It might be enough if you run Emacs under a debugger
> with a breakpoint in the GTK function which emits this warning,
> then show us the backtrace from that function. That should point
> to the code that gets executed when it probably shouldn't.

This warning is emitted by line 11414 of
`gtk_window_parse_geometry' in gtkwindow.c in the gtk+-3.22.8
sources. The code looks like this:

  gboolean
  gtk_window_parse_geometry (GtkWindow   *window,
                             const gchar *geometry)
  {
    gint result, x = 0, y = 0;
    guint w, h;
    GtkWidget *child;
    GdkGravity grav;
    gboolean size_set, pos_set;
    GdkScreen *screen;

    g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
    g_return_val_if_fail (geometry != NULL, FALSE);

    child = gtk_bin_get_child (GTK_BIN (window));
    if (!child || !gtk_widget_get_visible (child))
      g_warning ("gtk_window_parse_geometry() called on a window with no "
                 "visible children; the window should be set up before "
                 "gtk_window_parse_geometry() is called.");
  ...

There is a note in the commentary preceding the function that
echos the warning message:

   * Note that for gtk_window_parse_geometry() to work as
   * expected, it has to be called when the window has its “final”
   * size, i.e. after calling gtk_widget_show_all() on the
   * contents and gtk_window_set_geometry_hints() on the window.

The only place in the Emacs sources where I see
`gtk_window_parse_geometry' being called is in `xg_set_geometry'
at line 802 of gtkutil.c where the code looks like this:

  /* Silence warning about visible children.  */
  id = g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
                          | G_LOG_FLAG_RECURSION, my_log_handler, NULL);

  if (!gtk_window_parse_geometry (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
                                  geom_str))
    fprintf (stderr, "Failed to parse: '%s'\n", geom_str);

So it looks like a previous attempt to avoid the warning message
is no longer successful.


As requested, here is the backtrace when the warning is emitted:

#0  0x00000000005657ee in xg_set_geometry (f=0x10aa9f0) at gtkutil.c:806
#1  0x00000000005667cf in xg_create_frame_widgets (f=0x10aa9f0) at gtkutil.c:1216
#2  0x000000000054fc76 in x_window (f=0x10aa9f0) at xfns.c:2727
#3  0x0000000000551d79 in Fx_create_frame (parms=57485619) at xfns.c:3484
#4  0x000000000062c40d in Ffuncall (nargs=2, args=0x7fffffff8ec8) at eval.c:2699
#5  0x000000000067664b in exec_byte_code (bytestr=10582108, vector=10582141, maxdepth=18, args_template=0, nargs=0, args=0x0) at bytecode.c:880
#6  0x000000000062d16f in funcall_lambda (fun=10582045, nargs=1, arg_vector=0xa1787d <pure+531805>) at eval.c:2929
#7  0x000000000062c68f in Ffuncall (nargs=2, args=0x7fffffff9400) at eval.c:2748
#8  0x000000000067664b in exec_byte_code (bytestr=23626564, vector=14868461, maxdepth=14, args_template=1030, nargs=1, args=0x7fffffff9a80) at bytecode.c:880
#9  0x000000000062cd50 in funcall_lambda (fun=22350725, nargs=1, arg_vector=0x7fffffff9a78) at eval.c:2863
#10 0x000000000062c68f in Ffuncall (nargs=2, args=0x7fffffff9a70) at eval.c:2748
#11 0x000000000062b382 in Fapply (nargs=2, args=0x7fffffff9a70) at eval.c:2284
#12 0x000000000062c2d5 in Ffuncall (nargs=3, args=0x7fffffff9a68) at eval.c:2679
#13 0x000000000067664b in exec_byte_code (bytestr=23644068, vector=21208917, maxdepth=62, args_template=514, nargs=1, args=0x7fffffffa010) at bytecode.c:880
#14 0x000000000062cd50 in funcall_lambda (fun=19980181, nargs=1, arg_vector=0x7fffffffa010) at eval.c:2863
#15 0x000000000062c68f in Ffuncall (nargs=2, args=0x7fffffffa008) at eval.c:2748
#16 0x000000000067664b in exec_byte_code (bytestr=11218740, vector=11218773, maxdepth=54, args_template=1026, nargs=1, args=0x7fffffffa568) at bytecode.c:880
#17 0x000000000062cd50 in funcall_lambda (fun=11218685, nargs=1, arg_vector=0x7fffffffa560) at eval.c:2863
#18 0x000000000062c68f in Ffuncall (nargs=2, args=0x7fffffffa558) at eval.c:2748
#19 0x000000000067664b in exec_byte_code (bytestr=11217524, vector=11217557, maxdepth=22, args_template=2054, nargs=2, args=0x7fffffffaad8) at bytecode.c:880
#20 0x000000000062cd50 in funcall_lambda (fun=11217469, nargs=2, arg_vector=0x7fffffffaac8) at eval.c:2863
#21 0x000000000062c68f in Ffuncall (nargs=3, args=0x7fffffffaac0) at eval.c:2748
#22 0x000000000067664b in exec_byte_code (bytestr=29837764, vector=20327621, maxdepth=70, args_template=4114, nargs=4, args=0x7fffffffb0e0) at bytecode.c:880
#23 0x000000000062cd50 in funcall_lambda (fun=25722397, nargs=4, arg_vector=0x7fffffffb0c0) at eval.c:2863
#24 0x000000000062c68f in Ffuncall (nargs=5, args=0x7fffffffb0b8) at eval.c:2748
#25 0x000000000067664b in exec_byte_code (bytestr=18636228, vector=22137909, maxdepth=122, args_template=1542, nargs=9, args=0x7fffffffb618) at bytecode.c:880
#26 0x000000000062cd50 in funcall_lambda (fun=21872565, nargs=9, arg_vector=0x7fffffffb610) at eval.c:2863
#27 0x000000000062c68f in Ffuncall (nargs=10, args=0x7fffffffb608) at eval.c:2748
#28 0x000000000067664b in exec_byte_code (bytestr=19811332, vector=21941397, maxdepth=42, args_template=2, nargs=0, args=0x7fffffffbba8) at bytecode.c:880
#29 0x000000000062cd50 in funcall_lambda (fun=21941501, nargs=0, arg_vector=0x7fffffffbba8) at eval.c:2863
#30 0x000000000062c68f in Ffuncall (nargs=1, args=0x7fffffffbba0) at eval.c:2748
#31 0x000000000067664b in exec_byte_code (bytestr=19804484, vector=21941597, maxdepth=66, args_template=1026, nargs=0, args=0x7fffffffc100) at bytecode.c:880
#32 0x000000000062cd50 in funcall_lambda (fun=20574093, nargs=0, arg_vector=0x7fffffffc100) at eval.c:2863
#33 0x000000000062c68f in Ffuncall (nargs=1, args=0x7fffffffc0f8) at eval.c:2748
#34 0x000000000067664b in exec_byte_code (bytestr=19384580, vector=18492589, maxdepth=18, args_template=2, nargs=0, args=0x7fffffffc6d0) at bytecode.c:880
#35 0x000000000062cd50 in funcall_lambda (fun=21708709, nargs=0, arg_vector=0x7fffffffc6d0) at eval.c:2863
#36 0x000000000062c68f in Ffuncall (nargs=1, args=0x7fffffffc6c8) at eval.c:2748
#37 0x000000000062b780 in funcall_nil (nargs=1, args=0x7fffffffc6c8) at eval.c:2338
#38 0x000000000062bc60 in run_hook_with_args (nargs=1, args=0x7fffffffc6c8, funcall=0x62b75d <funcall_nil>) at eval.c:2515
#39 0x000000000062b807 in Frun_hook_with_args (nargs=1, args=0x7fffffffc6c8) at eval.c:2380
#40 0x000000000062bcea in run_hook (hook=21708709) at eval.c:2528
#41 0x000000000062b7c4 in Frun_hooks (nargs=2, args=0x7fffffffc7d0) at eval.c:2362
#42 0x000000000062c2d5 in Ffuncall (nargs=3, args=0x7fffffffc7c8) at eval.c:2679
#43 0x000000000067664b in exec_byte_code (bytestr=11253852, vector=11253885, maxdepth=86, args_template=2, nargs=0, args=0x7fffffffcd88) at bytecode.c:880
#44 0x000000000062cd50 in funcall_lambda (fun=11253805, nargs=0, arg_vector=0x7fffffffcd88) at eval.c:2863
#45 0x000000000062c68f in Ffuncall (nargs=1, args=0x7fffffffcd80) at eval.c:2748
#46 0x000000000067664b in exec_byte_code (bytestr=11249860, vector=11249893, maxdepth=50, args_template=2, nargs=0, args=0x7fffffffd230) at bytecode.c:880
#47 0x000000000062cd50 in funcall_lambda (fun=11249813, nargs=0, arg_vector=0x7fffffffd230) at eval.c:2863
#48 0x000000000062c9f7 in apply_lambda (fun=11249813, args=0, count=4) at eval.c:2800
#49 0x000000000062b026 in eval_sub (form=21000067) at eval.c:2217
#50 0x000000000062a512 in Feval (form=21000067, lexical=0) at eval.c:1994
#51 0x0000000000581380 in top_level_2 () at keyboard.c:1121
#52 0x0000000000628baf in internal_condition_case (bfun=0x58135d <top_level_2>, handlers=19104, hfun=0x580d8a <cmd_error>) at eval.c:1315
#53 0x00000000005813c1 in top_level_1 (ignore=0) at keyboard.c:1129
#54 0x000000000062817e in internal_catch (tag=45936, func=0x581382 <top_level_1>, arg=0) at eval.c:1080
#55 0x00000000005812b5 in command_loop () at keyboard.c:1090
#56 0x000000000058087a in recursive_edit_1 () at keyboard.c:697
#57 0x0000000000580a7a in Frecursive_edit () at keyboard.c:768
#58 0x000000000057e832 in main (argc=1, argv=0x7fffffffd758) at emacs.c:1629

Lisp Backtrace:
"x-create-frame" (0xffff8ed0)
"x-create-frame-with-faces" (0xffff9408)
0x1550b80 PVEC_COMPILED
"apply" (0xffff9a70)
"frame-creation-function" (0xffffa010)
"make-frame" (0xffffa560)
"make-frame-on-display" (0xffffaac8)
"frameset--restore-frame" (0xffffb0c0)
"frameset-restore" (0xffffb610)
"desktop-restore-frameset" (0xffffbba8)
"desktop-read" (0xffffc100)
0x14b3fa0 PVEC_COMPILED
"run-hooks" (0xffffc7d0)
"command-line" (0xffffcd88)
"normal-top-level" (0xffffd230)


I hopes this helps and please let me know if I can provide further
information. Thanks.

N.







  reply	other threads:[~2017-02-24  2:33 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 16:08 bug#25851: 25.2; GTK warning when starting Emacs when desktop file has more than one frame N. Jackson
2017-02-23 16:24 ` Eli Zaretskii
2017-02-24  2:33   ` N. Jackson [this message]
2017-02-24  8:07     ` Eli Zaretskii
2017-02-24 13:41       ` N. Jackson
2017-02-24 13:53         ` N. Jackson
2017-02-24 14:10         ` Eli Zaretskii
2017-02-24 16:09           ` N. Jackson
2017-02-24 20:28             ` N. Jackson
2017-02-25  8:17               ` Eli Zaretskii
2017-02-26 22:41                 ` N. Jackson
2017-02-27  0:31                   ` N. Jackson
2017-02-27 16:18                     ` Eli Zaretskii
2017-02-27 18:26                       ` N. Jackson
2017-02-27 18:37                         ` Eli Zaretskii
2017-02-28  9:46                         ` martin rudalics
2017-03-01 20:05                           ` N. Jackson
2017-03-23  8:00                             ` martin rudalics
2017-03-23 14:11                               ` N. Jackson
2017-03-24  9:01                                 ` martin rudalics
2017-03-24 20:28                                   ` N. Jackson
2017-03-25  6:26                                     ` Eli Zaretskii
2017-03-28 13:15                                       ` N. Jackson
2017-03-29  7:36                                         ` martin rudalics
2017-03-25  9:25                                     ` martin rudalics
2017-04-27 19:28                                     ` N. Jackson
2017-04-11  6:49                                   ` martin rudalics
2017-04-27 19:55                                     ` N. Jackson
2017-04-29 10:30                                       ` martin rudalics
2017-04-29 19:32                                         ` N. Jackson
2017-04-30  8:32                                           ` martin rudalics
2017-04-30 16:13                                             ` N. Jackson
2017-04-30 19:36                                               ` martin rudalics
2017-02-28  9:46                       ` martin rudalics
2017-02-28 15:51                         ` Eli Zaretskii
2017-02-28 18:42                           ` martin rudalics
2017-02-28 18:50                             ` Eli Zaretskii
2017-03-01  8:29                               ` martin rudalics
2017-03-01 16:18                                 ` Eli Zaretskii
2017-03-01 19:36                                   ` martin rudalics
2017-03-01 19:47                                     ` Eli Zaretskii
2017-03-01 20:11                                       ` Eli Zaretskii
2017-03-02 11:00                                       ` martin rudalics
2017-03-02 15:09                                         ` Eli Zaretskii
2017-03-02 17:57                                           ` martin rudalics
2017-03-02 20:10                                             ` Eli Zaretskii
2017-03-03  8:13                                               ` martin rudalics
2017-03-03  8:25                                                 ` Eli Zaretskii
2017-03-01 20:16                                     ` N. Jackson
2017-03-03  8:13                                       ` martin rudalics
2017-03-03 13:05                                         ` N. Jackson
2017-03-03 14:24                                           ` martin rudalics
2017-03-06 18:25                                             ` N. Jackson
2017-03-06 18:44                                               ` martin rudalics
2017-02-25  8:21               ` martin rudalics
2017-02-26 22:47                 ` N. Jackson
2017-02-27  2:22                   ` N. Jackson
2017-02-27  8:04                     ` martin rudalics
2017-02-27 17:56                       ` N. Jackson
2017-02-28  9:46                         ` martin rudalics
2017-02-25  7:55             ` Eli Zaretskii
2017-02-26 22:09               ` N. Jackson
2017-03-23  7:59 ` martin rudalics
2017-03-23 13:47   ` Drew Adams
2017-03-23 14:34     ` N. Jackson
2017-03-24  9:01     ` martin rudalics
2017-03-24 20:37       ` N. Jackson
2017-03-25  9:25         ` martin rudalics
2017-03-23 15:24   ` Eli Zaretskii
2017-03-24  9:02     ` martin rudalics
2017-04-27 19:45 ` N. Jackson
2017-04-27 19:52   ` Noam Postavsky
2017-04-28 14:15     ` N. Jackson
2017-04-28 14:25   ` N. Jackson
2017-09-25 16:31 ` N. Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgswmi6a.fsf@moondust.localdomain \
    --to=nljlistbox2@gmail.com \
    --cc=25851@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).