#2005 un-init ptr, file attrs, tclWin32Dll

obsolete: 8.4b2
closed-invalid
5
2002-11-30
2002-08-04
Anonymous
No

Using tcl C interface in win32 (not using wish)

During Tcl_Init(), crash on uninitialized pointer:
tclWinProcs->getFileAttributesExProc, in tclWin32Dll.c

This happens because TclWinSetInterfaces() is never
called to initialize the pointer (if you don't use Tcl_Main
()).

I find I can work around this by first calling
Tcl_FindExecutable() before I do Tcl_CreateInterp(). This
does get down to TclWinSetInterfaces() and the pointer
is set. Otherwise, a programmer using the C interface to
replace Tcl_Main() will crash.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    This was posted by Jesse Newcomb,
    jesse@cohesionsystems.com

     
  • Vince Darley

    Vince Darley - 2002-08-05
    • labels: 104242 --> 38. Init - Library - Autoload
    • milestone: --> obsolete: 8.4b2
    • assigned_to: vincentdarley --> dgp
     
  • Vince Darley

    Vince Darley - 2002-08-05

    Logged In: YES
    user_id=32170

    I don't believe this is a bug. Tcl_FindExecutable must
    be called for all sorts of reasons, not just this.
    Assigning to 'init' category.

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    IIRC, you've been supposed to call Tcl_FindExecutable()
    first for quite a while. I don't know how this squares with
    use from a separate executable though, so while I'm marking
    this invalid (as I believe it to be, because the original
    questioner already knows the way to deal with this) I'm not
    closing it. I'll let someone who really understands the
    init process do that...

     
  • Donal K. Fellows

    • status: open --> open-invalid
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2002-11-30
    • status: open-invalid --> closed-invalid
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2002-11-30

    Logged In: YES
    user_id=72656

    dup of 642280

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks