ho-dev / HattrickOrganizer

Assistant for Hattrick online football manager
https://ho-dev.github.io/HattrickOrganizer/
GNU Lesser General Public License v3.0
195 stars 79 forks source link

[eBUG] MatchesOverview NPE #396

Closed wsbrenk closed 4 years ago

wsbrenk commented 4 years ago

From the HO Forum:

Hello

When I try to open 'Matches' tab HO 2.1 returns an error 'java.lang.NullPointerException'. I works on Ubuntu 18.04.4 LTS and have Java in the latest version. matcherOverview

wsbrenk commented 4 years ago

today i got this, when starting ho r2644

java.lang.NullPointerException at core.model.match.MatchStatistics.isOldie(MatchStatistics.java:329) at core.model.match.MatchStatistics.(MatchStatistics.java:22) at core.training.TrainingPreviewPlayers.getMatchesForTraining(TrainingPreviewPlayers.java:249) at core.training.TrainingPreviewPlayers.calculateWeeklyTrainingForPlayer(TrainingPreviewPlayers.java:142) at core.training.TrainingPreviewPlayers.getTrainPreviewPlayer(TrainingPreviewPlayers.java:76) at core.gui.comp.entry.SpielerLabelEntry.updateDisplay(SpielerLabelEntry.java:403) at core.gui.comp.entry.SpielerLabelEntry.createComponent(SpielerLabelEntry.java:296) at core.gui.comp.entry.SpielerLabelEntry.(SpielerLabelEntry.java:73) at core.gui.model.UserColumnFactory$14.getTableEntry(UserColumnFactory.java:277) at core.gui.model.PlayerOverviewModel.initData(PlayerOverviewModel.java:163) at core.gui.model.PlayerOverviewModel.setValues(PlayerOverviewModel.java:89) at module.playerOverview.PlayerOverviewTable.initModel(PlayerOverviewTable.java:144) at module.playerOverview.PlayerOverviewTable.(PlayerOverviewTable.java:33) at module.playerOverview.SpielerUebersichtsPanel.initSpielerTabelle(SpielerUebersichtsPanel.java:186) at module.playerOverview.SpielerUebersichtsPanel.initComponents(SpielerUebersichtsPanel.java:118) at module.playerOverview.SpielerUebersichtsPanel.(SpielerUebersichtsPanel.java:43) at module.playerOverview.PlayerOverviewModule.createTabPanel(PlayerOverviewModule.java:30) at core.gui.comp.tabbedPane.HOTabbedPane.showTab(HOTabbedPane.java:38) at core.gui.HOMainFrame.initComponents(HOMainFrame.java:500) at core.gui.HOMainFrame.(HOMainFrame.java:190) at core.gui.HOMainFrame.instance(HOMainFrame.java:284) at core.HO$1.run(HO.java:225) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

wsbrenk commented 4 years ago

It looks like a matchlineupTeam was not found in the database.

Effey09 commented 4 years ago

