Skip to content
Tcl Source Code History Of Ticket 422b0414a3
Login

History Of Ticket 422b0414a3

Artifacts Associated With Ticket 422b0414a3

  1. Ticket change [8680487ec4] (rid 252119) by erikleunissen on 2026-03-14 11:39:48:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      I know, Windows 7 isn't supported anymore.
      
      However, shouldn't Tclsh (and Wish), bail out more gracefully than just
      segfaulting upon launch under older OS's?
      
      Here is my observation:
      * As the very first thing after launch in Windows 7, a window pops up with title
        "Fatal Error", displaying the error message: "PGV Initializer did not initialize".
        See also the attached screenshot.
      * When clicking the popup window away, the appended stack trace appears.
      
      Notes:
      * Tclsh was cross-built from linux using: x86_64-w64-mingw32-gcc (SUSE Linux) 9.2.0
      * The segfault has not been observed with tclsh91 from release 9.1a0
        (using the same cross toolchain).
      
      -- stack trace (Dr. Mingw) --
      tclsh91.exe caused an Illegal Instruction at location 000000006E8CA302 in module tcl91.dll.
      
      AddrPC           Params
      000000006E8CA302 004C004400540000 0000000000000000 000000000022EF50  tcl91.dll!Tcl_Panic+0x82
      000000006E8FB4E6 000000000048FF30 0000000000000030 0000000000000000  tcl91.dll!TclGetProcessGlobalValue+0x266
      000000006E922148 0044004300420041 0048004700460045 004C004B004A0049  tcl91.dll!TclpInitLibraryPath+0x78
      000000006E8FB4BB 00000000003426A0 000000006E92F128 00000000003445D0  tcl91.dll!TclGetProcessGlobalValue+0x23b
      000000006E84C2EF 000000006E92F110 000000006E92F108 0000000000345580  tcl91.dll!InitializeEncodingSearchPath+0xbf
      000000006E8FB4BB 000000000022FCD8 000000000022FCD8 0000000000650735  tcl91.dll!TclGetProcessGlobalValue+0x23b
      000000006E84F52C 0000000000000000 000000006E7C0000 0000000000000000  tcl91.dll!Tcl_GetEncoding+0xac
      000000006E850CE5 0000000000000000 0000000000000000 0000000000646470  tcl91.dll!Tcl_SetSystemEncoding+0x85
      000000006E921700 0000000000401580 000007FE83858806 0000000000000000  tcl91.dll!TclpSetInitialEncodings+0x20
      000000006E852878 00000000004018D0 0000000083858806 0000000000646470  tcl91.dll!Tcl_FindExecutable+0x18
      000000006E90EC90 000000000000003E 0000000000000000 0000000000646470  tcl91.dll!TclZipfs_AppHook+0x10
      000000000040165B 0000000000000001 000000000048FF30 0000000000409978  tclsh91.exe!wmain+0x4b
      00000000004013EE 0000000000000000 0000000000000000 0000000000000000  tclsh91.exe!__tmainCRTStartup+0x26e  [/home/abuild/rpmbuild/BUILD/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c @ 334]
      000000000040153B 0000000000000000 0000000000000000 0000000000000000  tclsh91.exe!mainCRTStartup+0x1b  [/home/abuild/rpmbuild/BUILD/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c @ 223]
      --
      
    5. foundin initialized to: "9.1a1"
    6. is_private initialized to: "0"
    7. login: "erikleunissen"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "609f4c7ecf7dbb7a46acdc7eb164753d196088a6"
    10. resolution initialized to: "None"
    11. severity initialized to: "Severe"
    12. status initialized to: "Open"
    13. submitter initialized to: "erikleunissen"
    14. subsystem initialized to: "69. Other"
    15. title initialized to:
      Tclsh91.exe from release 9.1.a1 segfaults upon launch on older MS Windows release.
      
    16. type initialized to: "Bug"
  2. Add attachment "Capture.PNG" [ef4dafcae2] (rid 252120) by erikleunissen on 2026-03-14 11:40:36.

  3. Ticket change [f152f12851] (rid 252121) by erikleunissen on 2026-03-14 11:43:19:

    1. comment changed to:
      I know, Windows 7 isn't supported anymore.
      
      However, shouldn't Tclsh (and Wish), bail out more gracefully than just
      segfaulting upon launch under older OS's?
      
      Here is my observation:
      * As the very first thing after launch in Windows 7, a window pops up with title
        "Fatal Error", displaying the error message: "PGV Initializer did not initialize".
        See also the attached screenshot.
      * When clicking the popup window away, the appended stack trace appears.
      
      Notes:
      * Tclsh was cross-built from linux using: x86_64-w64-mingw32-gcc (SUSE Linux) 9.2.0
      * The segfault has not been observed:
        - with tclsh91 from release 9.1a0 (using the same cross toolchain).
        - when launching under MS Windows 11
      
      -- stack trace (Dr. Mingw) --
      tclsh91.exe caused an Illegal Instruction at location 000000006E8CA302 in module tcl91.dll.
      
      AddrPC           Params
      000000006E8CA302 004C004400540000 0000000000000000 000000000022EF50  tcl91.dll!Tcl_Panic+0x82
      000000006E8FB4E6 000000000048FF30 0000000000000030 0000000000000000  tcl91.dll!TclGetProcessGlobalValue+0x266
      000000006E922148 0044004300420041 0048004700460045 004C004B004A0049  tcl91.dll!TclpInitLibraryPath+0x78
      000000006E8FB4BB 00000000003426A0 000000006E92F128 00000000003445D0  tcl91.dll!TclGetProcessGlobalValue+0x23b
      000000006E84C2EF 000000006E92F110 000000006E92F108 0000000000345580  tcl91.dll!InitializeEncodingSearchPath+0xbf
      000000006E8FB4BB 000000000022FCD8 000000000022FCD8 0000000000650735  tcl91.dll!TclGetProcessGlobalValue+0x23b
      000000006E84F52C 0000000000000000 000000006E7C0000 0000000000000000  tcl91.dll!Tcl_GetEncoding+0xac
      000000006E850CE5 0000000000000000 0000000000000000 0000000000646470  tcl91.dll!Tcl_SetSystemEncoding+0x85
      000000006E921700 0000000000401580 000007FE83858806 0000000000000000  tcl91.dll!TclpSetInitialEncodings+0x20
      000000006E852878 00000000004018D0 0000000083858806 0000000000646470  tcl91.dll!Tcl_FindExecutable+0x18
      000000006E90EC90 000000000000003E 0000000000000000 0000000000646470  tcl91.dll!TclZipfs_AppHook+0x10
      000000000040165B 0000000000000001 000000000048FF30 0000000000409978  tclsh91.exe!wmain+0x4b
      00000000004013EE 0000000000000000 0000000000000000 0000000000000000  tclsh91.exe!__tmainCRTStartup+0x26e  [/home/abuild/rpmbuild/BUILD/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c @ 334]
      000000000040153B 0000000000000000 0000000000000000 0000000000000000  tclsh91.exe!mainCRTStartup+0x1b  [/home/abuild/rpmbuild/BUILD/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c @ 223]
      --
      
    2. login: "erikleunissen"
    3. mimetype: "text/plain"
  4. Ticket change [c03d4400f0] (rid 252123) by erikleunissen on 2026-03-14 11:44:33:

    1. comment changed to:
      I know, Windows 7 isn't supported anymore.
      
      However, shouldn't Tclsh (and Wish), bail out more gracefully than just
      segfaulting upon launch under older OS's?
      
      Here is my observation:
      * As the very first thing after launch in Windows 7, a window pops up with title
        "Fatal Error", displaying the error message: "PGV Initializer did not initialize".
        See also the attached screenshot.
      * When clicking the popup window away, the appended stack trace appears.
      
      Notes:
      * Tclsh was cross-built from linux using: x86_64-w64-mingw32-gcc (SUSE Linux) 9.2.0
      * The segfault has not been observed:
        - with tclsh91 from release 9.1a0 (under MS Windows 7, built with the same
          cross toolchain).
        - when launching under MS Windows 11
      
      -- stack trace (Dr. Mingw) --
      tclsh91.exe caused an Illegal Instruction at location 000000006E8CA302 in module tcl91.dll.
      
      AddrPC           Params
      000000006E8CA302 004C004400540000 0000000000000000 000000000022EF50  tcl91.dll!Tcl_Panic+0x82
      000000006E8FB4E6 000000000048FF30 0000000000000030 0000000000000000  tcl91.dll!TclGetProcessGlobalValue+0x266
      000000006E922148 0044004300420041 0048004700460045 004C004B004A0049  tcl91.dll!TclpInitLibraryPath+0x78
      000000006E8FB4BB 00000000003426A0 000000006E92F128 00000000003445D0  tcl91.dll!TclGetProcessGlobalValue+0x23b
      000000006E84C2EF 000000006E92F110 000000006E92F108 0000000000345580  tcl91.dll!InitializeEncodingSearchPath+0xbf
      000000006E8FB4BB 000000000022FCD8 000000000022FCD8 0000000000650735  tcl91.dll!TclGetProcessGlobalValue+0x23b
      000000006E84F52C 0000000000000000 000000006E7C0000 0000000000000000  tcl91.dll!Tcl_GetEncoding+0xac
      000000006E850CE5 0000000000000000 0000000000000000 0000000000646470  tcl91.dll!Tcl_SetSystemEncoding+0x85
      000000006E921700 0000000000401580 000007FE83858806 0000000000000000  tcl91.dll!TclpSetInitialEncodings+0x20
      000000006E852878 00000000004018D0 0000000083858806 0000000000646470  tcl91.dll!Tcl_FindExecutable+0x18
      000000006E90EC90 000000000000003E 0000000000000000 0000000000646470  tcl91.dll!TclZipfs_AppHook+0x10
      000000000040165B 0000000000000001 000000000048FF30 0000000000409978  tclsh91.exe!wmain+0x4b
      00000000004013EE 0000000000000000 0000000000000000 0000000000000000  tclsh91.exe!__tmainCRTStartup+0x26e  [/home/abuild/rpmbuild/BUILD/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c @ 334]
      000000000040153B 0000000000000000 0000000000000000 0000000000000000  tclsh91.exe!mainCRTStartup+0x1b  [/home/abuild/rpmbuild/BUILD/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c @ 223]
      --
      
    2. login: "erikleunissen"
    3. mimetype: "text/plain"
  5. Ticket change [7ed77665b4] (rid 252124) by erikleunissen on 2026-03-14 11:51:50:

    1. comment changed to:
      I know, Windows 7 isn't supported anymore.
      
      However, shouldn't Tclsh (and Wish), bail out more gracefully than encountering
      a "Fatal Error" upon launch under older OS's?
      
      Here is my observation:
      * As the very first thing after launch in Windows 7, a window pops up with title
        "Fatal Error", displaying the error message: "PGV Initializer did not initialize".
        See also the attached screenshot.
      * When clicking the popup window away, the appended stack trace appears.
      
      Notes:
      * Tclsh was cross-built from linux using: x86_64-w64-mingw32-gcc (SUSE Linux) 9.2.0
      * The segfault has not been observed:
        - with tclsh91 from release 9.1a0 (under MS Windows 7, built with the same
          cross toolchain).
        - when launching under MS Windows 11
      
      -- stack trace (Dr. Mingw) --
      tclsh91.exe caused an Illegal Instruction at location 000000006E8CA302 in module tcl91.dll.
      
      AddrPC           Params
      000000006E8CA302 004C004400540000 0000000000000000 000000000022EF50  tcl91.dll!Tcl_Panic+0x82
      000000006E8FB4E6 000000000048FF30 0000000000000030 0000000000000000  tcl91.dll!TclGetProcessGlobalValue+0x266
      000000006E922148 0044004300420041 0048004700460045 004C004B004A0049  tcl91.dll!TclpInitLibraryPath+0x78
      000000006E8FB4BB 00000000003426A0 000000006E92F128 00000000003445D0  tcl91.dll!TclGetProcessGlobalValue+0x23b
      000000006E84C2EF 000000006E92F110 000000006E92F108 0000000000345580  tcl91.dll!InitializeEncodingSearchPath+0xbf
      000000006E8FB4BB 000000000022FCD8 000000000022FCD8 0000000000650735  tcl91.dll!TclGetProcessGlobalValue+0x23b
      000000006E84F52C 0000000000000000 000000006E7C0000 0000000000000000  tcl91.dll!Tcl_GetEncoding+0xac
      000000006E850CE5 0000000000000000 0000000000000000 0000000000646470  tcl91.dll!Tcl_SetSystemEncoding+0x85
      000000006E921700 0000000000401580 000007FE83858806 0000000000000000  tcl91.dll!TclpSetInitialEncodings+0x20
      000000006E852878 00000000004018D0 0000000083858806 0000000000646470  tcl91.dll!Tcl_FindExecutable+0x18
      000000006E90EC90 000000000000003E 0000000000000000 0000000000646470  tcl91.dll!TclZipfs_AppHook+0x10
      000000000040165B 0000000000000001 000000000048FF30 0000000000409978  tclsh91.exe!wmain+0x4b
      00000000004013EE 0000000000000000 0000000000000000 0000000000000000  tclsh91.exe!__tmainCRTStartup+0x26e  [/home/abuild/rpmbuild/BUILD/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c @ 334]
      000000000040153B 0000000000000000 0000000000000000 0000000000000000  tclsh91.exe!mainCRTStartup+0x1b  [/home/abuild/rpmbuild/BUILD/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c @ 223]
      --
      
    2. login: "erikleunissen"
    3. mimetype: "text/plain"
    4. title changed to:
      Tclsh91.exe from release 9.1.a1 crashes upon launch on older MS Windows release.
      
  6. Ticket change [ca5577bc7d] (rid 252129) by jan.nijtmans on 2026-03-14 13:27:19:

    1. icomment: "Does [f4a4d699c2a63e43|this] help?"
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  7. Ticket change [0acea02ead] (rid 252130) by erikleunissen on 2026-03-14 13:59:15:

    1. icomment:
      I'm getting the same popup window and the same stack trace.
      
    2. login: "erikleunissen"
    3. mimetype: "text/plain"
  8. Ticket change [9d80c43565] (rid 252133) by apnadkarni on 2026-03-15 05:22:03:

    1. icomment:
      Please try the bug-422b0414a3-apn branch. It worked for me in my 32-bit Win7 VM. I don't have a 64-bit VM to try. It should show a dialog about unsupported Windows and exit the application. Note this will impact all applications that link to Tcl (as I think it should).
      
      I don't think manifest changes will have any effect, they only tell Windows how to lie to the application about version numbers :-(
      
      I am pretty sure 91a1 uses API's not present in Win 7, which 91a0 might not have done. But I am actually surprised that tclsh ran and panic'ed.
      My expectation would be that the program would just refuse to load
      since all DLL imports would not be resolved. I don't understand why an
      explicit check in the code is necessitated.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  9. Ticket change [896790820b] (rid 252146) by jan.nijtmans on 2026-03-16 07:47:11:

    1. icomment:
      You could also use the function tclWinDebugPanic(). It does exactly the same if IsDebuggerPresent() returns false. Only if IsDebuggerPresent() is true it will output the message to the debugger.
      
      Not a big deal at all.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  10. Ticket change [3a05336cc5] (rid 252147) by jan.nijtmans on 2026-03-16 07:50:18:

    1. assignee changed to: "apnadkarni"
    2. login: "jan.nijtmans"
    3. mimetype: "text/plain"
  11. Ticket change [c37b699b68] (rid 252148) by jan.nijtmans on 2026-03-16 07:57:50:

    1. icomment:
      Hm. I almost forgot about [https://core.tcl-lang.org/tips/doc/trunk/tip/425.md|TIP #425]. tclWinDebugPanic() is the default panicproc since Tcl 9.0. So the comment "Do not use Tcl_PanicProc" doesn't make much sense here. (It would have made sense in Tcl 8!)
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  12. Ticket change [b32e6018c6] (rid 252157) by erikleunissen on 2026-03-16 15:05:19:

    1. icomment:
      @ apnadkarni :
      
      Regarding:
      
      > But I am actually surprised that tclsh ran and panic'ed. My expectation would
      > be that the program would just refuse to load since all DLL imports would not 
      > be resolved. I don't understand why an explicit check in the code is
      > necessitated.
      
      I understand. But since it does launch, the error message is confusing.
      
      Regarding:
      
      > Please try the bug-422b0414a3-apn branch. It worked for me in my 32-bit Win7 VM.
      > I don't have a 64-bit VM to try. It should show a dialog about unsupported Windows
      > and exit the application.
      
      I tried it on a 64-bit machine. Indeed, the dialog shows, with a message that
      provides much more useful information for the user.
      
      Screen shot once more attached as Capture2.PNG
      
    2. login: "erikleunissen"
    3. mimetype: "text/plain"
  13. Add attachment "Capture2.PNG" [901bc9fde7] (rid 252158) by erikleunissen on 2026-03-16 15:05:46.

  14. Ticket change [71d12057ec] (rid 252162) by apnadkarni on 2026-03-17 02:44:50:

    1. closedate changed to: "2461116.6144696991"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Jan,
      
      > So the comment "Do not use Tcl_PanicProc" doesn't make much sense here.
      
      The comment refers to `Tcl_Panic` not `Tcl_PanicProc`. The reason I do not want to call `Tcl_Panic` is that it exits with an `int 3` which puts up another nasty dialog. Since we have already displayed a message to the user with cause for exit, I prefer a clean exit() as opposed to an `int 3` exception.
      
      
      > You could also use the function tclWinDebugPanic(). 
      
      TBH I thought, based on the name, that `tclWinDebugPanic` would panic (i.e. exit), not realizing it only displays a message. Still, during initialization time when all Tcl subsystems may or may not have been fully initialized, my preference would be to use direct Win32 calls and not Tcl facilities to exit. However, I'm ok with your changing it to `tclWinDebugPanic` if you prefer that.
      
    4. login: "apnadkarni"
    5. mimetype: "text/x-markdown"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  15. Ticket change [e1772f557c] (rid 252206) by jan.nijtmans on 2026-03-17 09:04:03:

    1. closedate changed to: "2461116.8778219675"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Thanks for fixing this.
      
      > However, I'm ok with your changing it to `tclWinDebugPanic` if you prefer that.
      
      It's just a choice, not actually better or so. I'll leave it as it is now, which is fine.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
  16. Ticket change [706f0b162f] (rid 252209) by oehhar on 2026-03-17 10:21:17:

    1. closedate changed to: "2461116.9314491553"
    2. closer changed to: "oehhar"
    3. icomment:
      May the manifest removal in [368f7fdda0a2de37] change MS-WIN oS behavior?
      May Windows 11 already issue a warning automatically?
      
      Thanks,
      Harald
      
    4. login: "oehhar"
    5. mimetype: "text/x-fossil-wiki"
    6. username: "oehhar"
  17. Ticket change [8bc73a1957] (rid 252210) by jan.nijtmans on 2026-03-17 12:18:03:

    1. closedate changed to: "2461117.012543866"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      > May the manifest removal in [368f7fdda0a2de37] change MS-WIN oS behavior? May Windows 11 already issue a warning automatically?
      
      No and No. Erik (see below) reported there is no change of behavior at all.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"