public inbox for
 help / color / mirror / Atom feed
From: "Stojanovic, Marta" <>
To: 'Ian Roxborough' <>
Cc: "''" <>
Subject: RE: snsdk on win (once again)
Date: Fri, 21 Sep 2001 21:26:00 -0000	[thread overview]
Message-ID: <> (raw)

Hello Ian & co !

Remember this problem ? I think I managed to solve it. 

First, don't forget to change \"..\\bin\\hyper.exe\" to \"hyper.exe\" in
SN452-source\snavigator\snavigator\win\Makefile.* . This is to make snsdk
work in the first place. 

Now, to avoid Access Violation Error after the snsdk execution you must
change the Tcl code. There was an acces to a null-structure member in the
Tcl code, but I was reluctant to change it (I didn't know all the
dependencies). But then I figured that it is a big bug, and that probably
Tcl people solved it in versions later than 8.1. So I compared the file in
question in both version, and I saw that they check for that pointer. I
couldn't use exactly the same code (it would give Access Violation Error),
but it helped me get the courage to change Tcl code. It worked ... Here are
the details ...

File : SNsource\tcl8.1\win\tclWinNotify.c
Line : 161
Function : void Tcl_FinalizeNotifier(clientData)ClientData clientData;
Change : if(tsdPtr != 0) {
		KillTimer(tsdPtr->hwnd, INTERVAL_TIMER);
	   } /*Marta*/

(Those 2 lines are under if statement in version 8.3 also, so I suppose it's
ok like this; as I see, it's working.)

So much work, for so little code ... But it really made my day when I got
it, it was really bugging me.

Kind regards,

-----Original Message-----
From: Ian Roxborough [ ]
Sent: Friday, August 17, 2001 5:26 PM
To: Stojanovic, Marta
Cc: ''
Subject: Re: snsdk on win (once again)

Hello intrepid code explorer,

The snSDK stuff is kind of not so fun.
I did once manage to get things working with
just hyper, i.e. no need to have snSDK because
all of stdout is always send to the console.
So the Windows version would work the same as
the Unix version.

There was some reason that this didn't make it
it to a release.  I think it was due to a number
of side effects that needed to be fix.

When Syd fix the location independent problems
I think he also fixed one of the reasons I 
didn't make the Windows version act like the
Unix version.  Wish I remember more about the
other problems.

Given time I will revisit this.  But you are
welcome to try and beat me to it. ;-)


"Stojanovic, Marta" wrote:
> Hi again !
> Well, I'm learning slowly to debug with VC++ .... The error (Acces
> Violation) occurs on Tcl_Finalize() called indirectly from Tk_Main(). It
> seems to be a known Tcl issue, and the answer was not to use Tk_Main for
> threads. It seems that this call has to be changed in the winMain code.
> look at it further, but if you have any idea, I'd appreciate it ...
> Thanks.
> Kind regards,
> Marta.
> -----Original Message-----
> From: Stojanovic, Marta [ ]
> Sent: Thursday, August 16, 2001 4:23 PM
> To: ''
> Subject: snsdk on win (once again)
> Hi all !
> I started working again on SN for Win and I'm doing my best to have this
> thing working without bothering anyone, but I just can't see where the
> is .... I'll remind you of the problem : I try to execute my tcl script
> using SN for Win, and it executes fine but it always ends by "The
> instruction at "0x1008743f" referenced memory at "0x0000001c". The memory
> could not be "read" " error. I'd like to get rid of it and have a clean
> execution, but I am having problems there.
> Here's the description of the problem (please correct me if I'm wrong
> anywhere) :
> SN has 2 related applications : hyper.exe (compiled from winMain.c + C
> for database API) which is in fact wish shell (along with db API), and
> snsdk.exe which is compiled from winCon.c, and which is just a wrapper for
> wish, so that we can use stdin/stdout/stderr. Hyper.exe with the present
> distribution won't in fact execute (Error in startup: CreateProcess
> The system cannot find the file specified.). But if you rebuild it with
> APPNAME=\"hyper.exe\" and not \"..\\bin\\hyper.exe\" (defined in Makefiles
> in SN452-source\snavigator\snavigator\win directory), it'll work and
> the script but end in an application error.
> (NOTE : in the first case, when you type snsdk and it gives you that error
> message, it still calls hyper.exe, which rests in the background. I saw it
> by trying to erase that folder, and it didn't give me the permission,
> because hyper's files were in use. You have to go to Windows Task Manager
> kill hyper.exe process.)
> I tried to debug snsdk.exe. It stops at the line :
> WaitForSingleObject(endEvent, INFINITE); waiting for hyper.exe to finish
> processing the script. When the script is finished, the error appears.
> you click OK, snsdk.exe resumes and finishes its execution. It's obvious
> that hyper.exe creates the problem when exiting (of course, the error
> says "hyper.exe: Application Error" so it's obvious from there also).
> Unfortunatelly, I don't get to debug hyper.exe, which is called from
> snsdk.exe by CreateProcess. If you have an idea how to do it, please let
> know, I'm rather new to MS VC.
> Then I saw that winCon.c (snsdk) was written by Kai Morich, so I tried to
> find his original code. I found it under the name of wishCon
> ( ), and
> downloaded it. It is written as an extension to Tcl8.0, so I downloaded it
> also, and tried to see if it executes any tcl code, and it really does,
> without any errors in the end (of course, it won't execute any tcl code
> SN examples, and it will correctly state that it doesn't recognize dbopen
> command). I see that SN people used wishCon's winMain.c for their own
> winMain.c (which is hyper's main), but it was changed. I'm not sure
> those changes cause this error or it's something else (I tried to replace
> winMain.c from SN with K. Morich's winMain.c, but it didn't work).
> winCon.c at the end has a reminder : "FIXME: get return code from wish",
> I suppose that it is related with this problem, but the error appears on
> line  WaitForSingleObject(endEvent, INFINITE); .... Maybe that call should
> be changed to something else, but I'm not sure what ...
> The version of SN is not important (those files are the same for 4.52 and
> 5.0), I work on Win 2000, with MS VC++ 6.0 compiler and cygwin .
> I'd really appreciate any help on this matter.
> Thank tou very much in advance.
> Kind regards,
> Marta.

             reply	other threads:[~2001-09-21 21:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-21 21:26 Stojanovic, Marta [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-20  6:37 Stojanovic, Marta
2001-08-17 13:59 Stojanovic, Marta
2001-08-17 14:14 ` Ian Roxborough
2001-08-16 13:23 Stojanovic, Marta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).