could you please copy the error message you got to the github ticket (https://github.com/akasolace/HO/issues/396)

So I will do here: java.lang.NullPointerException at core.model.match.MatchEvent.isSE(MatchEvent.java:897) at core.model.match.MatchEvent.isSpecialtyNonWeatherSE(MatchEvent.java:921) at module.specialEvents.SpecialEventsDM.getEventType(SpecialEventsDM.java:186) at module.specialEvents.SpecialEventsDM.checkForSE(SpecialEventsDM.java:196) at module.specialEvents.SpecialEventsDM.getMatchHighlights(SpecialEventsDM.java:161) at module.specialEvents.SpecialEventsDM.getMatchRows(SpecialEventsDM.java:118) at module.specialEvents.SpecialEventsDM.getRows(SpecialEventsDM.java:35) at module.specialEvents.SpecialEventsPanel.setTableData(SpecialEventsPanel.java:163) at module.specialEvents.SpecialEventsPanel.update(SpecialEventsPanel.java:57) at core.gui.comp.panel.LazyImagePanel.callUpdate(LazyImagePanel.java:155) at core.gui.comp.panel.LazyImagePanel.setNeedsRefresh(LazyImagePanel.java:104) at module.specialEvents.SpecialEventsPanel.initialize(SpecialEventsPanel.java:52) at core.gui.comp.panel.LazyImagePanel.callInitialize(LazyImagePanel.java:145) at core.gui.comp.panel.LazyImagePanel.access$300(LazyImagePanel.java:13) at core.gui.comp.panel.LazyImagePanel$2.hierarchyChanged(LazyImagePanel.java:132) at java.awt.Component.processHierarchyEvent(Component.java:6706) at java.awt.Component.processEvent(Component.java:6325) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.Component.createHierarchyEvents(Component.java:5555) at java.awt.Container.createHierarchyEvents(Container.java:1448) at java.awt.Component.show(Component.java:1639) at java.awt.Component.show(Component.java:1671) at java.awt.Component.setVisible(Component.java:1623) at javax.swing.JComponent.setVisible(JComponent.java:2644) at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:394) at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:270) at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:132) at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:67) at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:616) at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:591) at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(BasicTabbedPaneUI.java:3647) at javax.swing.plaf.synth.SynthTabbedPaneUI$1.mousePressed(SynthTabbedPaneUI.java:312) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.Component.processMouseEvent(Component.java:6536) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

wsbrenk commented 4 years ago

@akasolace It looks like Effey09 is suffering from an unknown MatchEventId. I tried a fix that I pushed into the current pr. please have a look on it.

wsbrenk commented 4 years ago

today i found another bug which stops the download of match data if there is a match with verlegenheitstruppe in the list. maybe this may cause some consequential errors;-(

@akasolace the fix is in the current pull request

wsbrenk commented 4 years ago

java.lang.NullPointerException at module.lineup.Lineup.UpdateLineupWithMatchOrder(Lineup.java:1998) at core.rating.RatingPredictionManager.setLineupEvolution(RatingPredictionManager.java:191) at core.rating.RatingPredictionManager.(RatingPredictionManager.java:114) at core.rating.RatingPredictionManager.(RatingPredictionManager.java:119) at module.lineup.Lineup.setRatings(Lineup.java:552) at module.lineup.substitution.SubstitutionEditView.RatingRecalc(SubstitutionEditView.java:235) at module.lineup.substitution.SubstitutionEditView$2.propertyChange(SubstitutionEditView.java:264) at java.beans.PropertyChangeSupport.fire(Unknown Source) at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source) at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source) at java.awt.Component.firePropertyChange(Unknown Source) at javax.swing.JFormattedTextField.setValue(Unknown Source) at javax.swing.JFormattedTextField.setValue(Unknown Source) at module.lineup.substitution.SubstitutionEditView$1.stateChanged(SubstitutionEditView.java:247) at javax.swing.JSlider.fireStateChanged(Unknown Source) at javax.swing.JSlider$ModelListener.stateChanged(Unknown Source) at javax.swing.DefaultBoundedRangeModel.fireStateChanged(Unknown Source) at javax.swing.DefaultBoundedRangeModel.setRangeProperties(Unknown Source) at javax.swing.DefaultBoundedRangeModel.setValue(Unknown Source) at javax.swing.JSlider.setValue(Unknown Source) at javax.swing.plaf.synth.SynthSliderUI$SynthTrackListener.mouseDragged(Unknown Source) at java.awt.Component.processMouseMotionEvent(Unknown Source) at javax.swing.JComponent.processMouseMotionEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(Unknown Source) at java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at module.lineup.substitution.SubstitutionOverview.doNewOrder(SubstitutionOverview.java:287) at module.lineup.substitution.SubstitutionOverview.access$700(SubstitutionOverview.java:57) at module.lineup.substitution.SubstitutionOverview$SubstitutionAction.actionPerformed(SubstitutionOverview.java:594) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

wsbrenk commented 4 years ago

npe position swap of player which is no longer in lineup. fix is in current pull request.

akasolace commented 4 years ago

@akasolace It looks like Effey09 is suffering from an unknown MatchEventId. I tried a fix that I pushed into the current pr. please have a look on it.

@wsbrenk Can you please give me the matchID in which this issue is raised?

akasolace commented 4 years ago

@wsbrenk If I understand correctly (sorry just back from holliday) but this is fixed by 699a604 (your latest PR) but a long term solution is to map the matcheventID, right ?

wsbrenk commented 4 years ago

@akasolace I'm glad to see you back. I hope you had a nice break. at first i thought that these messages would refer to the same origin. it is not so. i think we have to decide if we want to patch release 2.1 or fix everything in version 3. in the first case we have to sort my fixes again accordingly.

Can you please give me the matchID in which this issue is raised?

of course! i think there were two or three ids in the matches i tested. if you have a look at my proposed fix, there should be an easy way to log the unknown event ids.

If I understand correctly (sorry just back from holliday) but this is fixed by 699a604 (your latest PR) but a long term solution is to map the matcheventID, right ?

concerning the two first npes i'm not sure. could be, that they are followings errors of the other but even the first one, you should have a look on it. it is a complex join query of match event ids which deliver a null result set.

wsbrenk commented 4 years ago

@akasolace i added the log. it gives this output:

[Debug] MatchEventID: UNKNOWN_MATCHEVENT: 803 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 497 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 804 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 803 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 497 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 804 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 496 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 496 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 497 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 497 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 803 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 803 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 802 [Debug] MatchEventID: UNKNOWN_MATCHEVENT: 550

wsbrenk commented 4 years ago

since the hts could come up with new event ids whenever they want, we should stay with an UNKNOWN_MATCHEVENT. additionally we should map the ids we found. do not know if anyone of the given numbers would be a candidate to skip the isSE function.

akasolace commented 4 years ago

@wsbrenk ok I see, indeed we should clearly stay with an UNKNOWN_MATCHEVENT

I am supprised by the UNKNOWN_MATCHEVENT: 550 because this one is not even referenced in the API documentation, otherwise I will map the other events

I guess, this would justify a 2.2 release

akasolace commented 4 years ago

@wsbrenk do you have by anychance a database with those problematic matchID, personally I do not have any ... I am especially interested in the matchEventID 550.

wsbrenk commented 4 years ago

i did shorten the log, there were approx 100 more lines with only 550. no idea what that is, maybe an ancient id which is not used anymore??

grafik

wsbrenk commented 4 years ago

grafik

wsbrenk commented 4 years ago

as i joined with matchdetails i found that they all happened between 2008 and 2012

akasolace commented 4 years ago

@wsbrenk ok then indeed I guess it is an anicen matchID. For curiosity if you can find / provide one of those matchID (I mean one of the game in which MATCHID 550 happened). I would like to see how HT match it now ? is it still 550 or maybe it was an error within HO at the time.

wsbrenk commented 4 years ago

I guess, this would justify a 2.2 release

I confirm that, but then we have to pick out the commits that have nothing to do with the current merge for version 3.0.

akasolace commented 4 years ago

from 699a60490b442d6c1b9fd01c248092452d22e94c I will pick change made to src/main/java/core/model/match/MatchEvent.java and change made to src/main/java/core/net/OnlineWorker.java, right ?

wsbrenk commented 4 years ago

https://www.hattrick.org/Club/Matches/Match.aspx?matchID=269417699&SourceSystem=Hattrick

akasolace commented 4 years ago

https://www.hattrick.org/Club/Matches/Match.aspx?matchID=269417699&SourceSystem=Hattrick

@wsbrenk There is no matchEvent 550 in that game .... hence, it was an HO error, at which minute do you have it in your database ?

wsbrenk commented 4 years ago

