Bug Hunting Session
Bug 128010 - 'JRE Required' message pops up when assigning BASIC Macro to customized menu.
Summary: 'JRE Required' message pops up when assigning BASIC Macro to customized menu.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.4.0 target:6.3.4
Keywords:
Depends on: 128004
Blocks: Macro-UI
  Show dependency treegraph
 
Reported: 2019-10-08 06:21 UTC by Nukool Chompuparn
Modified: 2019-11-12 14:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
All numbers are step 1 - 7. (215.51 KB, image/jpeg)
2019-10-08 06:23 UTC, Nukool Chompuparn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nukool Chompuparn 2019-10-08 06:21:40 UTC
Description:
As shown in Summary, but can continue after closing such message box.

Steps to Reproduce:
1. Menu bar | Tools > Customize
2. Menus Tab | Scope > xxxxx.ods
3. Menus Tab | the button next to the listbox of Target > Add
4. New menu pop up | Menu name > New Menu 1 > ok
5. Menus tab | Category > Macros

Actual Results:
'JRE Required' message pops up.

Expected Results:
No 'JRE Required' message pops up


Reproducible: Always


User Profile Reset: No



Additional Info:
Closing such message box, all can be continued smoothly. 
And please see an image attached to the attachment.
Comment 1 Nukool Chompuparn 2019-10-08 06:23:07 UTC
Created attachment 154815 [details]
All numbers are step 1 - 7.
Comment 2 Mike Kaganski 2019-10-08 12:45:48 UTC
Currently blocked by tdf#128004
Comment 3 himajin100000 2019-10-14 06:46:30 UTC
Some script providers rely on Java on its initialization.

https://opengrok.libreoffice.org/xref/core/scripting/java/

Selecting "Macros" tries to display scripts in ALL languages, including ones provided by the script providers above.(ProviderCache::populateCache())


cf.

https://opengrok.libreoffice.org/xref/core/cui/source/dialogs/scriptdlg.cxx?r=51fa45c8#257
Comment 4 Mike Kaganski 2019-10-14 07:22:54 UTC
(In reply to himajin100000 from comment #3)
> Some script providers rely on Java on its initialization.

Agree; yet it's not useful to re-ask user every time if user's decision to disable Java is OK or not.

Compare two scenarios:

A.
0. User disables Java
1. User loads an extension (say, LanguageTool)
2. The extension needs Java to work, and tries to run some Java code
3. User gets a proper warning, because the user's intention to run the extension (internally, run the specific piece of Java code) contradicts with "disable Java" setting.

B.
0. User disables Java
1. User opens macros list when assigning them to customized menu
2. User does not see Java macros there, because UI follows the user setting.

IMO, the B. is absolutely fine, and doesn't lead to confusion. If user needs to see Java code that isn't already used somewhere (which usage would already warn, as in A.), then it's OK to expect user to enable Java to see them, not to nag user every time LO lists available providers.
Comment 5 Xisco Faulí 2019-11-08 10:16:17 UTC
Moving to NEW
Comment 6 Mike Kaganski 2019-11-09 12:19:37 UTC
https://gerrit.libreoffice.org/82353
Comment 7 Commit Notification 2019-11-09 16:03:24 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ebccc375248faebdfbca273b149483593c753387

tdf#128010: Don't ask to enable JRE when populating available scripts

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-11-11 21:33:54 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/3cb7c012dd47f6feed748c15ec94c310e2ceb181

tdf#128010: Don't ask to enable JRE when populating available scripts

It will be available in 6.3.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.