pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.62k stars 409 forks source link

Incoming damage pattern context menu behavior issue #2428

Open fonsuiplaysvideogames opened 2 years ago

fonsuiplaysvideogames commented 2 years ago

Observed in current release (2.41.0)

When an empty fitting tab is selected, and the incoming damage pattern context menu is brought up, most or all entries are greyed out and often one or more are available to be selected. This behavior changes with every instance of the menu being brought up, seemingly at random.

When selected, the menu closes and it appears that the selection is accepted, however, when that fitting tab is then populated, the selected damage pattern selection is not applied.

Observe multiple instances of the menu, brought up one after the next in rapid succession by right-clicking in the same spot: image image image

DarkFenX commented 2 years ago

@blitzmann since I do not have operational windows installation, could you look into what's causing it? It works perfectly fine on linux.

I believe I touched code which processes those menus (when adding RAH resistance profile support), but can't understand what could've cause this.

blitzmann commented 2 years ago

will take a look this week :)

blitzmann commented 2 years ago

I can't seem to reproduce. Empty fitting produced disabled menu items, as it should. Also using 2.41. I've tried multiple times. :/

image

class ChangeDamagePattern(ContextMenuUnconditional, DamagePatternMixin):

   ...

    @property
    def enabled(self):
        return self.mainFrame.getActiveFit() is not None

Enabled is defined as whether or not there is an active fit at the time of spawning the menu. If that's not working right, then I would expect a host of other issues and random errors spawning. I'm pretty sure the enabled gets evaluated every time the menu is triggered (so, no weird caching to worry about).

@fonsuiplaysvideogames does this happen consistently? Do you have other fittings open when it happens? Or can you literally start pyfa, open a new fit, and it breaks?

fonsuiplaysvideogames commented 2 years ago

@blitzmann Just re-tested with the same version (2.41.0) and current version as of today (2.42.0) and a fresh pyfa DB using the -s command line switch ("C:\Program Files\pyfa\pyfa.exe" -t test -s %localappdata%\pyfa\test), same results.

blitzmann commented 2 years ago

Do you have any other fittings open when this happens? Or it is just the blank "Empty Tab" page?

fonsuiplaysvideogames commented 2 years ago

Same results in both of those cases

fonsuiplaysvideogames commented 2 years ago

Win 10 latest, yeah

blitzmann commented 2 years ago

I'm also on Windows 10, 2.41 installer version, still can't reproduce.

Can you try a few previous versions to see if they exhibit the same behavior? download the zips and remember to run with -s as you described so that you don't corrupt your normal saveddata (we don't support downgrades of database, if any upgrades have happened in the last few releases)

fonsuiplaysvideogames commented 2 years ago

Bug introduced in 2.17.0, consistently present through current release. Versions 2.16.0, .1, .2, .3, and .4dev (and earlier) do not exhibit this bug.

fonsuiplaysvideogames commented 2 years ago

Screenshot from 2.17.0: image

blitzmann commented 2 years ago

Excellent, at least we can look to see what changes went in between those two versions. That was... a while ago. yikes!

fonsuiplaysvideogames commented 2 years ago

2 years, 2 months, lol. Anything else that I can do to help out?

blitzmann commented 2 years ago

Not at the moment, but I'll be taking a look in the coming days. I know we did some work around the context menu a while back, maybe its related

DarkFenX commented 2 years ago

If you can launch pyfa from source - use git bisect to figure out the commit to blame. You can use wine's bisect tutorial on how to handle it: https://wiki.winehq.org/Regression_Testing#Running_the_bisection

Unless it is a library upgrade issue, of course. Which could be the case, since git diff v2.16.4dev1..v2.17.0 shows a bunch of dependency changes, as well as build environment changes.

blitzmann commented 2 years ago

https://github.com/pyfa-org/Pyfa/compare/v2.16.4dev1...v2.17.0 for a handy GitHub version

blitzmann commented 2 years ago

FWIW, I don't see anything that could affect the context menu bugging out. Some dependencies were updated, but none of them deal with GUI. The only thing that I can think of is the difference in build. We moved from 32bit application to 64 bit, as well as upgraded pyinstaller from 3.3 to 3.6.

@fonsuiplaysvideogames are there any other menus that act up?

fonsuiplaysvideogames commented 2 years ago

None that I've noticed, but I can poke around and try to find some, will update.