Skip to content
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

Define X Value (e.g. Black Sun's Zenith) or Choices don't work correct using a Linux system while XMage tray bar icon is blinking #584

Closed
quantumfx opened this issue Sep 29, 2014 · 30 comments
Labels

Comments

@quantumfx
Copy link

@quantumfx quantumfx commented Sep 29, 2014

Choosing X doesn't work and it always only ask you to pay BB. Used to work on previous versions. It looks like it might be a general issue for any card with casting cost X?
screenshot from 2014-09-29 13 32 22

@LevelX2
Copy link
Contributor

@LevelX2 LevelX2 commented Sep 29, 2014

I can't reproduce this problem.
Is this linux os?
And why is on your screenshot the declare window and the pay prompt shown?
The Pay {B}{B} prompt is normally shown as you click the ok button of the define x value.
You see it at the same time?

xcosts
xcosts2

@quantumfx
Copy link
Author

@quantumfx quantumfx commented Sep 29, 2014

Yes this was on Ubuntu 14.04. When I play BSZ the declare value window comes up and "Pay {B}{B}" appears right after without giving me a chance to choose the value. No matter what {X} I choose, xmage thinks I chose 0.

@LevelX2 LevelX2 added the bug label Sep 30, 2014
@LevelX2 LevelX2 changed the title Black Sun's Zenith can't be casted for anything other than 0 Black Sun's Zenith can't be casted for anything other than 0 (linux specific) Sep 30, 2014
@LevelX2 LevelX2 changed the title Black Sun's Zenith can't be casted for anything other than 0 (linux specific) Black Sun's Zenith can't be casted for anything other than 0 (Linux specific) Sep 30, 2014
@Simown
Copy link
Contributor

@Simown Simown commented Oct 1, 2014

I can confirm this for Linux OS (Linux Mint 17). I saw exactly the same issue @quantumfx is describing. I tried to play Mindswipe for X=4 and it resolved with X=0. I think this is a general choosing "X" issue rather than that specific card.

On another note I have just set up a dev environment and forked the repository, I'll take a look at it this week time permitting if it's not cleared up by then.

@LevelX2
Copy link
Contributor

@LevelX2 LevelX2 commented Oct 2, 2014

Only change that I can remember that could have influence is:
6d0d511
But also this doesn't look for me like it's related.
@Simown
If you got the time would be nice. I have no linux system available, so it's a bit hard to check and fix.

@LevelX2 LevelX2 changed the title Black Sun's Zenith can't be casted for anything other than 0 (Linux specific) Define X Value (e.g. Black Sun's Zenith) or Choices don't work correct using a Linux system Oct 2, 2014
@fireshoes
Copy link
Contributor

@fireshoes fireshoes commented Oct 2, 2014

That was my screenshot you linked to. I'm on Linux also (Centos 6).

@Simown
Copy link
Contributor

@Simown Simown commented Oct 3, 2014

I've had a quick look at it this evening and so far haven't found the root of the problem, yet. Initially I thought it was to do with the mousePressed/mouseReleased difference between Linux and Windows as @LevelX2 change linked to suggests, but I am beginning to think otherwise. I can only see the issue on human vs human games with two clients, but it's always repeatable. Any luck I'll have a fix before the weekend's out if I can find my way around the codebase!

@LevelX2
Copy link
Contributor

@LevelX2 LevelX2 commented Nov 5, 2014

There seems to be a Tray Icon / Application icon relation:
http://www.slightlymagic.net/forum/viewtopic.php?f=70&t=15960#p167104
The problem only occurs when the Xmage icon in the taskbar notification area is blinking between brown and green. It only blinks like that when you have created a match and then a player joins or leaves the table. If you right-click the icon and choose Stop Blinking, you shouldn't have any problems with the choice boxes like Sylvan Caryatid or Phyrexian Revoker.

@troyready
Copy link

@troyready troyready commented Feb 2, 2015

FWIW, I seem to be experiencing this issue consistently regardless of the blinking state of the tray icon.

@LevelX2
Copy link
Contributor

@LevelX2 LevelX2 commented Feb 2, 2015

FWIW, I seem to be experiencing this issue consistently regardless of the blinking state of the tray icon.

Which Linux Distribution and which Desktop do you use?

@troyready
Copy link

@troyready troyready commented Feb 3, 2015

It's Ubuntu 14.04 w/ the default Unity desktop environment. I've tried launching the client app with the launcher's provided Oracle JRE & my system's build of openjdk7 but the results are the same.

What is interesting is that it functions properly when testing against AI on a local server -- it's only when I try to use the public server with another real client that the issue manifests.

@Simown
Copy link
Contributor

@Simown Simown commented Feb 3, 2015

I had a look at this over the span of a few days and it looks like a generic Linux issue rather than a distribution specific one (e.g. Ubuntu). I wasn't able to get to the root of the problem, but was able to reproduce it fairly consistently. It doesn't only seem to happen Human vs Human. Maybe it's a concurrency issue or an odd quirk with Java on Linux.

@LevelX2
Copy link
Contributor

@LevelX2 LevelX2 commented Feb 3, 2015

Just to get the problematic behaviour of the bug correctly:

  1. You play a spell with a {X} cost.
  2. The small window to choose {X} opens.
  3. Meanwhile the program runs further and thinks you did choose X = 0.
  4. But the window is still open.
  5. As you push OK on the small window it closes and your can pay the remaining costs beside X.
  6. It doesn't matter what you enter and confirm in the X window.

Is this description correct?

@troyready
Copy link

@troyready troyready commented Feb 3, 2015

The issue that I'm experiencing is a bit different - nothing appears at all when I attempt to cast spells with a {0} mama cost (e.g. Mox Opal, Ornithopter). The card is highlighted purple (indicating that it can be cast), but no feedback at all appears when clicking on it.

In an AI game or on Windows, clicking on the card properly pops up a small black box with a "Cast..." option.

@quantumfx
Copy link
Author

@quantumfx quantumfx commented Feb 3, 2015

@LevelX2 that description is correct for the original bug reported.

@fireshoes
Copy link
Contributor

@fireshoes fireshoes commented Feb 23, 2015

Can we just update the code to take the blinking function out of the icon? The blinking starts when a player joins or leaves a table or when you open a new pack in draft (usually just if you are on a different screen when the pack opens).

@fireshoes
Copy link
Contributor

@fireshoes fireshoes commented Feb 24, 2015

Re: Bug Reports 1.3.0 dev 2015-02-07
Postby aging-goblin » 23 Feb 2015, 15:12

Confirmed on Arch Linux using DWM. All spells with X in casting cost are X=0 when the tray icon is blinking.
It would be nice to be able to disable blinking, or disable the icon entirely.

@LevelX2 LevelX2 changed the title Define X Value (e.g. Black Sun's Zenith) or Choices don't work correct using a Linux system Define X Value (e.g. Black Sun's Zenith) or Choices don't work correct using a Linux system while XMage tray bar icon is blinking Mar 28, 2015
@skeet70
Copy link

@skeet70 skeet70 commented May 7, 2015

I've experienced the same/a similar issue with any cards that require choices. If a choice of cards (eg Ancient Stirrings) or a search is required (eg Rampant Growth), no dialog comes up and the program doesn't accept any user input. The tray icon doesn't ever seem to blink. This is on Ubuntu 14.04 LTS.

Semi-randomly selecting the stop blinking option in the tray before the problem occurs seems to prevent it, trying to select it after lockup presents no context menu at all when clicking the tray icon.

Just thought I'd add my data to the issue. No errors or anything in the log files.

@LevelX2 do you have any ideas I could try to reproduce for you? I can setup the dev environment if necessary.

@skeet70
Copy link

@skeet70 skeet70 commented May 8, 2015

I'm trying to find out where this problem is coming from. For one thing, my tray icon blinks, but not when this problem occurs. Once the lockup has happened I also can't click the tray icon to tell it to stop blinking (not that it is). If my opponent quits I regain the ability to use the program again. I'm under the impression that the dialogs are being incorrectly created somehow, and you can't click anywhere until you've finished selecting things in those (hidden/non-existant) dialogs.

I can only get the client to run locally, can't get a server up, and can't connect to a remote server with the source client (even if I change the version constant to match the server's, I get NPEs when I try to connect), so I can't reproduce the issue in a version of the client that I can try debugging. Any advice?

@ghost
Copy link

@ghost ghost commented Jul 3, 2015

Patch for this issue sent to LevelX

LevelX2 added a commit that referenced this issue Jul 3, 2015
@LevelX2
Copy link
Contributor

@LevelX2 LevelX2 commented Jul 6, 2015

Can anyone confirm, that the problem with 1.4.2v0 or later is fixed on linux systems?

@Simown
Copy link
Contributor

@Simown Simown commented Jul 6, 2015

I hasn't been an issue when I've been playing over the weekend, can't
remember if there were any {X} cost cards, however. I will test it tonight
if no one else confirms.

@ghost
Copy link

@ghost ghost commented Jul 6, 2015

Important note for testing: The bug only occured when the tray icon was flashing! So make sure the tray icon blinks while testing (best option: you open the table, after a player joins the icon starts flashing. Do not click on the icon and you will have a flashing icon the whole match!).
@LevelX2, didnt you mean 1.4.2v0? I fixed the bug after 1.4.1v3 release.

@skeet70
Copy link

@skeet70 skeet70 commented Jul 6, 2015

The bug wasn't related to flashing for me, but I'll try to check today if
it's fixed.

On Mon, Jul 6, 2015, 5:07 AM Nidhoegger notifications@github.com wrote:

Important note for testing: The bug only occured when the tray icon was
flashing! So make sure the tray icon blinks while testing (best option: you
open the table, after a player joins the icon starts flashing. Do not click
on the icon and you will have a flashing icon the whole match!).


Reply to this email directly or view it on GitHub
#584 (comment).

@LevelX2
Copy link
Contributor

@LevelX2 LevelX2 commented Jul 6, 2015

@LevelX2, didnt you mean 1.4.2v0? I fixed the bug after 1.4.1v3 release.

True that was a typo, I mean 1.4.2v0.

@Simown
Copy link
Contributor

@Simown Simown commented Jul 6, 2015

I have tested it on the development environment, Linux Mint 17.1 and it seems to be working and not showing the bug that was on X cost cards before, I have not exhaustively tested it but it has been working in all of my tests so far. If this fix was in 1.4.2v0 it should be in the release. I'd be happy to close it unless anyone finds a different result.

@skeet70
Copy link

@skeet70 skeet70 commented Jul 6, 2015

Tried to test it, but I couldn't get things to work unrelated.
Had to pass proxy settings from the command line, and then the launcher (while running in java) says it can't find Java and won't let me start anything. I'll keep trying to get to the point where I can test this bug.

@troyready
Copy link

@troyready troyready commented Sep 30, 2015

This is working perfectly for me now (Ubuntu 15.04) -- everything that I'd previously reported in this issue and the main 'define x' issue appear to be resolved. Thanks for the great work!

@drmDev drmDev closed this Jul 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants