asterics / AsTeRICS

The Assistive Technology Rapid Integration & Construction Set

Home Page:http://www.asterics.eu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ACS crash when opening model

ChrisVeigl opened this issue · comments

just found a very strange bug in the ACS: when opening certain models, e.g.:
https://github.com/asterics/AsTeRICS/blob/master/bin/ARE/models/useCaseDemos/mouseControl/crosshairCursorControl_1key.acs

the ACS crashes with attached error message:

ScreenHunter 46

This does not happen every time, and not on every computer (i have it repeatably on my Desktop PC with a large screen - maybe related to the problem)...

This does not happen in the WebACS.

Strange, never happened to me.
I think this is the code of interest:
https://github.com/asterics/AsTeRICS/blob/master/ACS/ACS/MainWindow.xaml.cs#L6041

dockEventGrid.Width = dockableComponentProperties.ContainerPane.ActualWidth - 15;
If ContainerPane.ActualWidth is 0, the result width is -15, which is stated in the error message. No idea what the exact meaning is or why ContainerPane.ActualWidth is 0 sometimes.

thanks for having a look!
could we catch that exception - so that we prevent the ACS from crashing completely ... ?
I have no idea how often (or in which system constellation) the problem occurs - but if it happens, the model can't be used with the ACS at all ...

Yeah, would make sense to catch the exception or to prevent it by using a default value if 0 is returned. However I've no clue what this code is actually doing, this should be investigated before changing something here.