• 16.04.2024, 15:22
  • Registrieren
  • Anmelden
  • Sie sind nicht angemeldet.

 

AquaSuite crashing on XML code change

Dienstag, 31. Januar 2023, 05:56

Firstly, I know I did a stupid thing. That's what happens when you've worked a night shift then decide to change something on your computer.

I wouldn't mind knowing if there's a way to fix this that doesn't loose all but the last change of my Aquasite pages.

First step was to create a software sensor to report the max speed of all my CPU cores, in GHz.

I added a small control to show the max speed of the CPU cores in my overview page called "Quadro". I wasn't happy as the control shows frequency to the nearest whole number.

stupidly I tried modifying the xml code to show one decimal point, by editing the xml directly. There is no way in the control settings to edit this outside of the XML tab of the control. The check code button reported no errors, but when I pressed "OK" in the dialog and went back to the main page, the control changed to all red, no information was displayed and then a short time later the software crashed.
Now, whenever I go to that overview page, the software crashes. I assume I made a mistake in the XML code which wasn't picked up by the code checking. Unfortunately I can't get into the code to post it as the software crashes shortly after opening the "Quadro" overview page.

Is there a way to get into the xml of the control I changed and change it back without starting the aquasuite software?
And yes, I know I should have created a backup of the page before making changes, and would have if I hadn't have finished a night shift this morning and not slept properly yet.

I'm using X.51 if that makes a difference. I've had a quick search of this forum and haven't found an English page that seems to explain this issue.


Thanks for helping a stupid, tired idiot! :S

Trev

Dienstag, 31. Januar 2023, 07:32

You have to delete this Page.
When you work with Custom items. Edit the element on a new page and if everything works, copy it to the final page.

Mittwoch, 1. Februar 2023, 02:49

With a full nights rest I work out a fix.

I exported the page, then edited the resultant .page document in a text editor to change back the xml code I initially changed.

Then I imported the page into a new Overview page and after checking that it worked, I deleted the old one.


Any ideas on how to edit the control's xml code to add two decimal points? The relevant code (I think!) is this:


<TextBlock
FontSize="24"
HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource UnitConverter}" ConverterParameter="0">
<Binding ElementName="this" Path="DataContext.Data"/>
<Binding ElementName="this" Path="DataContext.Data.v"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>

Just not sure how to change the xml code to add decimal points and a quick search doesn't find an explaination of the UnitConverter resource.

Mittwoch, 1. Februar 2023, 15:53

Try to add

<Binding.StringFormat>
{}{0:0.00}
</Binding.StringFormat>

after End of the Multibinding block

Made XAML Change to Auto-loaded Page

Donnerstag, 9. Februar 2023, 15:57

Hello,
I had a similar experience. I made an XAML change on a page which was set to load automatically. The XAML code-check was fine, but AquaSuite would just disappear when I activated the code. Restarts of AquaSuite would of course then fail, too.

Fortunately, I tried something that worked. Immediately after AquaSuite came up I selected a different page manually and that intercepted and stopped the automatic load of the failing page. I was then able to proceed to fix the change to the XAML code.

Freitag, 24. Februar 2023, 01:59

Hi Stephan,

Do you mean like this code? (attachment CodeBlock.jpg)
I can't get the code block in the forum to work properly, it doesn't line space properly and deletes parts of the code. Sorry.
If it's important, I've spaced across for the indentations, because I couldn't get the tabs into the code block, it would just switch the control focus.


When I check syntax, I get a number of errors: (attachment Check Code.jpg)


apologies for the snip, it's the quickest way I could think of to get the dialog info into the post. I've been caught up at work and therefore a little tardy with trying this code on my machine.

It appears to be an error on the line, and I'm not familiar in XML in any way. (R, Python, C, 6800 ASM, + many other 'old school' langs I've used, just not the new ones!)
Thanks for your help,
Trev
»BigTrev« hat folgende Dateien angehängt:
  • CodeBlock.jpg (96,56 kB - 39 mal heruntergeladen - zuletzt: 8. März 2024, 04:11)
  • Check Code.jpg (28,93 kB - 32 mal heruntergeladen - zuletzt: 11. April 2024, 20:30)

Freitag, 24. Februar 2023, 07:27

Any ideas on how to edit the control's xml code to add two decimal points? The relevant code (I think!) is this:
ConverterParameter="2"


Sets the Parameter to 2 == 2 decimal places.





StringFormat is not working when you use an converter.

Mittwoch, 15. März 2023, 00:25

Thanks,

That fixed it!

Trevor