Upload of specific sketch fails on MEGA but other sketches can be uploaded


I am having a very strange thing here.
My Arduino Mega works and I can upload sketches, no problem.
But there is one sketch (it includes an external .h file) where I get
stk500v2_ReceiveMessage(): timeout

The sketch compiles fine, it just doesn’t upload.
I can upload other sketches, no problem.

Anyone has a clue what is going on here?
I suspect it has something to do with the .h file…

Find the sketch here:

I also attached it below.

data.h (158 KB)

FakeTV.ino (2.41 KB)

I am on macOS 10.14 and use IDE 1.8.10.

Update: It seems to work better with Arduino IDE 1.0.5.
It starts uploading and stops just before finishing...

Here the verbose output of IDE 1.8.10:

avrdude: Version 6.3-20190619
        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
        Copyright (c) 2007-2014 Joerg Wunsch

        System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
        User configuration file is "/Users/myName/.avrduderc"
        User configuration file does not exist or is not a regular file, skipping

        Using Port                    : /dev/cu.usbmodem14101
        Using Programmer              : wiring
        Overriding Baud Rate          : 115200

Just to confirm:
• Other sketches can be uploaded to the MEGA board
• The problematic sketch can be uploaded to a UNO board