Windows error 0x0000004B, 75

Detailed Error Information


This is a Blue Screen of Death stop code. More information is available in the Knowledge Base article Bug Check 0x4B: STREAMS_INTERNAL_ERROR.

HRESULT analysis[2]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
Reserved (X)false
FacilityCode0 (0x000)
DescriptionThe default facility code.[2][3]
Error Code75 (0x004b)

Possible solutions


Can anyone tell me whats wrong with my C++ code


The exit condition of your for loop

for (count=0 ; count<71 ; count++)

should be

for (count=0 ; count<70 ; count++)

In this way, when count == 70, the loop is not executed. If you execute your loop with count == 70, you are out of bounds of your array, whose length is 70 (elements from 0 to 69).

As LumpN pointed out, also the second loop is wrong:

for (int count=0 ; count<=70 ; count++)

Even in this case you are trying to write out of array bounds as the loop is executed also when count == 70

answered on Stack Overflow Dec 30, 2013 by HAL9000 • edited Dec 30, 2013 by HAL9000

Failed to create assembly 'System.ServiceModel.Internals' in SQL


Have you tried installing the assembly with the UNSAFE permission set option?

I have System.ServiceModel.Internals (v4 from GAC) installed on SQL Server 11.0.5058 as UNSAFE, I don't know if you will be having versioning issues as well but I believe the assembly can only be installed as unsafe as it may access unmanaged resources.

From your error message:

[found unmanaged pointer] [expected unmanaged pointer] Unexpected type on the stack.

I understand this as Expected Unmanaged pointer, found unmanaged pointer, unmanaged pointer not allowed.

See for definitions of permission sets.

answered on Stack Overflow Feb 4, 2015 by Dave Manning

Can anyone tell me whats wrong with my C++ code


Valid indecies for the first array are 0 - 69 because the array has 70 elements. So the following loops are invalid

for (count=0 ; count<71 ; count++)

for (int count=0 ; count<=70 ; count++)

Must be

for ( int count = 0 ; count < 70 ; count++ )

Also it is a good idea to define corresponding constant naming this magic number. For example

const int N = 70;

and then in loops to use this constant

for ( int count = 0 ; count < N ; count++ )

Also function main shall have return type int

int main()

Also I see a contradiction in the conditions of the following if-else statements

        array2 [count]="A+";

    else if(marks>=74 && marks<81)
        array2 [count]="A";

    else if(marks>=66 && marks<73)
        array2 [count]="B";

    else if(marks>55 && marks<65)
        array2 [count]="B-";

    else if(marks>=68 && marks<55)
        array2 [count]="C";

    else if(marks>=61 && marks<68)
        array2 [count]="C-";

    else if(marks>=54 && marks<61)
        array2 [count]="D";

        array2 [count]="F";

Compare for example marks B- and C.

answered on Stack Overflow Dec 30, 2013 by Vlad from Moscow

Position 2D array bug as parameter causes memory dumps

SetZero::setZero((int **)a, 4, 5)

a is not an array of pointers, it is simply a 2 dimensional array.

notice how the access violation is reading address 0x0000004B? that's 75, a number between 0 and 99 :) because you are treating a 2 dimensional array (which is just a one dimensional array with a neat way of accessing it) as an array of arrays, it is taking one of the values in your array (75) to be the address of a sub array, then trying to read the non existent array at address 75 (or 0x0000004B)

I suggest that you 'flatten' your arrays and work with them as one dimensional arrays, which I find simpler:

