std:bad_alloc error in the program - stderr

I have this error in my program:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
Can anybody please explain what this means?
When i ran the program on my ubuntu machine it worked fine but on the interviewstreet platform it is giving this error.

In general this means your machine has not enough memory... But yours problem description is too short to identify the problem source (provide some code?). About the problem appearing on one OS and not on another, I think it's compiler internal settings.

Related

std::length error when using PCL Ground_based RGBD detection

I am facing an issue with Ground-based RGBD people detection (https://pcl.readthedocs.io/projects/tutorials/en/latest/ground_based_rgbd_people_detection.html). The error is inconsistent and hence has been pretty difficult to narrow down.
When I am running the detection, sometimes it throws a std::length error, and what() says vector_M_fill_insert.
Initially, I assumed it happened when people were detected (because it ran fine and the moment a person entered the frame, it stopped), and it was probably associated with the clustering, but in a few cases, it threw the error just after I launched the node.
I passed a processed point cloud to it and then passed the direct camera point cloud as well just to try to check if the issue was with the processed point cloud, but in both cases, it threw the error unpredictably.
I am confused as to how to go about debugging the error or what might be causing it. Any help is appreciated thank you!
You need to build your nodes with debug flags enabled and that can be achieved in some ways ...
Adding to your CMakelists.txt
set(CMAKE_BUILD_TYPE Debug)
Or
compiling with -DCMAKE_BUILD_TYPE=Debug.
Then you should attach the gdb debugger to whatever node you want. If you are using VS Code as IDE, there is already an extension for it with tutorials, otherwise, you can also add it to your launch file as described here

Stack Canary Corrupted

I was flashing source code using the E1 Debugger for renesas RH850, I got one error called "I/O : Stack Canary Corrupted" and program got terminated
My program is terminating I'm not able to flash the source code.
If any of you have any solution please suggest how to solve this
Thank you

Could not Create Output file in Delphi 10.1 Berlin

When running my Delphi Project for the first time , it runs with no error. But the subsequent runs produces an error below:
[dcc32 Fatal Error] F2039 Could not create output file '.\Win32\Debug\Project1_p.exe'
I tried enabling my application Experience and setting it to automatic, as stated here with no luck. How to fix this permanently? Im using Delphi 10.1 Berlin.
UPDATE 1:
I know deleting the .exe, checking whether the executable is still running in the task manager and killing the process are the quick solutions. But I want a permanent fix.
You probably are running your application through the Run Without Debugging button (big green arrow Shift+Ctrl+F9), instead of that you should better run it through the Run button (small green arrow inside of a windows F9).
This way not only you can easily fix errors debugging your application line to line, but more importantly, when you stop the debugger (Stop button) the application closes and the executable is no longer in use, so you can recompile without showing that error again.
The quick fix that you are looking for does not exist. The compiler cannot write the output file if it is already being used as the executable for a running process.
The solution is to make sure that the process has terminated before you attempt to compile again. Quite plausible, it seems to me, is that there is a bug in your code that means that the process is not terminating when you attempt to close it.
Open your task manager and navigate to processes
Close all processes linked with your program, it usually says '.exe' at the end
lmk if it helped!

Command failed due to signal: Segmentation fault: with xCode 7.0.1

My code is unable to build on xcode 7. What is Segmentation fault?
A segmentation fault happens when your code tries to access memory that it isn't allowed to access. This is often a sign of an uninitialized reference.
It's not clear to me from your screenshot exactly what is going on, though. Perhaps you could provide more details?
From the screenshot it looks like it is happening when you build your project. If this is correct, you need to create a minimal example that displays the problem i.e a code fragment that crashes the compiler in the same way and then you need to raise a bug report about it with Apple (supplying your minimal example so they can reproduce it).
This has happened to me a couple of times in the past and the way I have identified the bit that crashes the compiler is to comment out everything in the source file and then add it back in function by function.That will narrow the problem down to the function. After that you repeat with the lines of code in the offending function, until you get the line that crashes the compiler.
Along the way you may find a work around to stop the compiler crashing. If you do, do not be tempted to skip reporting the bug to Apple. They need to know.

Building IOS AIR app from FlashDevelop error: Could not reserve enough space for object heap

I'm just posting this and self-answering it for posterity's sake.
I looked around the internet and couldn't find an answer, but was able to get around it. So I thought I'd throw it up in case anyone else searches for it.
When building an AIR mobile app from FlashDevelop and coming across this error:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Compliation failed while executing : ADT
APK setup creation FAILED.
In "Run.bat" under
:target
change from
goto ios-debug
to
goto ios-test
If that doesn't work:
reboot
rebuild
It can be finnicky, but this is how I got it working. Changing the java config file's memory allocation did nothing.
open FlexSDK/bin/jvm.config
change Xmx384m to Xmx512m
reboot computer
If that does not work, check whether the system disk space is too small, or the virtual memory settings to other disk space under

Resources