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

Clicking on "Version:" drop down in the "Run On Cloud" presenter causes an AccessViolationException and crashes ApsimNG #9546

Open
zur003 opened this issue Dec 14, 2024 · 1 comment · May be fixed by #9549
Labels
Bug Software An error in the interface or structure of the software

Comments

@zur003
Copy link
Contributor

zur003 commented Dec 14, 2024

What happened?

If the user selects the "Run on cloud" action for a set of simulations, they are presented with a view that should allow them to, among other things, select the version of Apsim to use for the run. Simply clicking on the drop down widget used for selecting the version triggers an access violation and crashes the application.

My testing so far indicates that this is a problem with the DropDownView (which is a wrapper for a Gtk ComboBox) and the length of its selection list. This problem does not occur when the list of versions is truncated to less than 1000 (or so; probably 1024 may be the magic number). However, I have not found anything in the Gtk documentation suggesting that such a limit exists. We currently have a list of around 3000 (!) Apsim versions to be displayed.

The Upgrade dialog can display a similar list of Apsim versions (if one requests that older versions be displayed) without difficulty, but that dialog uses a Gtk TreeView rather than a Gtk ComboBox for display of the list.

What Operating System are you on?

Windows

@zur003 zur003 added Bug Software An error in the interface or structure of the software labels Dec 14, 2024
@zur003
Copy link
Contributor Author

zur003 commented Dec 15, 2024

Running on Ubuntu Linux gives a bit more insight into the problem. It still crashes, but provides these messages:

(ApsimNG:4493): Gdk-WARNING **: 14:21:54.178: Native Windows taller than 65535 pixels are not supported

(ApsimNG:4493): Gdk-CRITICAL **: 14:21:54.639: ../../../gdk/wayland/gdkdisplay-wayland.c:1433: Unable to create Cairo image surface: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Segmentation fault (core dumped)

So it would appear that the long list of entries in the DropDown widget is too long to draw internally. The only "fixes" I can think of are to either (1) limit the number of entries passed to the DropDownView or (2) use a different widget for display of the selectable versions. I think the latter is preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Software An error in the interface or structure of the software
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

1 participant