ricmoo / QRCode

QR code generation library in C, optimized for low-power devices, such as Arduino.
Other
638 stars 202 forks source link

Hard Fault for versions bigger than 4 #18

Open arsz6733 opened 4 years ago

arsz6733 commented 4 years ago

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

ricmoo commented 4 years ago

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

arsz6733 commented 4 years ago

@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!

LUC4R4T0R commented 3 years ago

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.

the-kra commented 2 years ago

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