Hi,
I am using stemwin (version 5.44) on an STM32F429
I am calling
but sadly this triggers an exception handler.
Looking at the program counter in the exception frame i see I am in GUI_ALLOC_Free.
I have put a breakpoint on the offending asm line and I see i hit this point several times ( 20 -30 ?) with acceptable values, but then he tries to dereference an address 0x6901133C which is an not an existing address on my processor (see screenshot).
Can you give me an indication how this could happen ?
Some speculation of my own:
I am guessing the allocs and frees happen inside of the memory block I give to stemwin via GUI_ALLOC_AssignMemory.
At the moment i pass it a 64kb buffer, and I put a memory device in there which I use as a kind of framebuffer for my 128*160*2 bytes per pixel screen , so 40960 bytes.
Which means about 20kb remains.
Could it be that this is too small, that somewhere GUI_QR_Create does a malloc that fails, and that the uninitialized memory pointer then ends up in a free ?Sadly I cannot easily increase the memory size to test this hypothesis) ?
Note: in the above code, i don't know if I need to select the memdev for creating the QR code since the 'drawing' of it only happens later, but i figured it would not harm either.
Regards,
Bram
I am using stemwin (version 5.44) on an STM32F429
I am calling
but sadly this triggers an exception handler.
Looking at the program counter in the exception frame i see I am in GUI_ALLOC_Free.
I have put a breakpoint on the offending asm line and I see i hit this point several times ( 20 -30 ?) with acceptable values, but then he tries to dereference an address 0x6901133C which is an not an existing address on my processor (see screenshot).
Can you give me an indication how this could happen ?
Some speculation of my own:
I am guessing the allocs and frees happen inside of the memory block I give to stemwin via GUI_ALLOC_AssignMemory.
At the moment i pass it a 64kb buffer, and I put a memory device in there which I use as a kind of framebuffer for my 128*160*2 bytes per pixel screen , so 40960 bytes.
Which means about 20kb remains.
Could it be that this is too small, that somewhere GUI_QR_Create does a malloc that fails, and that the uninitialized memory pointer then ends up in a free ?Sadly I cannot easily increase the memory size to test this hypothesis) ?
Note: in the above code, i don't know if I need to select the memdev for creating the QR code since the 'drawing' of it only happens later, but i figured it would not harm either.
Regards,
Bram