infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Thread shuts down process when try to start it
Jerry Magrann
I'm a brand new developer and received in house training. During this training, I developed a new ADT file thread to be used in our test environment. I developed the thread in a separate environment and moved it over along with 2 TCL procs, but now it gives the following error when trying to start which didn't happen in the environment I built it in:
PANIC: assertion 'msg != ((Message *) 0) ' failed at tps.cpp/848.
I'm thinking I have a reference to the orginal area, but I've looked everywhere and can't find anything and can't find anything on the forum here that relates to the error message 848. My assumption is that has something to do with the TCL scripts?
Thanks in advance for any assistance.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Kevin Kinnell
That error looks like a C++ runtime error.
It seems to be saying that an assertion that variable 'msg' is not a null pointer
is failing at (Cloverleaf source) file tps.cpp at line 848.
I guess that might happen if you were trying to operate on a message pointer that
wasn't initialized with a valid message, or had been there and got freed.
Was this in the Testing tool?
--kk
Jerry Magrann
Not in the the testing tool - this error happens when I watch the output as the process is starting.
I have two TCL procs on this thread and have determined the one is causing the error. The proc is supposed to filter transactions. Being new to TCL as well, I'm not sure what exactly it could be. Here is my code and I put the section in bold I think I don't need, but I could be wrong:
proc hbr_filter { args } {
keylget args MODE mode ;# Fetch mode
global HciConnName
set module "[lindex [info level 0] 0]/$HciConnName: "
set debug 1 ;# Set debug flag to turn on echo statements
set dispList {} ;# Nothing to return
switch -exact -- $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
# 'run' mode always has a MSGID; fetch and process it
keylget args MSGID mh
set msgData [msgget $mh]
set time [fmtclock [getclock] "%Y%m%d%H%M"]
set fieldsep [cindex $msgData 3]
#set fieldsep [string index $msgData 3]
#set msgData [split $msgData $fieldsep]
set segs [split $msgData r]
#set msgData [lreplace $msgData 6 7 $time TEST]
#set msgData [join $msgData $fieldsep]
set i -1
foreach segment $segs {
incr i
set fields [split $segment $fieldsep]
switch -exact [lindex $fields 0] {
MSH {
}
EVN {
set evn1 [lindex $fields 1]
}
PV1 {
set pv1_2 [lindex $fields 2]
set pv1_14 [lindex $fields 14]
}
}
}
if {[cequal $evn1 A06] && ![cequal $pv1_14 E]
|| [cequal $evn1 P01] && ![cequal $pv1_2 E]} {
lappend dispList "KILL $mh"
} else {
lappend dispList "CONTINUE $mh"
if {$debug} {echo In $module > ER Patient}
}
if {$debug} {echo In $module> $msgData}
lappend dispList "CONTINUE $mh"
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
# Doing some clean-up work
}
}
return $dispList
}
System
Originally posted by Kevin Kinnell
It looks like you are trying to CONTINUE the same message twice, all right.
I'd try it without the lappend displist "Continue... and see.
Charlie Bursell
You have an extra lappend dispList. Remove the last one
Also, there is no need to loop over every segment jsut to get the data from two. Try something like this:
proc hbr_filter { args } {
keylget args MODE mode ;# Fetch mode
global HciConnName
set module "[lindex [info level 0] 0]/$HciConnName: "
set debug 1 ;# Set debug flag to turn on echo statements
set dispList {} ;# Nothing to return
switch -exact -- $mode {
start {
return "" ;# Nothing specific
}
run {
# 'run' mode always has a MSGID; fetch and process it
keylget args MSGID mh
set msgData [msgget $mh]
set fieldsep [string index $msgData 3]
set segs [split $msgData r]
# Assumes Tcl 8.4
set PV1flds [split [lsearch -inline -regexp $segs {^PV1}] $fieldsep]
# If Tcl 8.3
#set PV1flds [split [lindex [lregexp $segs {^PV1}] 0] $fieldsep]
set pv1_2 [lindex $PV1flds 2]
set pv1_14 [lindex $PV1flds 14]
# Assumes Tcl 8.4
set EVNflds [split [lsearch -inline -regexp $segs {^EVN}] $fieldsep]
# If Tcl 8.3
#set EVNflds [split [lindex [lregexp $segs {^EVN}] 0] $fieldsep]
set evn1 [lindex $EVNflds 1]
if {([string equal $evn1 A06] && ![string equal $pv1_14 E]) ||
([string equal $evn1 P01] && ![string equal $pv1_2 E])} {
lappend dispList "KILL $mh"
} else {
lappend dispList "CONTINUE $mh"
if {$debug} {echo In $module > ER Patient}
}
if {$debug} {echo In $module> $msgData}
}
}
return $dispList
}
Jerry Magrann
I have moved the filter to the inbound side (previously had on the outbound) and everything is working or seems to be. I will also remove the 2nd continue to see how it reacts when the users begin testing. Thanks all for your assistance.