Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Visual C++ Runtime Library error #978

Open
FileEX opened this issue Jun 2, 2019 · 15 comments
Open

Microsoft Visual C++ Runtime Library error #978

FileEX opened this issue Jun 2, 2019 · 15 comments
Labels
bug Something isn't working

Comments

@FileEX
Copy link
Contributor

FileEX commented Jun 2, 2019

Describe the bug
Some times mta has been crashed and show error. It's totally random and rare.

To reproduce

Expected behaviour
Fix it

Screenshots
image

Version
1.5.6

Additional context

@FileEX FileEX added the bug Something isn't working label Jun 2, 2019
@Pirulax
Copy link
Contributor

Pirulax commented Jun 16, 2019

Hm, interesting...
My PR had the same problem(#907) if there were a lot of elements in a google::dense_hash_map(in MTA SC referred as CFastHashMap)
If i remember correctly its related to some memory issue, namely it can't allocate a new memory buffer for it's elements.
Please attach a dump, so I cant find out where the problem is.

@FileEX
Copy link
Contributor Author

FileEX commented Jun 17, 2019

crash dump of this error has not created

@Pirulax
Copy link
Contributor

Pirulax commented Jul 9, 2019

neat.
my pr isn't merged yet, so nothing related to that.
without a crashdump it'll be pretty hard to investigate where the problem lies.

@ccw808
Copy link
Member

ccw808 commented Jul 9, 2019

Does Assertion failed ever give a crash dump?

@FileEX
Copy link
Contributor Author

FileEX commented Jul 13, 2019

In my case, never.

@ccw808
Copy link
Member

ccw808 commented Jul 13, 2019

What about if you click "Retry" or "Ignore" ?

@Pirulax
Copy link
Contributor

Pirulax commented Nov 27, 2019

@ccw808
I had the same issue, you can get it quite easily if you use CFastHashMap and fill it with elements(a few million).
The interesting this is, it doesnt really run out of memory, but for some reason if fails to allocate it.

void clear_to_size(size_type new_num_buckets)
{
    if (!table)
    {
        table = val_info.allocate(new_num_buckets);
    }
    else
    {
        destroy_buckets(0, num_buckets);
        if (new_num_buckets != num_buckets)
        {            // resize, if necessary
            typedef base::integral_constant<bool, base::is_same<value_alloc_type, libc_allocator_with_realloc<value_type> >::value> realloc_ok;
            resize_table(num_buckets, new_num_buckets, realloc_ok());
        }
    }
    assert(table);
    fill_range_with_empty(table, table + new_num_buckets);
    num_elements = 0;
    num_deleted = 0;
    num_buckets = new_num_buckets;            // our new size
    settings.reset_thresholds(bucket_count());
}

@ccw808
Copy link
Member

ccw808 commented Nov 27, 2019

I would think the allocation fails because of free memory fragmentation

@Pirulax
Copy link
Contributor

Pirulax commented May 10, 2020

Yeah, thats actually a pretty good explanation, but I guess we can do nothing about it, except maybe replace it with a linked list based map, which probably would be slower due to cache misses.

@MichaelFarad
Copy link

@ccw808
I had the same issue, you can get it quite easily if you use CFastHashMap and fill it with elements(a few million).
The interesting this is, it doesnt really run out of memory, but for some reason if fails to allocate it.

void clear_to_size(size_type new_num_buckets)
{
    if (!table)
    {
        table = val_info.allocate(new_num_buckets);
    }
    else
    {
        destroy_buckets(0, num_buckets);
        if (new_num_buckets != num_buckets)
        {            // resize, if necessary
            typedef base::integral_constant<bool, base::is_same<value_alloc_type, libc_allocator_with_realloc<value_type> >::value> realloc_ok;
            resize_table(num_buckets, new_num_buckets, realloc_ok());
        }
    }
    assert(table);
    fill_range_with_empty(table, table + new_num_buckets);
    num_elements = 0;
    num_deleted = 0;
    num_buckets = new_num_buckets;            // our new size
    settings.reset_thresholds(bucket_count());
}

Hi, can you please help me where to put this code? how to implement it?

@Lpsd
Copy link
Member

Lpsd commented Apr 6, 2022

@MichaelFarad what exactly are you trying to do?

@Pirulax
Copy link
Contributor

Pirulax commented Apr 6, 2022

ntoskrnl.exe in System32 should do it.
You will have to get the source-code for Windows 10, but that should be easy, as it can be downloaded from here.

Now, jokes aside.. You dont. (... put it anywhere, just leave it here as is.)

@MichaelFarad
Copy link

ntoskrnl.exe in System32 should do it.
You will have to get the source-code for Windows 10, but that should be easy, as it can be downloaded from here.

Now, jokes aside.. You dont. (... put it anywhere, just leave it here as is.)

help, I beg how can I remove this error, I have been looking for an answer for about a week, you are my hope

@MichaelFarad
Copy link

@MichaelFarad what exactly are you trying to do?

I can't fix this error....I'm in the wall, I don't know what to do

@Lpsd
Copy link
Member

Lpsd commented Apr 6, 2022

Nothing described on this page can help you immediately - this is a development discussion.

GitHub isn't for general MTA support. If you're experiencing issues please visit our Discord and use the #help-support channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants