Bug 63862 - Search Dialog / Search in View Results Tree: Uncaught exception if regex is checked and regex is invalid
Summary: Search Dialog / Search in View Results Tree: Uncaught exception if regex is c...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.1.1
Hardware: All All
: P2 normal (vote)
Target Milestone: JMETER_5.2
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2019-10-17 19:37 UTC by Philippe Mouawad
Modified: 2019-10-17 19:42 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2019-10-17 19:37:12 UTC
Open search dialog
Check Regex and enter ${test}

Nothing happens in UI:
- the search button remains clicked 
- you get in console:

Uncaught Exception java.util.regex.PatternSyntaxException: Illegal repetition near index 0
${test}
^. See log file for details.

- and you get a stacktrace in logs:

2019-10-17 21:34:40,362 ERROR o.a.j.JMeter: Uncaught exception: 
java.util.regex.PatternSyntaxException: Illegal repetition near index 0
${test}
^
	at java.util.regex.Pattern.error(Pattern.java:1957) ~[?:1.8.0_201]
	at java.util.regex.Pattern.closure(Pattern.java:3159) ~[?:1.8.0_201]
	at java.util.regex.Pattern.sequence(Pattern.java:2136) ~[?:1.8.0_201]
	at java.util.regex.Pattern.expr(Pattern.java:1998) ~[?:1.8.0_201]
	at java.util.regex.Pattern.compile(Pattern.java:1698) ~[?:1.8.0_201]
	at java.util.regex.Pattern.<init>(Pattern.java:1351) ~[?:1.8.0_201]
	at java.util.regex.Pattern.compile(Pattern.java:1028) ~[?:1.8.0_201]
	at org.apache.jmeter.gui.action.RegexpSearcher.<init>(RegexpSearcher.java:44) ~[ApacheJMeter_core.jar:5.2]
	at org.apache.jmeter.gui.action.SearchTreeDialog.createSearcher(SearchTreeDialog.java:359) ~[ApacheJMeter_core.jar:5.2]
	at org.apache.jmeter.gui.action.SearchTreeDialog.doSearch(SearchTreeDialog.java:335) ~[ApacheJMeter_core.jar:5.2]
	at org.apache.jmeter.gui.action.SearchTreeDialog.actionPerformed(SearchTreeDialog.java:248) ~[ApacheJMeter_core.jar:5.2]
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) ~[?:1.8.0_201]
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) ~[?:1.8.0_201]
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) ~[?:1.8.0_201]
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) ~[?:1.8.0_201]
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) ~[?:1.8.0_201]
	at java.awt.Component.processMouseEvent(Component.java:6539) ~[?:1.8.0_201]
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) ~[?:1.8.0_201]
	at java.awt.Component.processEvent(Component.java:6304) ~[?:1.8.0_201]
	at java.awt.Container.processEvent(Container.java:2239) ~[?:1.8.0_201]
	at java.awt.Component.dispatchEventImpl(Component.java:4889) ~[?:1.8.0_201]
	at java.awt.Container.dispatchEventImpl(Container.java:2297) ~[?:1.8.0_201]
	at java.awt.Component.dispatchEvent(Component.java:4711) ~[?:1.8.0_201]
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) ~[?:1.8.0_201]
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) ~[?:1.8.0_201]
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) ~[?:1.8.0_201]
	at java.awt.Container.dispatchEventImpl(Container.java:2283) ~[?:1.8.0_201]
	at java.awt.Window.dispatchEventImpl(Window.java:2746) ~[?:1.8.0_201]
	at java.awt.Component.dispatchEvent(Component.java:4711) ~[?:1.8.0_201]
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) ~[?:1.8.0_201]
	at java.awt.EventQueue.access$500(EventQueue.java:97) ~[?:1.8.0_201]
	at java.awt.EventQueue$3.run(EventQueue.java:709) ~[?:1.8.0_201]
	at java.awt.EventQueue$3.run(EventQueue.java:703) ~[?:1.8.0_201]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_201]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) ~[?:1.8.0_201]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) ~[?:1.8.0_201]
	at java.awt.EventQueue$4.run(EventQueue.java:733) ~[?:1.8.0_201]
	at java.awt.EventQueue$4.run(EventQueue.java:731) ~[?:1.8.0_201]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_201]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) ~[?:1.8.0_201]
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) ~[?:1.8.0_201]
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) [?:1.8.0_201]
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_201]
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_201]
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_201]
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_201]
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_201]
Comment 1 Philippe Mouawad 2019-10-17 19:42:38 UTC
This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 27bb77a  Bug 63862 Search Dialog / Search in View Results Tree: Uncaught exception if regex is checked and regex is invalid
27bb77a is described below

commit 27bb77a5fee2143e8e9cff3f2f132e20dbfddf20
Author: pmouawad <p.mouawad@ubik-ingenierie.com>
AuthorDate: Thu Oct 17 21:41:45 2019 +0200

    Bug 63862 Search Dialog / Search in View Results Tree: Uncaught
    exception if regex is checked and regex is invalid
---
 .../apache/jmeter/visualizers/SearchTreePanel.java  |  2 +-
 .../apache/jmeter/gui/action/RawTextSearcher.java   |  5 +++++
 .../apache/jmeter/gui/action/RegexpSearcher.java    | 21 +++++++++++++--------
 3 files changed, 19 insertions(+), 9 deletions(-)