Jump to content
  • 0

Waveforms BUG: Undocked widget contents are NOT saved to workspace (logger script contents lost!)


towen

Question

Hi,

I discovered a really nasty bug in WaveForms today, it caused me to lose 1.5 days of work.

Version: 3.19.5 (Raspberry Pi)

Bug description: The contents of a widget (such as the scope logger script editor) are NOT saved to the workspace if the widget is undocked from the main window. So I had a particularly large scope logger script, for which I needed to undock the script editor. I made sure to save my workspace often.

Little did I know, when I saved the workspace with the logger un-docked, my work was erased from the save file. I should have saved the script separately, but I thought I was safe with the workspace.

Steps to reproduce:

Normal operation: Open a workspace, add a comment to the default logger script, close and save workspace, re-open workspace: Modified script is still there.

BUGGED operation: Open a workspace, add a comment to the default logger script, UN-Dock the logger from the main-window by dragging its border, close and save workspace, re-open workspace: Modified script is GONE - it has reverted to default.

I wish there was a way to get my work back, sadly not.

Edited by towen
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi, thanks. 

Unfortunately there is no such file in the extracted files. 😢

I also notice an error in the console: 

QMainWindow::saveState(): 'objectName' not set for QDockWidget 0x304d5c0 'Logging;

I also couldn't produce it with a blank workspace - It seems to be a problem with the workspace I was using, so I have sent that to you by PM 

The logger only fails to save when it is un-docked.

Link to comment
Share on other sites

  • 0

Thanks @attila although as I mentioned, i'm running waveforms on a Raspberry Pi - is there any chance you could compile the beta release for the Arm platform?

Also - I am trying to work around the bug by defining a function in the script tab, and then calling it from the scope logger tab instead of writing a large amount of code in the logger itself. Unfortunately the logging script can't find the function that I defined in the script tab. Do you know if there's any way to call the function from the scope logging tool, or perhaps instead to add a callback to the scope trigger event from the script tab?

edit: Nevermind I have found a solution, to loop on the Scope.wait function i.e.

while(Scope.wait())
  LogScope();

Although adding a callback would be nicer, as it frees up the script to do other stuff.

Edited by towen
Found a solution
Link to comment
Share on other sites

  • 0

Hi @towen

Adding arm64 and armhf. Sorry, I forgot you need this.

There is a way for callback but I don't know how to disconnect it, except restarting the app. This is why the Sig#nals are not document and don't show up in code completion.
Running the following script will register the callback, so the function will be called even if the Script is not running. Consequent runs will register additional callbacks.

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...