Overload Arduino with RGB matrix library.... Arduino won't run

Hello guys...

So here is an issue: Arduino gets overloaded or gets acting weird like stop working or resets itself every time when RGB matrix library and Serial needs to be working together...

Like it's huge conflict between those 2 guys:

<Adafruit_GFX.h> // Core graphics library AND Serial.print();
<RGBmatrixPanel.h> // Hardware-specific library (like any of the Serial libriry
Software serial.. wire.h...AltSoftSerial

So my question is why it happaning and maybe here's can be something done to illuminate this issue cause it's not letting lots of things now like for instance I can't stream data over serial and print it on RGB panel at same time... and so on and so on.

Where is the issue lay in Adafruit libraries or Arduino hardware or ever arduino Serial libraries???

Here is the code what shows the issue:

UnComment " if " statement inside of "for" loop and the Arduino will reset itself

uncoment other Serial.print() and for loop will not count no more ...

#include <Adafruit_GFX.h>   // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library

// Color definitions
//#define BLACK 0x0000
//#define BLUE 0x001F
//#define RED 0xF800
//#define GREEN 0x07E0
//#define CYAN 0x07FF
//#define MAGENTA 0xF81F
//#define YELLOW 0xFFE0
//#define WHITE 0xFFFF

#define CLK 8  // MUST be on PORTB!
#define LAT 12     // STB
#define OE  9
#define termA   A0
#define termB   A1
#define termC   A2
#define termD   A3

//getPixel();
RGBmatrixPanel matrix (termA, termB, termC,termD, CLK, LAT, OE, false);




void setup() {

       matrix.begin();
       matrix.setRotation(1);

       Serial.begin(57600);
       Serial.println("Start");

       matrix.fillScreen(0);
       delay(2000);
}




void loop() {

    
    for(int k=0; k<0x32; k++)
    {     
//         if(k==0){
//          Serial.println("killing arduino");
//         }



          matrix.fillScreen(k);
         
          Serial.println(k);

             //  delay(50);

         
      
    }

 //   Serial.println("killing arduino");

    


}

See attachments for the libraries if you need them..

Adafruit_GFX.zip (23.9 KB)

RGB-matrix-Panel.zip (66.8 KB)