Skip to content

"pointer being freed was not allocated" error on Mac #8

@nnahito

Description

@nnahito

Thank you for the wonderful library.

I ran the following code on my Mac:

import uing
import strutils

var mEntry: MultilineEntry

proc extraction(_: Button) =
  echo repr(mEntry.text)

proc main = 
  let window = newWindow("Hello World!", 800, 600)

  mEntry = newMultilineEntry()

  let button = newButton("test", extraction)

  let hbox = newHorizontalBox(true)
  hbox.add(mEntry, true)
  hbox.add(button)


  window.child = hbox
  show window
  mainLoop()

init()
main()

It is a small program with Entry and buttons.
This code gets the value from Entry when the button is pressed.
At that time, the value is retrieved without any problem on Windows, but on a Mac, a memory error occurs.

malloc: *** error for object 0x10ccaa058: pointer being freed was not allocated
malloc: *** set a breakpoint in malloc_error_break to debug
SIGABRT: Abnormal termination.

Is it possible for you to correct this?
Thank you.

  • MacOS 14.1.2(23B92)
    • Apple M1 Pro
    • 16 GB
  • Nim Compiler Version 2.0.2 [MacOSX: amd64]
    • uing@0.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions