lighterowl / transgui

A fork of Transmission Remote GUI
GNU General Public License v2.0
133 stars 3 forks source link

"TControl.InvalidatePreferredSize loop detected" Error #82

Closed Horridge closed 1 month ago

Horridge commented 7 months ago

Received an error dialogue box this morning, image

Unfortunately don't know the cause, happened over night whilst the application would've been minimised to system tray. Running v5.18.4.f, with 1727 torrents (one was added via Radarr this morning, if relevant). Closing transgui and re-opening without issue.

lighterowl commented 7 months ago

Hi, thanks for the report.

I've seen this one before a couple of times but unfortunately haven't been able to track down the cause. I can only assume this is somehow related to all the code that overrides Lazarus' own logic for resizing and placing widgets (basically, the TBaseForm class, among others), but this is only speculation at this point.

cvn commented 3 months ago

Hi, I get this error just by selecting certain torrents. It seems to be consistent, every time I select one of the problem torrents, it shows this error, and then the app quits. I'm on MacOS 14.5, transgui 5.18.4.f.

One torrent that triggers the issue is /description.php?id=7689899 on TPB.

Screenshot 2024-06-29 at 3 29 40 PM
lighterowl commented 3 months ago

https://github.com/transmission-remote-gui/transgui/issues/913 https://github.com/transmission-remote-gui/transgui/issues/1364 https://github.com/transmission-remote-gui/transgui/issues/1459 (closed, but only because it stopped happening at literally every run)

lighterowl commented 2 months ago

The changes I made today (in https://github.com/lighterowl/transgui/commit/438ccb831ce38a6b1b4aed596b890c32c8dda7ee) should make this go away but I wouldn't dare to call this "fixed" as the root cause is still there. I just made the call that triggers this exception wrapped in a "swallow everything" block. At worst, some UI will be broken (i.e. badly sized) but at least the app won't just stop outright for no reason. You can grab the last build from develop for testing if you want to try it out.

The root cause is all the autosizing hacks whose purpose I just can't figure out and at the same time cannot remove because the UI breaks completely without them.

lighterowl commented 1 month ago

I decided to bite the bullet and get rid of BaseForm completely, so this should not be a problem as of the next release (5.18.6).