Pyfa icon indicating copy to clipboard operation
Pyfa copied to clipboard

Incoming damage pattern context menu behavior issue

Open fonsuiplaysvideogames opened this issue 2 years ago • 17 comments

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

fonsuiplaysvideogames avatar Apr 02 '22 17:04 fonsuiplaysvideogames

@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.

DarkFenX avatar Apr 03 '22 14:04 DarkFenX

will take a look this week :)

blitzmann avatar Apr 04 '22 03:04 blitzmann

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?

blitzmann avatar Apr 06 '22 02:04 blitzmann

@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.

fonsuiplaysvideogames avatar Apr 08 '22 15:04 fonsuiplaysvideogames

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

blitzmann avatar Apr 08 '22 15:04 blitzmann

Same results in both of those cases

fonsuiplaysvideogames avatar Apr 08 '22 15:04 fonsuiplaysvideogames

Win 10 latest, yeah

fonsuiplaysvideogames avatar Apr 08 '22 16:04 fonsuiplaysvideogames

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)

blitzmann avatar Apr 08 '22 16:04 blitzmann

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 avatar Apr 08 '22 17:04 fonsuiplaysvideogames

Screenshot from 2.17.0: image

fonsuiplaysvideogames avatar Apr 08 '22 17:04 fonsuiplaysvideogames

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

blitzmann avatar Apr 09 '22 03:04 blitzmann

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

fonsuiplaysvideogames avatar Apr 11 '22 12:04 fonsuiplaysvideogames

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

blitzmann avatar Apr 13 '22 20:04 blitzmann

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.

DarkFenX avatar Apr 19 '22 20:04 DarkFenX

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

blitzmann avatar Apr 20 '22 00:04 blitzmann

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?

blitzmann avatar Apr 20 '22 01:04 blitzmann

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

fonsuiplaysvideogames avatar Apr 21 '22 18:04 fonsuiplaysvideogames