Announcement

Collapse
No announcement yet.

Experiencing crahses of eSignal using ActiveX

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Experiencing crahses of eSignal using ActiveX

    Hi,

    I've coded a basic scan in VB to look for gaps pre-market. I've found that after the first couple of quotes, the eSignal app itself crashes. I've tried implementing a delay, but after a few restarts, it began crashing on the first quote.

    I haven't seen similar behavior described in the forum -- was just wondering what others might have seen along these lines. I'll continue to work with it and see if I can pinpoint a precise cause.

    Regards,

    Gordon

  • #2
    I've also had it crash on me once or twice, but I'm not sure what caused it. I'll try and find a common cause if it happens again. I think I recall also getting a message box saying something like "Server busy".

    Comment


    • #3
      Gordon,

      We'd be happy to try out your VB code here to try to duplicate the crash. If you like to do so, please email [email protected] or post the example here.

      Thanks.
      Regards,
      Jay F.
      Product Manager
      _____________________________________
      Have a suggestion to improve our products?
      Click Support --> Request a Feature in eSignal 11

      Comment


      • #4
        I will post it after work today. I'll also try it on another OS.

        Gordon

        Comment


        • #5
          Post of project

          Hi Jay,

          I'm attaching VB project I created to do a premarket scan. The program is designed to address a general programming issue I'm sure several others will encounter -- doing some kind of scan on more symbols than your limit for streaming symbols. In my case, even the 500 symbol account wouldn't work for the pre-market scan I do -- so the overall goal is to quickly get a quote without causing eSignal to think I want streaming data for the quote.

          I stripped out a bunch of database interaction in the project as well as any interaction with the TWS control so that I'd have the project down to basics. I still get regular crashes. Interestingly enough, it seems that once the main eSignal app crashes, it does so more and more readily in successive runs. Not sure why. I close both the VB IDE and eSignal applications before running the application, and it still crashes on the first quote request once it's crashed at all.

          You can see from the log file it creates that when it does retrieve quotes, it sometimes takes longer than 45 seconds to retrieve a quote, and at other times retrieves several quotes a second.

          BTW, to get a quote, I'm using:

          esignal.RequestSymbol sSymbol, False

          in a loop. If it takes a while for a quote to come back, the successive calls for quotes for successive symbols quickly take me past my limit. So, I had to implement a timeout routine. Doesn't seem the most elegant way to go.

          I'd be interested in any thoughts/suggestions on the crashes and on looping through a list of quotes for one-time quotes.

          Regards,

          Gordon
          Attached Files

          Comment


          • #6
            Hello.
            It seems that I have the same problem
            When I start My application it gets the data from eSignal but after a few seconds my application hangs & when I click on the eSignal program I get the message "Server Busy" ??!!
            My program is small & the code for "OnQuoteChanged" is small ( 10 lines ) , so do you think that this because my program isn't able to precess continuous data from eSignal ?
            Is it better to use "Threads" for each incoming Quote ? or use a loop or just put the code in the "OnQuoteChanged" ?
            Thanks.

            Comment


            • #7
              Hey you really aren't alone .... read on.

              I have experienced the same problem. I started getting RT quotes by using True for the 2'nd argument and it was just like using False. It returned ONE callback and then just stopped giving me any others. So I said "OK ...." I will just get around this and keep calling every loop with False. That worked fine for me BUT most likely it worked because I ONLY called the loop once per minute. I'm not sure but maybe you guys call more often? I say it worked fine until I tried to close the program and all hell broke loose. The doc said I didn't need to call releasesymbol but I tried it on 2'nd rev and still the same cascading failures on program close as my first attmpt. I set esignal to Nothing, still crashes. Also got severe CPU cycle resource overload (100%) when using True and calling it twice (sort of expected here).

              So ....

              Either they need to fix ActiveX or fix the documentation to explain how the damn thing works.

              As it now stands I have abandoned the useless ActiveX for RT quotes and have switched back to DDE. Luckily I use Excel so it is not a problem.

              I do use ActiveX for Historical quotes. But just try to close down esignal from within the program and then restart it to have a really good day. Crashes every stinking time. So hell I just leave the piece of $% running.

              The ActiveX "is" a wonderful idea and a great boon to us "private" users trying desperately to get our systems up and running.

              Now I suppose if we had a face to face with the developers they would say "Well we tested the snot out of this baby and it's all set for takeoff."

              Hmmmmmm.... Again Fix the ActiveX or fix the documentation so we can all use it. PLEASE.

              Also why hasn't there been any rev's to the ActiveX or it's documentation especially after the forum posts have indicated mounting discontent with the product.

              Cmon guys .... get us on your side! We started that way, we really did, why else do you think we bought the product. Do you really expect to keep us as customers. Hey you are talking to people that dump a stock in 2 seconds because it doesn't perform.

              Also why the heck are you using the general public for a test bed. We all understand minor little clitches but when a product brings our computers to a screeching halt even though we are using that product according to the documentation I would have to surmise that you are trying to save money by using us as sacrificial testing goats. What a stupid approach. Who's idea was this. That's like putting a bunch of people in a newly designed jumbo jet and seeing if it flys. Hey sorry dudes we did'nt mean to splatter you all over the country side.

              Would you please fix the ActiveX or it's documentation or start communicating freely with us. I have not received ONE stinking e-mail from the developers explaining actions they are taking. If you are going to splatter us all over the countryside then at least let us know you are taking steps to prevent future splattering events.

              Sorry about the rant but I think it's about time somebody called you out on this.

              Dave

              Comment


              • #8
                premarket quote scan 500 symbol limit

                I have gotten around this problem for several years (using DDE) by getting 500 symbols, and then terminating the esignal and datamanager process, restarting them and getting another 500 quotes. Its ugly. But it works.

                Comment


                • #9
                  Hi giaru1,

                  That's an interesting technique. Do you use Win32 calls to kill the processes and shell commands to restart them? What I'd like to do is reset the symbol limit, which you can do from the UI. Is anyone aware of a way to reset the symbol limit programatically?

                  BTW, if you have some code snippets you'd be willing to share, that would be great. Not any of your proprietary trading logic, just quote management.

                  -- Gordon

                  Comment


                  • #10
                    Restarting e-signal to reset symbol count

                    /*
                    * ok. Here is the ugliest code snippet I have ever posted:
                    */


                    /*
                    * To find the process ID of the 'winros' and 'winsig' processes use the following:
                    */

                    int FindWindowsNew(CString &find)
                    {
                    processlistI=0;
                    HANDLE hProcessSnap = NULL;
                    BOOL bRet = FALSE;
                    PROCESSENTRY32 pe32 = {0};

                    // Take a snapshot of all processes in the system.

                    hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

                    if (hProcessSnap == INVALID_HANDLE_VALUE)
                    return (FALSE);

                    // Fill in the size of the structure before using it.

                    pe32.dwSize = sizeof(PROCESSENTRY32);

                    // Walk the snapshot of the processes, and for each process,
                    // display information.

                    if (Process32First(hProcessSnap, &pe32))
                    {
                    // DWORD dwPriorityClass;
                    BOOL bGotModule = FALSE;
                    MODULEENTRY32 me32 = {0};

                    do
                    {
                    CString name=pe32.szExeFile;
                    name.MakeLower();
                    int pos = name.Find(".exe");
                    if (pos>0) name=name.Left(pos);
                    pos = name.GetLength()-1;
                    if (pos>0 && name[pos]>='0' && name[pos]<='9') name=name.Left(pos);
                    if (name.CompareNoCase(find.GetBuffer(0))==0) {
                    // mprintf(0,"%s",pe32.szExeFile);
                    processlistname[processlistI]=pe32.szExeFile;
                    processlist[processlistI++]=pe32.th32ProcessID;

                    }
                    }


                    while (Process32Next(hProcessSnap, &pe32));
                    bRet = TRUE;
                    }

                    // Do not forget to clean up the snapshot object.

                    CloseHandle (hProcessSnap);
                    return (bRet);


                    }

                    /*
                    * To Terminate a process use:
                    */

                    void TerminateProcess(CString &find)
                    {
                    mprintf(0,"Terminating %s",find);
                    FindWindowsNew(find);
                    int i;
                    for (i=0; i<processlistI; i++) {
                    int pid = processlist[i];
                    HANDLE hToken;
                    if(!OpenProcessToken(
                    GetCurrentProcess(),
                    TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
                    &hToken
                    )) return ;

                    if(!SetPrivilege(hToken, SE_DEBUG_NAME, TRUE))
                    {
                    AfxMessageBox("SetPrivilege");

                    // close token handle
                    CloseHandle(hToken);

                    // indicate failure
                    return;
                    }


                    HANDLE hP = OpenProcess(PROCESS_ALL_ACCESS,TRUE,pid);
                    if (!TerminateProcess(hP,0)) {
                    int errcode = GetLastError();
                    mprintf(0,"TerminateProcess Fail err code=%d %s",errcode,find.GetBuffer(0));

                    } else {
                    mprintf(0,"Terminated '%s'",processlistname[i].GetBuffer(0));
                    }
                    SetPrivilege(hToken, SE_DEBUG_NAME, FALSE);
                    CloseHandle(hToken);
                    CloseHandle(hP);

                    }


                    }

                    /*
                    * To restart esignal
                    */

                    {
                    TerminateProcess(CString("winsig.exe"));
                    TerminateProcess(CString("winros.exe"));
                    ::Sleep(1000);
                    PROCESS_INFORMATION pi;
                    STARTUPINFO si = {0};
                    ::CreateProcess(0,"c:\\program files\\dbc\\esignal\\winsig.exe",NULL,NULL,FALSE,0 ,0,NULL,&si,&pi);
                    }

                    Comment

                    Working...
                    X