Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception when disabling a filter where there exists a duplicate filter #389

Open
DanielJochem opened this issue Jul 22, 2024 · 0 comments
Labels
a:bug Something isn't working in:filters Filters
Milestone

Comments

@DanielJochem
Copy link

Version: AndLogView 0.23-SNAPSHOT (rev f808348)
(I am unsure if other versions are affected as I have not tested)

When there is a filter that has a duplicate, an Unhandled Exception message is shown when trying to disable the duplicate when it's original is already disabled (unsure if the same behavior would occur when enabling the duplicate filter instead). The full log is shown below:

2024-07-22 11:06:05,933 [main] INFO  andlogview.Main - AndLogView 0.23-SNAPSHOT (rev f80834881e10666637aebeba4d8c1fdd6dba5b87)
2024-07-22 11:06:05,933 [main] INFO  andlogview.Main - Revision f80834881e10666637aebeba4d8c1fdd6dba5b87
2024-07-22 11:06:06,996 [file-thread-0] INFO  device.AdbServerImpl - Starting ADB server
2024-07-22 11:06:07,776 [AWT-EventQueue-0] INFO  device.AdbServicesBridge - Initialized adb server in 804ms
2024-07-22 11:06:52,707 [AWT-EventQueue-0] ERROR andlogview.Main - Uncaught exception in AWT-EventQueue-0
java.lang.IllegalArgumentException: Filter FilterFromDialogImpl{enabled=false, data=FilterFromDialogData{mode=HIDE, tags=[PxrCompositor], messagePattern=null, pids=null, apps=null, priority=null, highlightColor=null}} is already in the model
	at name.mlopatkin.andlogview.filters.FilterModelImpl.replaceFilter(FilterModelImpl.java:73)
	at name.mlopatkin.andlogview.ui.filters.BaseFilterPresenter.setEnabled(BaseFilterPresenter.java:46)
	at name.mlopatkin.andlogview.ui.filters.FilterPanelModelAdapter.setFilterEnabled(FilterPanelModelAdapter.java:75)
	at name.mlopatkin.andlogview.ui.filters.FilterPanelModelAdapter.setFilterEnabled(FilterPanelModelAdapter.java:33)
	at name.mlopatkin.andlogview.ui.filterpanel.FilterPanel$FilterButton.actionPerformed(FilterPanel.java:178)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:411)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385)
	at java.desktop/java.awt.Component.processEvent(Component.java:6422)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4969)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4583)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4524)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2809)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:794)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:766)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:764)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:763)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

I was not aware that I had a duplicate filter, but now that I know I do, I have deleted the duplicate and it does not crash anymore.

Some other information that is unlikely useful and may just be a coincidence, but adding it here just in case:

  • There were two separate filters that had a duplicate of them, and the original filter of both were sitting right next to each other in the list, their duplicates were at random other locations down the list of filters
  • The original filters were both disabled and the duplicate filters were both enabled, and disabling either one of the duplicates would produce this Unhandled Exception

In a way, this is related to issue #372 but is not silent

@mlopatkin mlopatkin added a:bug Something isn't working in:filters Filters labels Dec 19, 2024
@mlopatkin mlopatkin added this to the 0.23 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug Something isn't working in:filters Filters
Projects
None yet
Development

No branches or pull requests

2 participants