eclipse-4diac / 4diac-forte

Eclipse Public License 2.0
26 stars 30 forks source link

STRUCT_MUX crash #17

Closed franz-hoepfinger-4diac closed 3 months ago

franz-hoepfinger-4diac commented 8 months ago

STRUCT_MUX crash when there is a Struct which has a Namespace

Other Struct Types no issue.

image

TC ReqCmGuru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400556d5  PS      : 0x00060230  A0      : 0x8217f90d  A1      : 0x3fcd9d10  
0x400556d5: r_rwbt_isr in ROM

A2      : 0x00000000  A3      : 0xfffffffc  A4      : 0x000000ff  A5      : 0x0000ff00  
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x3fcda1d0  
A10     : 0x3c28644c  A11     : 0x3c27a594  A12     : 0x3c283310  A13     : 0x0000023f  
A14     : 0x3c286490  A15     : 0x0000023f  SAR     : 0x00000015  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xffffffff  
0x400556d5: r_rwbt_isr in ROM
0x400556e5: r_rwbt_isr in ROM

Backtrace: 0x400556d2:0x3fcd9d10 0x4217f90a:0x3fcd9d20 0x42174509:0x3fcda040 0x42174546:0x3fcda0d0 0x4201560e:0x3fcda110 0x420156c5:0x3fcda140 0x4209a8c5:0x3fcda190 0x4205da8d:0x3fcda1d0 0x420365e9:0x3fcda1f0 0x42034cac:0x3fcda240 0x42034e3b:0x3fcda260 0x42036251:0x3fcda280 0x42033ecd:0x3fcda2b0 0x420ad4df:0x3fcda2d0 0x420ad704:0x3fcda2f0 0x420ad801:0x3fcda310 0x42016593:0x3fcda340 0x420165a0:0x3fcda360 0x42018994:0x3fcda380 0x4038501a:0x3fcda3a0
0x400556d2: r_rwbt_isr in ROM
0x4217f90a: _svfprintf_r at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdio/svfprintf.c:1521
0x42174509: _vsnprintf_r at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdio/vsnprintf.c:70
0x42174546: vsnprintf at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdio/vsnprintf.c:40 (discriminator 1)
0x4201560e: forte_vsnprintf(char*, unsigned int, char const*, __va_list_tag) at ??:?
0x420156c5: logMessage(E_MsgLevel, char const*, ...) at ??:?
0x4209a8c5: GEN_STRUCT_MUX::createInterfaceSpec(char const*, SFBInterfaceSpec&) at ??:?
0x4205da8d: CGenFunctionBlock<CFunctionBlock>::configureFB(char const*) at ??:?
0x420365e9: CTypeLib::createFB(unsigned int, unsigned int, forte::core::CFBContainer&) at ??:?
0x42034cac: forte::core::CFBContainer::createFB(unsigned int, unsigned int) at ??:?
0x42034e3b: forte::core::CFBContainer::createFB(forte::core::util::CFixedCapazityVector<unsigned int, 30u, forte::core::util::CArray<unsigned int, 30u> >::CIterator&, unsigned int) at ??:?
0x42036251: CResource::executeMGMCommand(forte::core::SManagementCMD&) at ??:?
0x42033ecd: CDevice::executeMGMCommand(forte::core::SManagementCMD&) at ??:?
0x420ad4df: DEV_MGR::parseAndExecuteMGMCommand(char const*, char*) at ??:?
0x420ad704: DEV_MGR::executeRQST() at ??:?
0x420ad801: DEV_MGR::executeEvent(unsigned int, CEventChainExecutionThread*) at ??:?
0x42016593: CEventChainExecutionThread::mainRun() at ??:?
0x420165a0: CEventChainExecutionThread::run() at ??:?
0x42018994: CFreeRTOSThread::threadFunction(void*) at ??:?
0x4038501a: vPortTaskWrapper at /home/franz/esp-idf-v5.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

ELF file SHA256: 561adc7af312d94d

Rebooting...
franz-hoepfinger-4diac commented 8 months ago

image

cochicde commented 5 months ago

@franz-hoepfinger-4diac can you check with the latest develoment branch if the problem is fixed for your case?

diplfranzhoepfinger commented 4 months ago

@cochicde i can, but i have in the meantime removed the namespace, so i will have to add it again. Please hold on, i will do, but not immediately.

MartinMelikMerkumians commented 3 months ago

Any news here? If there is no activity until next Friday, I will close this issue

diplfranzhoepfinger commented 3 months ago

Ok. I can test since then.

franz-hoepfinger-4diac commented 3 months ago

now it shows one error in addition:

so, good, i cannot make a wrong Package Name.

image

franz-hoepfinger-4diac commented 3 months ago

i get 2 Warnings now in IDE:

Description Resource    Path    Location    Type
Unused import 'utils::conversion_struct::types::bits::ST04B'    Uebung_051.SUB  /test/FBs/Uebungen  Uebung_051/compilerInfo/imports 4diac IDE Import Problem
Unused import 'utils::conversion_struct::types::bits::ST04B'    Uebung_052.SUB  /test/FBs/Uebungen  Uebung_052/compilerInfo/imports 4diac IDE Import Problem

image

it reffers to :

https://github.com/Meisterschulen-am-Ostbahnhof-Munchen/4diac_training1/blob/81a3c37109980bb59b4d4703d2d263c53bf384b1/Ventilsteuerung/4diacIDE-workspace/test/FBs/Uebungen/Uebung_051/Uebung_051.SUB#L8

https://github.com/Meisterschulen-am-Ostbahnhof-Munchen/4diac_training1/blob/81a3c37109980bb59b4d4703d2d263c53bf384b1/Ventilsteuerung/4diacIDE-workspace/test/FBs/Uebungen/Uebung_052/Uebung_052.SUB#L8

azoitl commented 3 months ago

now it shows one warning in addition:

image

This is not a warning this is an error!

franz-hoepfinger-4diac commented 3 months ago

now it shows one warning in addition: This is not a warning this is an error!

@azoitl Thanks, i updated it. Obviously it is an Error. Not a Warning.

azoitl commented 3 months ago

now it shows one warning in addition: This is not a warning this is an error!

@azoitl Thanks, i updated it. Obviously it is an Error. Not a Warning.

I was to quick with my response. I wanted to write that - is not a valid character in an IEC 61131-3 identifier. The individual segments of an package have to be a IEC 61131-3 identifier.

franz-hoepfinger-4diac commented 3 months ago

image

no more crashing, even if the Struct is of Type: utils::conversion_struct::types::bits::ST04B

franz-hoepfinger-4diac commented 3 months ago

now it shows one warning in addition: This is not a warning this is an error!

@azoitl Thanks, i updated it. Obviously it is an Error. Not a Warning.

I was to quick with my response. I wanted to write that - is not a valid character in an IEC 61131-3 identifier. The individual segments of an package have to be a IEC 61131-3 identifier.

yes, and that meant: i had to rename the Folder:

https://github.com/Meisterschulen-am-Ostbahnhof-Munchen/4diac_training1/tree/main/Ventilsteuerung/4diacIDE-workspace/test/Type%20Library/utils/conversion-struct

to

https://github.com/Meisterschulen-am-Ostbahnhof-Munchen/4diac_training1/tree/main/Ventilsteuerung/4diacIDE-workspace/test/Type%20Library/utils/conversion_struct

and then the generated Package Name is right.

other way would have been to edit the Package name manually while not overtaking what the IDE recommends.