void SetZero::setZero(int * a, int m, int n){
int i, j, k;
int * b = new int [m*n]; //flags to identify whether set to zero or not.

for(i = 0; i < m; i++){
    b[i] = new int[n];
    for(j = 0; j < n; j++)
        b[i*n+j] = 1;

for(i = 0; i < m; i++)
    for(j = 0; j < n; j++)
        if(a[i*n+j] == 0 && b[i*n+j]){//DUMP here. If I change it to (a+i)[j], then works.
            for (k = 0; k < n; k++){
                a[i*n+k] = 0;//but there is NO dump here. Weird!
                b[i*n+k] = 0;
            for(k = 0; k < m; k++){
                a[k*n+j] = 0;
                b[k*n+j] = 0;
            j = n;//break. next row loop.

delete[] b;

int main(){
int a[4*5];

for(int i = 0; i < 4; i++){//create an 2D array
    for(int j = 0; j < 5; j++){
        a[i*5+j] = rand() % 100;
        cout << a[i*5+j] << " ";
    cout << endl;

SetZero::setZero(a, 4, 5);//type cast.

cout << endl;
for(int i = 0; i < 4; i++){//print result
    for(int j = 0; j < 5; j++)
        cout << a[i*5+j] << " ";
    cout << endl;

return 0;
answered on Stack Overflow Jun 13, 2013 by matt • edited Jun 13, 2013 by matt

Failed to create assembly 'System.ServiceModel.Internals' in SQL

  [found ref 'System.String'] Expected numeric type on the stack

The stack trace tells the tale, the CLR verifier checked the stack and found an unexpected type, a string instead of a number. That's pretty bad. The relevant method that's executing, the stack trace is not complete so we can't trace it all the way back, is System.Runtime.Diagnostics.DiagnosticsEventProvider.WriteTransferEvent().

This is a .NET 4 addition in the .NET Framework, it supports ETW (Event Tracing for Windows). A disassembler can show what code uses it, through several layers, that for example the System.ServiceModel.Channels.HttpRequestContext.TraceHttpMessageReceived() calls it.

In other words, we are firmly in WCF land, it received a message over HTTP and it generates an ETW event so it can be traced by ETW tooling. The call originated in System.ServiceModel.dll, the core WCF assembly, the ETW tracing code is located in System.ServiceModel.Internals.dll.

So, somehow, and it is getting to be a bit of a foregone conclusion how this could have happened given the nature of the question, the SQL Server machine has two different revisions of these WCF assemblies. They are normally distributed as a pair, part of the basic .NET install. There have been many revisions since .NET 4.0 RTM, versions 4.01, 4.02, 4.03 were slip-streamed through Windows Update for example, these updates in particular affected System.ServiceModel. Not to speak of versions 4.5, 4.5.1, 4.5.2 and 4.6 shipped since then and a few handfuls of KB updates that fixed bugs and patched security problems.

Anticipating the next question: so what's the correct revision of System.ServiceModel.Internals.dll? You can call Microsoft Support and they will tell you: "there isn't one". But you already knew that. So don't do this. If you want to try to make this working anyway then a basic strategy is to first look at the revision number of System.ServiceModel, then try to find a System.ServiceModel.Internals whose revision number is, if not equal, then at least in the ballpark. The one you have now is almost certainly not close, revision 34234 is, roughly, a .NET 4.5.2 revision number.

answered on Stack Overflow Feb 1, 2015 by Hans Passant

Position 2D array bug as parameter causes memory dumps


One suggestion about the SetZero(). There is a function called memset() which allows you to set all bytes to a specific value given a starting pointer and the range. This function could make your SetZero() function more cleaner:

void * memset ( void * ptr, int value, size_t num );

Fill block of memory. Sets the first num bytes of the block of memory pointed by ptr to the specified value (interpreted as an unsigned char).


  • ptr: Pointer to the block of memory to fill.
  • value: Value to be set. The value is passed as an int, but the function fills the block of memory using the unsigned char conversion of this value.
  • num: Number of bytes to be set to the value, size_t is an unsigned integral type.

For example, the following code block from your program:

 for (k = 0; k < n; k++){
   a[i][k] = 0;//but there is NO dump here. Weird!
   b[i][k] = 0;

can be achieved by memset in a cleaner way:

 memset(a[i], 0, n * sizeof(int));
 memset(b[i], 0, n * sizeof(int));
answered on Stack Overflow Jun 13, 2013 by keelar • edited Jun 13, 2013 by keelar


Leave a comment

(plain text only)


  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0