c++ - 错误 - 当前位置没有可用的源代码

标签 c++ c visual-c++ berkeley-db

当我试图调试在 Linux 机器上编写的 C 程序时(现在,我正在使用 Visual C++ Express),我首先遇到了一个堆栈溢出错误。所以当我点击继续时,我收到了另一条错误消息,

Access violation reading location 0x00030000

所以我决定一步步调试。所以当我尝试它时,它向我显示了错误

There is no source code available for the current location.

这个错误的原因是什么?

代码

    #if 1
    while(1)
    #endif
    {
        fillList();
        #if 1
        {
            op_ds_bulk(ops, &total, 1);
            temp = res("Bulk Write:", total, fp);
            index = 0;
        }
        #endif

        void op_ds_bulk(u_int ops, u_int * totalp, int update)
        {
            char encode_db[] = "encode";
            if(update)
            {
                database_insert_bluk(list, ops);
                database_sync();
                *totalp = ops;
            }
            else
            {
                CHUNK prefetch[4096];
                int random = rand() % (h-ops+1);
                __os_clock(NULL, &start_time.secs, &start_time.usecs);
                database_select_end(65546, random, prefetch, ops);
                __os_clock(NULL, &end_time.secs, &end_time.usecs);
               *totalp = ops;
            }
        }
    }

最佳答案

无效访问可能发生在标准库代码的某处。 Express 版本中不提供该源代码。

您可以检查调用堆栈的代码中调用库函数的部分,然后从那里开始处理。

关于c++ - 错误 - 当前位置没有可用的源代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5177366/

相关文章:

c++ - 使用 Mergesort 计算 C++ 中的反转次数

Python C API : Switch on PyObject type

c - 错误 : Invalid operands to binary expression double double, 但我没有使用指针,只使用整数

c - 使用二维数组和循环的 c++ 中未显示的百分比

c++ - 使用 ODBC 的 MSSQL 数据库中的垃圾 varchar 条目

c++ - 从另一个类更改一个类的数据成员的值

c++ - 关于 Visual C++ 中的编译错误

c++ - 如何计算图像的分辨率?

c++ - 如何有效地 emplace_back(pair)?

windows - struct sockaddr,sin_family不是成员