Archived Forum Post

Index of archived forum posts

Question:

First-chance exception on CkHttpW::quickGetStr()

Feb 19 '14 at 12:55

I'm seeing multiple "First-chance" exceptions as soon as I call CkHttpW::quickGetStr as shown below:

First-chance exception at 0x7511C41F (KernelBase.dll) in GRIB2Test.exe: 0x000006BA: The RPC server is unavailable.

The routine appears to work just fine though and returns the HTTP response string. Is there a way to avoid causing the First-chance exceptions in the first place?

Essentially all I'm doing is unlocking the CkHttp component then calling the following:

CkHttpW http;

const wchar_t * html;

html = http.quickGetStr(_T("http://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/"));

That's when the First-chance exceptions pop up.

Thanks, Phil


Answer

I would recommend first testing with the pre-release of v9.5.0. Please indicate your operating system, VC++ version, etc., and I will post a download link here..


Answer

I'm using VC++ 2012 on Win7-64 system with Chilkat 9.42 pre-release (9.41 had a bug in CkFtp2 that 9.42 fixed). I've also noticed that CkHttpProgress::PercentDone is not being called in the 9.42 pre-release it appears. If you could get me a link for the 9.50 pre-release, I'd be glad to try it.

Thanks, Phil


Answer

Please try this new build:

32-bit: http://www.chilkatsoft.com/preRelease/chilkat-9.5.0-x86-vc11.zip

64-bit: http://www.chilkatsoft.com/preRelease/chilkat-9.5.0-x86_64-vc11.zip


Answer

I tried the pre-release 9.5.0 x86 library and it did not help. I'm not really doing much so it should be easy for you to reproduce. After unlocking CkHttp, I just do this:

CkHttpW http;

const wchar_t * html;

http.put_FetchFromCache(FALSE); // Do NOT use cache

html = http.quickGetStr(_T("http://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/"));

Immediately after the quickGetStr call, I get the following in the Output window (my app is BalloonTest.exe):

First-chance exception at 0x7509C41F (KernelBase.dll) in BalloonTest.exe: 0x000006BA: The RPC server is unavailable.

First-chance exception at 0x7509C41F (KernelBase.dll) in BalloonTest.exe: 0x000006BA: The RPC server is unavailable.

'BalloonTest.exe' (Win32): Loaded 'C:WindowsSysWOW64rasadhlp.dll'. Cannot find or open the PDB file.

First-chance exception at 0x7509C41F (KernelBase.dll) in BalloonTest.exe: 0x000006BA: The RPC server is unavailable.

First-chance exception at 0x7509C41F (KernelBase.dll) in BalloonTest.exe: 0x000006BA: The RPC server is unavailable.

'BalloonTest.exe' (Win32): Loaded 'C:WindowsSysWOW64FWPUCLNT.DLL'. Cannot find or open the PDB file.

Is there anything else you'd like me to try?

Phil


Answer

Thanks, I'll give it a try..


Answer

I'll just toss out another thing I see when downloading a file and showing the download progress using CkHttpProgressW. PercentDone() is never called. I saw in another post that you all were going to go through all the PercentDone routines for everything to verify them so I just wanted to let you know that with 9.50 pre-release it seems it's still not being called for CkHttpProgressW.

Phil


Answer

I did not get a crash. Here's my test code:

bool HttpTesting::testWideCharGet(void)
    {
    CkHttpW http;

const wchar_t * html;

http.put_FetchFromCache(false); // Do NOT use cache

html = http.quickGetStr((L"http://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/"));

CkString lastErr;
http.get_LastErrorText(lastErr);

printf("%s\n",lastErr.getString());

return true;
}

Here is my LastErrorText:

ChilkatLog:
  QuickGetStr:
    DllDate: Feb 19 2014
    ChilkatVersion: 9.5.0.14
    UnlockPrefix: UNTTSTHttp
    Username: CHILKAT13:Matt
    Architecture: Little Endian; 32-bit
    Language: Visual C++ 11.0 (32-bit)
    VerboseLogging: 0
    httpRequestStr:
      a_quickReq:
        quickHttpRequest:
          httpVerb: GET
          url: http://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/
          buildQuickRequest:
            genStartLine:
              startLine: GET /pub/data/nccf/com/gfs/prod/ HTTP/1.1
            --genStartLine
            addCookies:
              Not auto-adding cookies.
            --addCookies
          --buildQuickRequest
          openHttpConnection:
            Opening connection to HTTP server.
            hostname: nomads.ncep.noaa.gov
            port: 80
            ssl: 0
            connectElapsedMs: 235
            HTTP connection succeeded.
          --openHttpConnection
          sendRequestHeader:
            sendHeaderElapsedMs: 0
          --sendRequestHeader
          statusCode: 200
          statusText: OK
          readResponseBody:
            contentLength: 12792
          --readResponseBody
        --quickHttpRequest
      --a_quickReq
      convertResponseBodyToUtf8:
        responseBodySize: 12792
        responseContentType: text/html;charset=ISO-8859-1
        responseHdrCharset: ISO-8859-1
        Converting to utf-8 charset.
        fromCodePage: 28591
      --convertResponseBodyToUtf8
    --httpRequestStr
    Success.
  --QuickGetStr
--ChilkatLog


Answer

It's not "crashing" for me. It just throws the First-chance exception. Everything seems to function just fine. I added the get_LastErrorText and this is what it had:

ChilkatLog:

QuickGetStr:

DllDate: Feb 18 2014
ChilkatVersion: 9.5.0.14
UnlockPrefix: npirasHttp
Username: DELL-XPS:Phil
Architecture: Little Endian; 32-bit
Language: Visual C++ 11.0 (32-bit)
VerboseLogging: 0
httpRequestStr:
  a_quickReq:
    quickHttpRequest:
      httpVerb: GET
      url: http://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/
      buildQuickRequest:
        genStartLine:
          startLine: GET /pub/data/nccf/com/gfs/prod/ HTTP/1.1
        --genStartLine
        addCookies:
          Not auto-adding cookies.
        --addCookies
      --buildQuickRequest
      openHttpConnection:
        Opening connection to HTTP server.
        hostname: nomads.ncep.noaa.gov
        port: 80
        ssl: 0
        connectElapsedMs: 234
        HTTP connection succeeded.
      --openHttpConnection
      sendRequestHeader:
        sendHeaderElapsedMs: 0

First-chance exceptions are just indications that something isn't right but it doesn't necessarily cause a crash. But it's something that shouldn't be happening. Is there something else you can think of that maybe is conflicting with the CkLibs that I need to check?


Answer

I do not get any First-Chance exceptions either.


Answer

Google the error message, without the specific words that wouldn't match anything. For example, Google this:

First-chance exception at (KernelBase.dll) in 0x000006BA: The RPC server is unavailable.