Project

General

Profile

Actions

Support Request #14042

closed

Quotation marks lost in launch()

Added by hidden almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Customer:
BOSCH
Department:
Requester's Priority:
Normal
Support Level:
3rd Level
Resolution:
Workaround Available

Description

Supportanfrage

In ADTF 3.11 there seems to be a bug regarding escaping of quotation marks in the launch() method in QML scripts used for custom filter editor context
menu entries.

It's not possible to escape quotation marks inside the command line arguments anymore. In the previously tested version ADTF 3.8, it was possible to escape a quotation mark with a backslash, e.g. \"

We have these quotation marks, as we transport the filter configuration as JSON formatted string to our application. For example:

launch('myprogram.exe' '-params "{\"filename\":\"myfile.adtfdat\"}"');

But in ADTF 3.11 the command line arguments reach myprogram.exe as

-params

and

{\filename\:\myfile.adtfdat\}

that is the escaped quotation marks in the second argument are completely lost leaving only backslashes. Thus JSON parsing fails in our application. We want to avoid that a have to change the way how we transport the data via the command line.

Since the escaping was working previously, is this a bug that can be fixed?

Is there another way to escape quotation marks for the "launch()" method?

Lösung

We opened a bug issue within the product:
  • [ACORE-11019] - Launch within QML Filter Editor does not escape anymore

This will be fixed in upcoming version (3.12.1 or 3.13.0)

For a workaround, you can use

modelmanager.Launch(QString strQPath, QString strQArguments, QString strQWorkspace, bool bModal = tTrue)

In short, you only need the prefix "modelmanager.".

See also https://support.digitalwerk.net/projects/download-center/wiki/FAQ's#Q-Launch-within-QML-Filter-Editor-does-not-escape-qutotation-marks-since-ADTF-311

Actions #1

Updated by hidden almost 3 years ago

  • Status changed from New to In Progress
  • Customer set to BOSCH
Actions #2

Updated by hidden almost 3 years ago

  • Topic set to ADTF::Scripting
Actions #3

Updated by hidden almost 3 years ago

  • Topic deleted (ADTF::Scripting)
Actions #5

Updated by hidden almost 3 years ago

Hi!

any update here? This is a blocker now for us!

BR Bane

Actions #6

Updated by hidden almost 3 years ago

  • Support Level changed from 2nd Level to 3rd Level

Sebastian, please have a look on that tomorrow

Actions #7

Updated by hidden almost 3 years ago

Hello Nicola,

sorry for the late answer and it seems you are right. There was a change in the "Launch" method, which prevents the use case of escaping. Until we have fixed this bug I can give you an alternative method which is hidden in the ConfigurationEditor. This method is equal to the old version of Launch. To use the function, just replace your call with:

modelmanager.Launch(QString strQPath, QString strQArguments, QString strQWorkspace, bool bModal = tTrue)

In short, you only need the prefix "modelmanager.".

Can you give feedback if the workaround is sufficient for you,

Regards,
Sebastian

Actions #8

Updated by hidden almost 3 years ago

  • Product Issue Numbers set to ACORE-11019
Actions #9

Updated by hidden almost 3 years ago

Hello Sebastian,

thanks, that works. Please let us know when the bug is fixed.

Best regards
Nicola

Actions #10

Updated by hidden almost 3 years ago

  • Project changed from 5 to Public Support
  • Description updated (diff)
  • Status changed from In Progress to To Be Closed
  • Topic set to ADTF::CE
  • Resolution set to Workaround Available
  • Product Issue Numbers changed from ACORE-11019 to https://www.cip.audi.de/jira/browse/ACORE-11019
  • FAQ Links set to https://support.digitalwerk.net/projects/download-center/wiki/FAQ's#Q-Launch-within-QML-Filter-Editor-does-not-escape-qutotation-marks-since-ADTF-311

Hi Nicola,

this will be fixed in upcoming version (3.12.1 or 3.13.0), depends on other bug reports regarding a patch version.

Actions #11

Updated by hidden almost 3 years ago

  • Status changed from To Be Closed to Closed
Actions

Also available in: Atom PDF