Artifacts Associated With Ticket 46f801ea5a
Ticket change [674afc9726] (rid 154294) by bigfaceworm on 2017-06-06 18:34:56:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Unsure how to reproduce outside of my application (trying to port from 8.4 to 8.6). I tried, but cannot. So I'm providing the errorInfo and errorCode that result from this problem. It *appears* to be related to a call through incr Tcl, and perhaps *its* unknown method, which calls ::tailcall, and maybe that messes up the expected call stack. errorInfo: Tcl bug: unexpected stack trace in "unknown" while executing "error "Tcl bug: unexpected stack trace in \"unknown\"" {} [list CORE UNKNOWN BADTRACE $einfo $expect $errInfo]" (procedure "::unknown" line 92) invoked from within "CConsoleMainWindow $m_consoleMainWindow $this" while constructing object "::CConsoleApp::cConsoleApp0" in ::CConsoleApp::constructor (body line 28) invoked from within "::itcl::parser::handleClass CConsoleApp ::CConsoleApp #auto" invoked from within "CConsoleApp #auto" (object "::CCmdCalConsoleStartup::cCmdCalConsoleStartup0" method "::CCmdCalConsoleStartup::Execute" body line 4) invoked from within "::CConsoleApp::Create" (object "::CCmdCalConsoleStartup::cCmdCalConsoleStartup0" method "::CCmdCalConsoleStartup::Execute" body line 6) invoked from within "$cmdConsoleStartup Execute" (procedure "rve_OpenSpiceFile" line 8) invoked from within "rve_OpenSpiceFile $arg1 1 $spiceTopCell" (procedure "rve_startup" line 36) invoked from within "rve_startup" errorCode: CORE UNKNOWN BADTRACE { (while configuring option "-iconclosebtn" for widget "::.m_consoleMainWindow.m_mainPaneManager.m_termPaneFrame") invoked from within "::itcl::builtin::Archetype configure $option {*}$args" (object "::.m_consoleMainWindow.m_mainPaneManager.m_termPaneFrame" method "::itk::Archetype::configure" body line 2) invoked from within "$paneFrame configure -background [option get . mutedBackground MutedBackground] -activebackground [option get . selectBackground SelectBackground] ..." (object "::CConsoleApp::.m_consoleMainWindow" method "::CConsoleMainWindow::CreatePaneFrames" body line 18) invoked from within "::CPaneFrameHelper::Initialize $m_termPaneFrame" (object "::CConsoleApp::.m_consoleMainWindow" method "::CConsoleMainWindow::CreatePaneFrames" body line 44) invoked from within "$this CreatePaneFrames" while constructing object "::CConsoleApp::.m_consoleMainWindow" in ::CConsoleMainWindow::constructor (body line 41) invoked from within "::itcl::parser::handleC} { invoked from within "CConsoleMainWindow .m_consoleMainWindow ::CConsoleApp::cConsoleApp0" ("uplevel" body line 1) invoked from within "uplevel 1 $args"} { (while configuring option "-iconclosebtn" for widget "::.m_consoleMainWindow.m_mainPaneManager.m_termPaneFrame") invoked from within "::itcl::builtin::Archetype configure $option {*}$args" (object "::.m_consoleMainWindow.m_mainPaneManager.m_termPaneFrame" method "::itk::Archetype::configure" body line 2) invoked from within "$paneFrame configure -background [option get . mutedBackground MutedBackground] -activebackground [option get . selectBackground SelectBackground] ..." (object "::CConsoleApp::.m_consoleMainWindow" method "::CConsoleMainWindow::CreatePaneFrames" body line 18) invoked from within "::CPaneFrameHelper::Initialize $m_termPaneFrame" (object "::CConsoleApp::.m_consoleMainWindow" method "::CConsoleMainWindow::CreatePaneFrames" body line 44) invoked from within "$this CreatePaneFrames" while constructing object "::CConsoleApp::.m_consoleMainWindow" in ::CConsoleMainWindow::constructor (body line 41) invoked from within "::itcl::parser::handleClass CConsoleMainWindow ::CConsoleMainWindow .m_consoleMainWindow ::CConsoleApp::cConsoleApp0" ("uplevel" body line 1) invoked from within "uplevel 1 $args"} additionally, the 3 variables mentioned in the unexpected stack trace have the following values: einfo: { (while configuring option "-iconclosebtn" for widget "::.m_consoleMainWindow.m_mainPaneManager.m_termPaneFrame") invoked from within "::itcl::builtin::Archetype configure $option {*}$args" (object "::.m_consoleMainWindow.m_mainPaneManager.m_termPaneFrame" method "::itk::Archetype::configure" body line 2) invoked from within "$paneFrame configure -background [option get . mutedBackground MutedBackground] -activebackground [option get . selectBackground SelectBackground] ..." (object "::CConsoleApp::.m_consoleMainWindow" method "::CConsoleMainWindow::CreatePaneFrames" body line 18) invoked from within "::CPaneFrameHelper::Initialize $m_termPaneFrame" (object "::CConsoleApp::.m_consoleMainWindow" method "::CConsoleMainWindow::CreatePaneFrames" body line 44) invoked from within "$this CreatePaneFrames" while constructing object "::CConsoleApp::.m_consoleMainWindow" in ::CConsoleMainWindow::constructor (body line 41) invoked from within "::itcl::parser::handleC} expect: { invoked from within "CConsoleMainWindow .m_consoleMainWindow ::CConsoleApp::cConsoleApp0" ("uplevel" body line 1) invoked from within "uplevel 1 $args"} errInfo: { (while configuring option "-iconclosebtn" for widget "::.m_consoleMainWindow.m_mainPaneManager.m_termPaneFrame") invoked from within "::itcl::builtin::Archetype configure $option {*}$args" (object "::.m_consoleMainWindow.m_mainPaneManager.m_termPaneFrame" method "::itk::Archetype::configure" body line 2) invoked from within "$paneFrame configure -background [option get . mutedBackground MutedBackground] -activebackground [option get . selectBackground SelectBackground] ..." (object "::CConsoleApp::.m_consoleMainWindow" method "::CConsoleMainWindow::CreatePaneFrames" body line 18) invoked from within "::CPaneFrameHelper::Initialize $m_termPaneFrame" (object "::CConsoleApp::.m_consoleMainWindow" method "::CConsoleMainWindow::CreatePaneFrames" body line 44) invoked from within "$this CreatePaneFrames" while constructing object "::CConsoleApp::.m_consoleMainWindow" in ::CConsoleMainWindow::constructor (body line 41) invoked from within "::itcl::parser::handleClass CConsoleMainWindow ::CConsoleMainWindow .m_consoleMainWindow ::CConsoleApp::cConsoleApp0" ("uplevel" body line 1) invoked from within "uplevel 1 $args"} there's some truncation going on with the itcl::parser::handleClass - foundin initialized to: "8.6.6"
- is_private initialized to: "0"
- login: "bigfaceworm"
- priority initialized to: "5 Medium"
- private_contact initialized to: "5cf9569cda9cff4e20f184ff96974aff0f932dfb"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "bigfaceworm"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to: "Tcl bug: unexpected stack trace in "unknown""
- type initialized to: "Bug"
Ticket change [18fdd2687e] (rid 154295) by ferrieux on 2017-06-06 19:37:00:
- icomment:
In addition to ::errorInfo, [info errorstack] will give you the actual values passed to each level. That may or may not help.
- login: "ferrieux"
- mimetype: "text/plain"
- icomment:
Ticket change [6bda0cac1f] (rid 154297) by dgp on 2017-06-06 20:04:00:
- icomment:
This will probably be hard to isolate and diagnose. In the meanwhile, you may find a quick workaround is to just stop using the auto-loader.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [05aa4cb243] (rid 154764) by dgp on 2017-06-23 13:33:05:
- assignee changed to: "dgp"
- icomment:
bigfaceworm had the right idea. The autoloader doesn't cope with [tailcall] or any other mechanism where a command can erase itself from the stack trace. Simplified demo: % array set auto_index {demo {proc demo {} {tailcall error foo}}} % demo Tcl bug: unexpected stack trace in "unknown" Since Itcl 4 started using [tailcall] in its fundamentals, this flaw hurts autoloaded Itcl code bad, and that's a bad habit most Itcl users persist in. - login: "dgp"
- mimetype: "text/plain"
Ticket change [532bdab766] (rid 154765) by dgp on 2017-06-23 14:21:13:
- icomment:
I think there's a related question here regarding whether [tailcall] does "the right thing" with stack traces in the first place. I recall encountering that question before, but I have not yet located any tickets or other notes about it.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [9efd7a33e5] (rid 154770) by dgp on 2017-06-23 16:05:57:
- icomment:
Ok, see branches dgp-tailcall-errorinfo and dgp-tailcall-errorinfo-alt. Apparently I ran into related issues back in Dec. 2015.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [c40c0e0eae] (rid 154771) by dgp on 2017-06-23 18:39:59:
- icomment:
The question about how [tailcall] should add to -errorinfo arose in the context of working on this Itcl bug. https://sourceforge.net/p/incrtcl/bugs/269/
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [d91083af51] (rid 154805) by dgp on 2017-06-26 19:20:27:
- icomment:
Committed fix for the worst symptom; failure when unable to achieve perfect stack trace consistency. Better to have an imperfect result than no result at all. Still open questions about how [tailcall] properly should append to -errorinfo.
- login: "dgp"
- mimetype: "text/plain"
- icomment: