Problem with (I think) the EEPROM

Hi there!
Chiara from Italy here.
I've been working on my first Arduino project and after having stumbled on many beginners issue I'm now left with one. Just on, but an annoying one.
I think it has to do with the EEPROM - just cause it (usually) solves it I clear the EEPROM. But then it comes back.

So here is the project. It's a "movie prompter" with a small movie database.
It involves a 2x16 LCD screen, 4 buttons, a potentiometer (to adjust creen backlight) and a power switch.
By pressing the buttons, movie titles appear on the screen. There are 4 buttons for 4 categories, 15 movies in each category:

button1 - comic movies
button2 - non-comic movies
button3 - Italian cult movies
button4 - documentaries

I use the EEPROM so that after turning off and on the Arduino it would remember where in the list it was and not start over.

It work perfect except for button3. This button sometimes work and sometimes doesn't (I have the feeling it got progressively worse).
I'd exclude bad soldering (although it IS quite shit soldered, I didn't have any pickling paste with me when I did it...) just because if I clear the EEPROM and then reprogram the Arduino, it works fine for a while. But then after a few clicks the issue comes back. <sometime just turning off/on the Arduino settles it, but it's rare. And lately even the clear EEPROM trick don't always work...

Would you have any suggestion on what to try or change?
I'm out of ideas...

My code here [code]<//* The circuit:  LCD RS pin to digital pin 12  LCD Enable pin - Pastebin.com

Chiara

ps: I'm sorry I don't have photos of the circuit (can't access it without de-soldering) nor the schematic.
All the 4 buttons are places in the same way in the circuit, and the other 3 work just fine.
pps: it's not a problem of the button itself, cause it I close the circuit with a piace of metal (shorting the legs) nothing changes

Update.

I thought of checking what was happening through the serial monitor....printing the count variables when a button was pushed. The outcome looks like the following...
sooo either the button is broken and always pressed...or something is shorting around that?
Can't figure out the effect of the clearEEPROM on it though...
And why it is not going back to 0 after

     else if (contaIta == 16) {
      lcd.setCursor(0, 0);
      lcd.print(F("CULT ITALIANI   "));
      lcd.setCursor(0, 1);
      lcd.print(F("FINITIIIIIIIIIII"));
      
      contaIta = 0;
    }

mah...

Here is a summary of the serial monitor:

Ita:
32
Ita:
32
Ita:
32
Ita:
33
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
ita
Ita:
33
Ita:
33
Ita:
33
Ita:
33
Ita:
33
Ita:
34
Ita:
34
ita
Ita:
34
ita
Ita:
34
ita
Ita:
34
ita
Ita:
34
ita
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Doc:
1
doc
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
Ita:
34
Ita:
34
Ita:
34
Doc:
2
doc
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
No comic:
1
Nocomic
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
Ita:
34
No comic:
2
Nocomic
Ita:
34
Ita:
34
Ita:
34
Ita:
35
Ita:
35
ita
35
Ita:
35
Ita:
35
Ita:
36
Ita:
36
ita
Ita:
36
ita
Ita:
36
ita
Ita:
36
ita
Ita:
36
ita

Can you please write a simple sketch which reproduces the problem using one button, the eeprom, and serial monitor. We will be able to reproduce your setup and confirm whether or not you have a code or hardware problem.

Post the sketch in your forum post. Don't use pastebin. See this reference on how to place our code in your posting using code tags after proper formatting. https://forum.arduino.cc/index.php?topic=148850.0

sorry I've totally lost your reply.
I was using pastebin just cause the characters exceeded 9000, but yes I'll try write a simple code and that should be a problem.
Using serial monitor I realised that is not a soldering problem. What happens is that the count (contaIta for example) doesn't go back to 0 after reaching 16...still don't get why...

Are you using pull-down resistors?

Add Serial.print statements for debugging purposes.

Do NOT write every cycle of loop() to eeprom if not needed. An eeprom cell (address) can only handle up to 100,000 write cycles. Only write when the value of a counter changes or use EEPROM.update() when writing your byte counters.

PS As your first four eeprom address might be damaged, I suggest that you move them up 4 positions.