Mobject-Dev-Team / mobject-core

This is the combination of core libraries of mobject
MIT License
2 stars 0 forks source link

TwinCAT 4026 and FB_DynMem_*, ADS errors and TcUnit #5

Open piratecarrot opened 5 months ago

piratecarrot commented 5 months ago

Not sure if it is just me, but when I try to run the test project under TwinCAT 4026, the dynamic memory function blocks don't succeed when running CreateBuffer/Resize and I get page faults. I modified the library extensively to test the creation of the buffer was successful and not make any assumptions about the pointer. This removed the page fault but obviously the tests all fail. I created a fresh test project and tested these dynamic memory management functions on their own and they work just fine.

Within mobject-collections, I am getting two errors within FB_DynMem_Manager2 and FB_DynMem_Buffer, member variable hrInit 0x98110718 which is ADS error:

0x718
1816
0x98110718
ADSERR_DEVICE_NOTINIT
Device not initialized.

I created another fresh project and used the mobject-collections library that was generated. That had a simple trigger and added items to the List. This worked!

Lastly, I moved the instance of List inside of List_TestSuite.*() from out of VAR declaration into VAR_INST and that appears to have solved the issue.

Hopefully for your sake, this is something I have got wrong, but if not, I hope this can assist in moving forward with debugging this issue.

piratecarrot commented 5 months ago

https://github.com/siyka-au/mobject-collections/commit/5f4961a91701b8a96012c6606818f606027f1f84

benhar-dev commented 5 months ago

issue moved from mobject-collections to mobject-core