New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X Error of failed request: BadValue (integer parameter out of range for operation) #3586

Open
jose1711 opened this Issue Jan 12, 2019 · 8 comments

Comments

Projects
None yet
4 participants
@jose1711
Copy link

jose1711 commented Jan 12, 2019

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

Running xclock from an already opened xterm window fails with the following error message:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  12 (X_ConfigureWindow)
  Value in failed request:  0x0
  Serial number of failed request:  86
  Current serial number in output stream:  8

Expected Behavior

xclock windows should be opened on a configured workspace.

Reproduction Instructions

  • configure i3 to open xclock windows on (currently) not existing workspace
$ grep XClock .config/i3/config 
for_window [class="^XClock$"] move window to workspace 8
  • reload config
i3 reload
  • make sure you're not switched to workspace 8
  • run xclock from xterm window
xclock
# receive the error

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.16 (2018-11-04) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16 (2018-11-04) (pid 14582) abort…)
Loaded i3 config: /home/jose/.config/i3/config (Last modified: So 12. január 2019, 14:58:20 CET, 608 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3-with-/i3

config: auto-generated by i3-confg-wizard + single custom line added

# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
...
...

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        status_command i3status
}

for_window [class="^XClock$"] move window to workspace 8

Relevant lines from debug log: https://logs.i3wm.org/logs/5706933096939520.bz2

- Linux Distribution & Version: Arch Linux 64bit (up-to-date)
- Nvidia 750Ti with 3 monitors, i3 installed from repository
- Are you using a compositor (e.g., xcompmgr or compton): nope

@i3bot i3bot added bug 4.16 labels Jan 12, 2019

@orestisf1993

This comment has been minimized.

Copy link
Member

orestisf1993 commented Jan 12, 2019

I can confirm that this happens but I don't know where the problem is.

Can you please also open an issue in xclock?

@Airblader

This comment has been minimized.

Copy link
Member

Airblader commented Jan 12, 2019

Running it under xtrace might be useful to see what values exactly xclock is sending here. I sort of assume this to be more of an xclock issue as well, but we'll see.

@orestisf1993

This comment has been minimized.

Copy link
Member

orestisf1993 commented Jan 12, 2019

@Airblader

This comment has been minimized.

Copy link
Member

Airblader commented Jan 12, 2019

0.141 000:<:005a: 20: Request(12): ConfigureWindow window=0x00e0000b values={width=0 height=0}

I assume that's the issue, since 0x0 dimensions aren't allowed. However, there is a

0.141 000:>:0059: Event (generated) ConfigureNotify(22) event=0x00e0000a window=0x00e0000a above-sibling=None(0x00000000) x=0 y=0 width=0 height=0 border-width=1 override-redirect=f

so maybe the fake notification sent by i3 isn't correct.

@jose1711

This comment has been minimized.

Copy link
Author

jose1711 commented Jan 12, 2019

I am seeing the same symptoms with vncviewer (tightvnc) and xterm so not sure if it makes sense to file a bugreport for xclock.

@orestisf1993

This comment has been minimized.

Copy link
Member

orestisf1993 commented Jan 12, 2019

Yes, the con's rect is set here:

i3/src/manage.c

Line 589 in 5aa0459

render_con(ws);
but a fake_absolute_configure_notify with width=height=0 is sent because of

i3/src/manage.c

Lines 568 to 569 in 5aa0459

/* Check if any assignments match */
run_assignments(cwindow);
.
I think the problem is explained in this comment:

i3/src/manage.c

Lines 575 to 581 in 5aa0459

/* If this window was put onto an invisible workspace (via assignments), we
* render this workspace. It wouldn’t be rendered in our normal code path
* because only the visible workspaces get rendered.
*
* By rendering the workspace, we assign proper coordinates (read: not
* width=0, height=0) to the window, which is important for windows who
* actually use them to position their GUI elements, e.g. rhythmbox. */

So, the tree_render inside run_assignments doesn't correctly set nc's rect because its workspace is invisible but a configurenotify is still sent.

@orestisf1993

This comment has been minimized.

Copy link
Member

orestisf1993 commented Jan 12, 2019

@jose1711 to work around this, use assign [class=…: https://i3wm.org/docs/userguide.html#assign_workspace

@jose1711

This comment has been minimized.

Copy link
Author

jose1711 commented Jan 14, 2019

@orestisf1993 thank you for this workaround, it's fine for the time being

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment