QRCode icon indicating copy to clipboard operation
QRCode copied to clipboard

Hard Fault for versions bigger than 4

Open arsz6733 opened this issue 5 years ago • 4 comments

Hi I face hard fault error for versions bigger than 4. I debugged the code step by step and I see that Micro goes to hard fault in this lines

uint8_t result[data->capacityBytes];
memset(result, 0, sizeof(result));

I checked result address and it is 0x00000002 which is not a valid RAM address

arsz6733 avatar Mar 01 '20 12:03 arsz6733

What compiler are you using? That certainly does not seem correct. :s

ricmoo avatar Mar 01 '20 13:03 ricmoo

@ricmoo Hi, No problem with the code ! I just increase the Heap size and it works correctly but I got confused! what is the relation between Heap and declaring local variable in Function? I use Keil and add C99 Flag!

BTW I walked through the code and saw it uses malloc like function to declare that array!

arsz6733 avatar Mar 02 '20 06:03 arsz6733

I have not that much experience with configuring the heap size. Is it also possible to increase the heap size of an ESP 32? And could you maybe explain, how to do that?

That would be very nice.

LUC4R4T0R avatar Apr 06 '21 18:04 LUC4R4T0R

I have not that much experience with configuring the heap size. Is it also possible to increase the heap size of an ESP 32? And could you maybe explain, how to do that?

That would be very nice.

Hallo, I am also using esp32 and the version 7 for generating the qr code on a 4.2inch epaper. It is running for a while fine but all of a sudden I got an error that I have reached the display borders. I also think it is due to a memory issue or buffer overflow. Did you find out how to increase the heap ? Thanks

the-kra avatar Mar 28 '22 16:03 the-kra