Questions tagged [invalid-pointer]

30 questions
12
votes
2 answers

Why not raise EInvalidPointer?

The Delphi documentation states : Never raise an EInvalidPointer exception directly. EInvalidPointer is raised internally by the memory manager. I'm writing a custom base class as an alternative to TInterfacedObject, following the RTL…
J...
  • 30,968
  • 6
  • 66
  • 143
7
votes
1 answer

Is initializing a pointer declarator with an invalid pointer undefined behavior?

In short, is the following code considered to have undefined behavior? int main() { int *p = ; } For a compiling example, take the following code: int main() { int *p = new int; delete p; // Now p has an…
Mário Feroldi
  • 3,463
  • 2
  • 24
  • 49
7
votes
1 answer

Error in `python': free(): invalid pointer: 0x00007fc3c90dc98e

Got this error on an ubuntu server (100GB RAM) in anacondas py3.6 installation after it opened multiple files this way in a for loop (7 files * 4GB): temp_df = pd.read_csv(datafolder + str(file), encoding="ISO-8859-1",…
Mario L
  • 507
  • 1
  • 6
  • 15
5
votes
4 answers

Is fetching the value of an invalid pointer undefined or implementation defined behaviour in C?

Fetching the value of an invalid pointer is an implementation defined behavior in C++ according to this. Now consider the following C program: #include #include int main(void) { int* p=(int*)malloc(sizeof(int)); *p=3; …
Destructor
  • 14,123
  • 11
  • 61
  • 126
4
votes
1 answer

Monodevelop invalid pointer crash

I downloaded MonoDevelop from the Debian Testing repositories and tried to use it, at first everything went ok, the program starts nicely but when it comes to create a project or a solution or even opening a file it suddenly crashes, I opened the…
3
votes
1 answer

c++ free(): invalid pointer error while path compression (union by rank)

I looked through other similar questions but couldn't figure out the reason for this error. I'm writing a C++ program to implement Kruskal's Minimum Spanning Tree algorithm using Union by rank with path compression. It prints the edges of the MST…
kabir
  • 145
  • 1
  • 6
2
votes
1 answer

C++ Pointers break when changing a pointer

When I change a pointer in a Union, my other pointers break and show invalid pointer. CustomDataTypeExample Class: struct CustomDataTypeExample { float x; float y; float z; CustomDataTypeExample() = default; CustomDataTypeExample(float x, float y,…
Someone
  • 21
  • 1
2
votes
1 answer

Debug glibc free(): invalid pointer

I'm trying to debug code that eventually throws *** glibc detected *** ./build/smonitor: free(): invalid pointer: Its challenging because I don't use free... I've seen the other SO posts that have examples replicating the issue.. I need help on…
Crushing
  • 487
  • 1
  • 9
  • 24
2
votes
2 answers

VS2015 Error while trying to run application: Invalid Pointer

When you debug a Visual Studio 2015 solution you see this error message: Error while trying to run application: Invalid pointer Obviously something isn't configured properly, or is permissions related, just wondering if anyone has identified the…
Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321
1
vote
1 answer

Pybind11: Store pointer to numpy array data in c++ object

I have a c++ class that stores two pointers to the data of two numpy arrays as members (m_ptrA, m_ptrB) exposes a function to initialize the pointers (initPtrs) exposes a function that operates on the pointers (doSomethingWithPtrs) class…
user16372530
  • 692
  • 2
  • 13
1
vote
0 answers

*** Error in `python': free(): invalid pointer: 0x0000000001ad2420 ***

I am running with a simple python script which is giving *** Error in `python': free(): invalid pointer: 0x00000000029b7420 *** ======= Backtrace:…
Sanjay
  • 107
  • 1
  • 4
  • 17
1
vote
0 answers

munmap_chunk(): invalid pointer when clearing map of vectors

I've implemented a solution to this SPOJ problem in C++11 and it compiles perfectly when using clang. SPOJ's submission uses g++ which throws a runtime error with the message invalid pointer. I've narrowed it down to the…
W.K.S
  • 9,787
  • 15
  • 75
  • 122
0
votes
0 answers

realloc invalid pointer C

I have realloc () : invalid pointer when try to initUniversity Test We have a binary file which consist of students. I need to add all of them in University, but i have this error. What's the problem? Here is function to add new group bool…
0
votes
1 answer

realloc says invalid pointer unless unrelated for-loop commented out

Okay, I am very confused and desperately need help. I'm working on an assignment to dynamically allocate an array of strings, and I've been having trouble with realloc the entire time. I finally got it to the point where it seemed to be working, I…
0
votes
0 answers

std::string deallocation seems to fail when exiting the function

I'm quite new to programming and it seems that one of the functions give me this error as soon as it runs over this line of code : std::string name; Right after I return *this, it goes through deallocating all of the std::vector that are inside the…
jfo420
  • 11
  • 2
1
2