Is there a way to prevent core dumps from happening in Visual Studio?

This is a weird question but I know there’s a way to do this but I just can’t figure it out without help.

Basically I have this .py file that is basically a game where a map is displayed on a 2d array and the array is printed out onto the interface. (Obviously this isn’t anything serious but I’ve been working on this file on the side for a long while now and the file has gotten quite large).

The way this project works is every time the player moves, the file scans every single value on the 2d array to check for things, other things move, trees grow, etc. Basically what I’m trying to say is that there’s a lot of functions being called over and over again to scan the entire 2d array.

I worked on this project for quite some time on my main computer using Microsoft Visual Studios and I did not come across any problems whatsoever when running the file. I could play this game for as long as I wanted and there wouldn’t be any core dumps or anything like that.

Recently, I decided to install Linux on my chromebook and I got Visual Studios on there as well. I wasn’t anticipating any major problems when running this huge file on my chromebook, but I did expect Visual Studios and the file itself to run slower (obviously a chromebook is a potato when compared to my main computer). I knew core dumps existed and this project could generate them, however I thought that as long as I ran it on Visual Studios they would not pop up regardless of the computer I was using.

Needless to say, I was a wee bit surprised when I got a core dumped error when I tried running the project on the chromebook for a little under a minute. I was extremely sad that this happened, but I searched up if said core dump errors can be prevented or deleted entirely, and the internet says they can.

So I tried a couple of the solutions the internet had to offer but no luck. I have no idea if these things I’m entering into the terminal are even doing anything or do these changes not apply to Visual Studios? I have no idea.

Basically I’m just asking if there’s a way to completely prevent core dumps from happening. (deleting them from Linux entirely). I know there’s lot of smart people that could help me out here.

Also, please forgive me if my knowledge of Linux is terrible. The only thing I really know how to do is write Python, so my knowledge of Linux, terminal commands and all that other stuff is a little sad. I’m hoping people on here know a little more about that stuff than I do.

Have you read:
core(5) - Linux manual page ?

The following page also has suggestions (if you’re using Ubuntu):

It seems a bit strange to me that you are only asking to delete the core dump files. A core dump is an opportunity to learn what went wrong :slight_smile: You could use gdb and try to load the core dump, see what actually went wrong.

Not knowing anything more about your system or script, my guess is that (unless you’re directly loading .so files with ctypes and unless you have custom cython or extension code) you’re running into some kind of resource exhaustion issue.

Try running sudo coredumpctl to start getting info on the reason for the core dump.
See man coredumpctl for options.

Also try running your game from the terminal. Don’t start visual studio.
If the problem is available memory then that may help.

1 Like

The project revolves around a complex 2D array where various in-game events are triggered based on array values. On my primary computer, I experienced no problems while running the project in Python, even though it was resource-intensive. However, when I tried to run the same project on my Chromebook, which runs Linux and uses Visual Studio Code as the development environment, I noticed severe performance degradation and frequent segmentation faults (core dumps).