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

Java exception in International friendly TAB #18

Closed CompTur closed 5 years ago

CompTur commented 5 years ago

When clicking on the TAB, I got the following Java exception. Already tried to reload the international friendly matches, negative result

Thanks a lot

java.lang.NullPointerException at module.ifa.model.IfaModel.createVisitedStatistic(IfaModel.java:159) at module.ifa.model.IfaModel.getVisitedStatistic(IfaModel.java:84) at module.ifa.model.IfaModel.getVistedCountriesCount(IfaModel.java:115) at module.ifa.StatsPanel.setHeaderTexts(StatsPanel.java:208) at module.ifa.StatsPanel.(StatsPanel.java:43) at module.ifa.PluginIfaPanel.initComponents(PluginIfaPanel.java:75) at module.ifa.PluginIfaPanel.initialize(PluginIfaPanel.java:44) at core.gui.comp.panel.LazyPanel.callInitialize(LazyPanel.java:150) at core.gui.comp.panel.LazyPanel.access$300(LazyPanel.java:16) at core.gui.comp.panel.LazyPanel$2.hierarchyChanged(LazyPanel.java:137) at java.awt.Component.processHierarchyEvent(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.Component.createHierarchyEvents(Unknown Source) at java.awt.Container.createHierarchyEvents(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at javax.swing.JComponent.setVisible(Unknown Source) at javax.swing.JTabbedPane.fireStateChanged(Unknown Source) at javax.swing.JTabbedPane$ModelListener.stateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel.fireStateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndex(Unknown Source) at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(Unknown Source) at javax.swing.plaf.synth.SynthTabbedPaneUI$1.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(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)

DavidatorusF commented 5 years ago

a remember for me

From: Compare_Turiddu PostID: [17213262.36] (https://www.hattrick.org/goto.ashx?path=%2FForum%2FRead.aspx%3Ft%3D17213262%26n%3D36%26v%3D0) To: DavidatorusF Re: [17213262.35] (https://www.hattrick.org/goto.ashx?path=%2FForum%2FRead.aspx%3Ft%3D17213262%26n%3D35%26v%3D0) Datetime: 25-11-2018 22:41 Message:

DavidatorusF a écrit :

the new deveopper don't had a look for now at this module but...

try in the menu : Modules-> IFA-> reload all matches

Thanks.

Already done with the old version, just done with the new, but same result

Only for info, following the exception

(in the next post, too long for here)

From: DavidatorusF PostID: [17213262.44] (https://www.hattrick.org/goto.ashx?path=%2FForum%2FRead.aspx%3Ft%3D17213262%26n%3D44%26v%3D0) To: Compare_Turiddu Re: [17213262.43] (https://www.hattrick.org/goto.ashx?path=%2FForum%2FRead.aspx%3Ft%3D17213262%26n%3D43%26v%3D0) Datetime: 25-11-2018 23:40 Message:

Compare_Turiddu a écrit :

DavidatorusF a écrit :

maybe...IFA...

can you try with a fresh install... without your previous db

just for know if it work or not...

Just done

It works.

Loaded all matches (cup, league and friendly) but Tournament matches; of this kind only last month ones.

No problem. I can mantain two separate directories, eventually.

:))

Thanks again

was for now if fresh IFA work...

then the reset (reload all matches) is not perfect...

thanks :p

akasolace commented 5 years ago

@CompTur which version of HO are you using? On which OS ? Do you know if any other user (in the forum) are facing the same issue? ... It is usually difficult to fix bug that I cannot reproduce.

akasolace commented 5 years ago

@DavidatorusF, just saw your message. It is not really clear for me. Is the bug still there or was it fixed by the fresh install of the latest version ?

DavidatorusF commented 5 years ago

@akasolace on fresh 1435 without old db, IFA work

1435 with old db, IFA don't work (as it was on 1434 from Comp tur)

Bingeling did something in the past for reset IFA (Modules ->IFA-> reload all matches) seem the reset is not perfect

akasolace commented 5 years ago

@DavidatorusF

1435 with old db, IFA don't work

what you mean exactly ? I guess you are not talking about the missing flags? The tab crashes under which circumstances? I have an old db and if I click on IFA tab, I have no errors .... Do you know what is special about his db ? He played games with one of those new countries? His team is located in one of those countries ?

akasolace commented 5 years ago

@CompTur

I asked Davidatorus couple of questions in the post above, maybe you can help answering them...

DavidatorusF commented 5 years ago

@akasolace it's a mistake he had since a long time on 1434

nothing to do with new country even if he got one now

akasolace commented 5 years ago

@DavidatorusF , ok so is it really a bug or does it db is corrupted? Do you know if it affects other users?

@CompTur , you confirm you also have the bug with 1.434? Do you had this for a long time or just recently? Do you know what caused it? Finally, could you share your database with me (as a zip file in this thread) ? It seems very specific and I have no idea how to reproduce it so I don't see how to deal with it without starting from the database.

akasolace commented 5 years ago

Bingeling did something in the past for reset IFA (Modules ->IFA-> reload all matches) seem the reset is not perfect

I just looked in SF, I can't see a single commit related to this .... If you have more info, thank you for sharing

DavidatorusF commented 5 years ago

@akasolace at first maybe you can check how the reset is done there was other users with this mistake, only fresh install without old db did the trick bingeling didn't review this module for solve this issue... poor motivation

@CompTur you can also use "firefox send" https://send.firefox.com/ then give the link

akasolace commented 5 years ago

@DavidatorusF ,

ok so if I understand correctly.

  1. It is a bug affecting also 1.434 and which is not related to the newly introduced countries
  2. It affects only some users for which the db is corrupted
  3. the bug is described as the IFA tab is crashing when users with corrupted db try to access it
  4. There is a reset functionality which was supposed to fix that bug but it is not working correctly.
  5. There are no clear patterns of who is experiencing that bug

Is the above correct, am I missing something? It is slightly becoming a real bug report :-)

DavidatorusF commented 5 years ago

@akasolace

https://sourceforge.net/p/ho1/code/2452/ https://sourceforge.net/p/ho1/code/2453/ https://sourceforge.net/p/ho1/code/2455/ https://sourceforge.net/p/ho1/code/2458/ https://sourceforge.net/p/ho1/code/2465/ https://sourceforge.net/p/ho1/code/2466/

akasolace commented 5 years ago

@DavidatorusF

They are commits from 2013 made by blaghaid, I thought you were mentioning some recent work done by Bingeling..

DavidatorusF commented 5 years ago

I though it was more recent

akasolace commented 5 years ago

@DavidatorusF otherwise do you agree with my summary few posts above ?

DavidatorusF commented 5 years ago

@akasolace totally

CompTur commented 5 years ago

@CompTur , you confirm you also have the bug with 1.434? Do you had this for a long time or just recently? Do you know what caused it? Finally, could you share your database with me (as a zip file in this thread) ? It seems very specific and I have no idea how to reproduce it so I don't see how to deal with it without starting from the database.

Hi, sorry for my late, I don't check the email very often I have the problem since many months, I don't remember how much precisely. After I got HTI flags (in April 2017) it worked for many months on this PC, so it doesn't depend on it. But I have any idea about how it arised. I tried to upload db file, but it is about 27 MB, so it has not been uploaded. HO release is 1434_r2696, on Windows 10 - Java 8 Update 121 Using 1435-DEV-5 with the old database the problem remain, even after the cleaning of the international friendly matches With a fresh install, without DB, everithing is working fine.

CompTur commented 5 years ago

https://send.firefox.com/download/95a6607bbd/#fOHeB038XLpLv_RgYYomlQ This is the last db working before I promoted a "support player"

If you want I can send the db for 1435

akasolace commented 5 years ago

@CompTur thank you for sharing the db. If you can I would prefer to have your latest db the one under 1.435, the one if I understand correctly you are currently using, but unde witch you are still experiencing the bug. I will have a look at it later this week. Thank you

akasolace commented 5 years ago

arf I did not use the send link within 24 hours so it expired, could you please send me again your latest database cheers

CompTur commented 5 years ago

the not working db with 1.434 https://send.firefox.com/download/87e0ac07a8/#b_b_4yaFKUN_QJRkr6u15w the not working with 1.435 https://send.firefox.com/download/b1814a9b21/#xu846FEoQVF6bbjcRRVmXw the working one with 1.435 https://send.firefox.com/download/3d38a4deb7/#AK2OZwnGA82Jjxgo6Sad6A

CompTur commented 5 years ago

thanks a lot

akasolace commented 5 years ago

ok I'll have a look this weekend. Can you just tell me the historic of the 3 dbs. I mean how did you ended up with 3 db ? How eventually did you manage to have one db that is working well under 1.435?

CompTur commented 5 years ago

ok I'll have a look this weekend. Can you just tell me the historic of the 3 dbs. I mean how did you ended up with 3 db ? How eventually did you manage to have one db that is working well under 1.435? 1.434 is my historic db, it worked until I have promoted a leader player, except for int. friendly matches, as I told Then, when i downloaded 1.435, i created two different directories. In the first i loaded the last working db from 1.434 (26/10/2018) and the problem with friendlies has remained. In the second i made a fresh run with no db and then I reloaded all old matches

CompTur commented 5 years ago

Last thing: few minutes ago I imported all hrf files from 2006 in 1.435 fresh with success, and IF Tab is still working

akasolace commented 5 years ago

there was a bug indeed, but it should now be fixed. fyi, The bug was only affecting the person having not done a fresh install for a while, the upgrade process was not properly updating th database for IFA Thank you

CompTur commented 5 years ago

Thanks to you for your job.