minute 134, i think the 550er were replaced by other ids and ho didn't replace them

wsbrenk commented 4 years ago

from 699a604 I will pick change made to src/main/java/core/model/match/MatchEvent.java and change made to src/main/java/core/net/OnlineWorker.java, right ?

that's correct!

akasolace commented 4 years ago

minute 134, i think the 550er were replaced by other ids and ho didn't replace them

indeed it is 599 is indicating match finished

I will try to fix this one, ideally it should be by changing matchEventID in the database 550 => 599, that would be one more DB version thought

wsbrenk commented 4 years ago

couldn't it be the ratings of the best and worst players. i think there were more than one 550er per match and the attributes would better fit to it than end of match.

wsbrenk commented 4 years ago

@akasolace concerning the first npe of this ticket, did you check the method fillMatchesOverviewChanceRow if there could still be a npe even if we fix the match_event_ids.

maybe the subtypes could deliver an empty or null string and the sql query gets corrupt (empty IN clause).

akasolace commented 4 years ago

couldn't it be the ratings of the best and worst players. i think there were more than one 550er per match and the attributes would better fit to it than end of match.

ok in doubt I will leave it as is for the time being

akasolace commented 4 years ago

@akasolace concerning the first npe of this ticket, did you check the method fillMatchesOverviewChanceRow if there could still be a npe even if we fix the match_event_ids.

maybe the subtypes could deliver an empty or null string and the sql query gets corrupt (empty IN clause).

I think that method should be fine ..

akasolace commented 4 years ago

@wsbrenk cherry pick from 699a604 changes made to to src/main/java/core/net/OnlineWorker.java (@wsbrenk there is a lot of conflict changes, should I take all Online worker or is there a smaller patch(few lines) I need to integrate, also what exactly download matches of Verlegenheitstruppe 08/15 refers to ? which bug ID?

wsbrenk commented 4 years ago

(@wsbrenk there is a lot of conflict changes,...

@akasolace sorry, my mistake. this change did belong to the feature#299 branch which was merge by you after release 2.1, so you should not merge it to your stable branch. i will correct my comment above.

akasolace commented 4 years ago

@wsbrenk ok

akasolace commented 4 years ago

closed by 699a60490b442d6c1b9fd01c248092452d22e94c and by 61e4592a1c46455a695c50d7d4514e0cefa20645

masher82 commented 4 years ago

I also have the NPE with latest (pre-release) build on MacOS (taken from https://github.com/akasolace/HO/releases) with exactly the same stacktrace.

The precise version is HO_2.2.0.2639_macOS

netmaniac commented 4 years ago

Hi! I have just installed HO-2.2.0.2639 and still get this error in Matches tab. Ubuntu 19.10

java.lang.NullPointerException at core.db.MatchesOverviewQuery.fillMatchesOverviewChanceRow(MatchesOverviewQuery.java:164) at core.db.MatchesOverviewQuery.getChancesStat(MatchesOverviewQuery.java:142) at core.db.DBManager.getChancesStat(DBManager.java:1286) at module.matches.statistics.MatchesHighlightsTable.getValues(MatchesHighlightsTable.java:37) at module.matches.statistics.MatchesHighlightsTable.initModel(MatchesHighlightsTable.java:30) at module.matches.statistics.MatchesHighlightsTable.(MatchesHighlightsTable.java:21) at module.matches.SpielePanel.initSpieleTabelle(SpielePanel.java:590) at module.matches.SpielePanel.initComponents(SpielePanel.java:452) at module.matches.SpielePanel.initialize(SpielePanel.java:113) at core.gui.comp.panel.LazyImagePanel.callInitialize(LazyImagePanel.java:145) at core.gui.comp.panel.LazyImagePanel.access$300(LazyImagePanel.java:13) at core.gui.comp.panel.LazyImagePanel$2.hierarchyChanged(LazyImagePanel.java:132) at java.awt.Component.processHierarchyEvent(Component.java:6706) at java.awt.Component.processEvent(Component.java:6325) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.Component.createHierarchyEvents(Component.java:5555) at java.awt.Container.createHierarchyEvents(Container.java:1448) at java.awt.Component.show(Component.java:1639) at java.awt.Component.show(Component.java:1671) at java.awt.Component.setVisible(Component.java:1623) at javax.swing.JComponent.setVisible(JComponent.java:2644) at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:394) at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:270) at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:132) at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:67) at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:616) at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:591) at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(BasicTabbedPaneUI.java:3647) at javax.swing.plaf.synth.SynthTabbedPaneUI$1.mousePressed(SynthTabbedPaneUI.java:312) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.Component.processMouseEvent(Component.java:6536) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:705) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

