# Garfield++ TrackHeed/Garfroot Issues

**URL:** <https://root-forum.cern.ch/t/garfield-trackheed-garfroot-issues/15679>\
**Category:** Garfield++\
**Created:** [February 20, 2013, 7:27pm UTC](https://root-forum.cern.ch/t/garfield-trackheed-garfroot-issues/15679 "2013-02-20T19:27:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skchan](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@skchan](https://root-forum.cern.ch/u/skchan)\
**Post date:** [February 20, 2013, 7:27pm UTC](https://root-forum.cern.ch/t/garfield-trackheed-garfroot-issues/15679/1 "2013-02-20T19:27:49Z")

</div>

I’m trying to run a simple simulation with Garfield++ (software just updated, but the problem occurred before as well), but I can’t seem to include any object of the Garfield::TrackHeed class without inducing the following error when running the program (which compiles just fine):

```auto
RandomEngineRoot:
    Generator type: TRandom3
    Seed: 1361387185
alpha(20786) malloc: *** error for object 0x13c9e1ae0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
```

The error occurs even when I write a program as simple as

```auto
#include "TrackHeed.hh"

using namespace std;

int main()
{
     Garfield::TrackHeed *heed = new TrackHeed();
     return 0;
}
```

I also tried making garfroot (which also compiles just fine using the makefile provided on the Garfield++ webpage). The same error occurs whenever I try starting garfroot. I’m running on Mac 10.8. I’m probably missing something pretty fundamental, but I’m at wit’s end. Any help would be much appreciated!

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [August 1, 2013, 7:35pm UTC](https://root-forum.cern.ch/t/garfield-trackheed-garfroot-issues/15679/2 "2013-08-01T19:35:04Z")

</div>

Hi,

If you still encounter this problem, I recommend you try running your example with valgrind to pin point the issue (but it was likely a incompatible build issue)

Philippe.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [June 21, 2018, 2:41pm UTC](https://root-forum.cern.ch/t/garfield-trackheed-garfroot-issues/15679/3 "2018-06-21T14:41:04Z")

</div>

Closed on June 21, 2018, 2:41pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