akasolace commented 4 years ago

@netmaniac @masher82 can one of you (or both of you even better) share its database ? @wsbrenk do you want to look again at this one because it seems we still have an issue ...

netmaniac commented 4 years ago

@akasolace how to do it?

wsbrenk commented 4 years ago

@akasolace @netmaniac @masher82

in the HO log file should be infos about the sql statement that failed. Could you please check if you find error messages mentioning the class core.db.MatchesOverviewQuery continued by "JDBCAdapter.executeQuery : " + e + "\nStatement: " + Sql + "\n"

would be great if one of you could copy those lines to this ticket.

the log file is found in the hattrick folder under /logs

netmaniac commented 4 years ago

There are many errors in log file (I see that is from one session). I'm attaching whole log file. HO-2020-03-11.zip

wsbrenk commented 4 years ago

great - thank you

and the message is:

22:02:37 [Error] core.db.JDBCAdapter: JDBCAdapter.executeQuery : java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: MATCH_EVENT_ID Statement: SELECT MATCH_EVENT_ID, COUNT(*) AS C FROM MATCHHIGHLIGHTS JOIN MATCHESKURZINFO ON MATCHHIGHLIGHTS.MATCHID = MATCHESKURZINFO.MATCHID WHERE TEAMID=871690 AND MATCH_EVENT_ID IN(104, 114, 124, 134, 154, 164, 174, 184, 204, 214, 224, 234, 254, 264, 274, 284) GROUP BY MATCH_EVENT_ID java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: MATCH_EVENT_ID at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)

wsbrenk commented 4 years ago

other error messages are saying that EVENT_INDEX column is missing too. is there any reason why db update of HO 2.1 is not successfully running on 2.2 installation?

wsbrenk commented 4 years ago

@netmaniac could you please check if the columns MATCH_EVENT_ID and EVENT_INDEX are in your table please select menu Debug -> sql editor enter in the command line: select * from MATCHHIGHLIGHTS and press F5

netmaniac commented 4 years ago

I have migrated on new computer. Installed HO 2.1, imported old .hrf files and got exceptions in Matches tab. So i have installed dev version - the same. Next I have removed ~/.ho directory, started HO dev version, downloaded once from hattrick.org. Still error on Matches tab. I have ran this query, and no results. Screenshot from 2020-03-12 11-09-42

masher82 commented 4 years ago

I also do not have those columns running 2.2.0.2639 on MacOS

matchhighlights
akasolace commented 4 years ago

@akasolace how to do it?

@netmaniac you can either put it here as attachement or share via service like mozilla send ...

masher82 commented 4 years ago

I think the question rather is meant as how to retrieve the database content.

wsbrenk commented 4 years ago

@masher82 @netmaniac could you please enter the following sql command to examine your db version: select * from USERCONFIGURATION where config_key like 'DB%'

netmaniac commented 4 years ago

@wsbrenk I got DBVersion | 26

wsbrenk commented 4 years ago

@akasolace @masher82 @netmaniac i found the error. DbUpdate is OK but the DB-Init not.

akasolace commented 4 years ago

@masher82 @netmaniac can you please check the error has been fixed in HO_2.2.0.2642. thank you