New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pix_image crashes on OSX 10.11.6 (pd.48.0test2 - Deken gem) #148

Closed
fdch opened this Issue Jul 20, 2017 · 9 comments

Comments

Projects
None yet
2 participants
@fdch

fdch commented Jul 20, 2017

pix_image crashes with

pd(26513,0xa32cf000) malloc: *** error for object 0x78e9826c: pointer being freed was not allocated 
*** set a breakpoint in malloc_error_break to debug

It didn't on 0.47-1, so I guess it needs some tuning.

(From: https://lists.puredata.info/pipermail/pd-list/2017-07/119488.html)

@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Jul 20, 2017

Owner

since deken can be any version (even if it currently provides only a single version for your platform), please provide the full version of Gem, as reported on the Pd-console.
you might also want to provide the donwload link deken uses (if possible)

Owner

umlaeute commented Jul 20, 2017

since deken can be any version (even if it currently provides only a single version for your platform), please provide the full version of Gem, as reported on the Pd-console.
you might also want to provide the donwload link deken uses (if possible)

@fdch

This comment has been minimized.

Show comment
Hide comment
@fdch

fdch Jul 20, 2017

ver: 0.93.3
Gem/0.93.3 (deken installable file for OSX PowerPC+i386/32bit))
Uploaded by zmoelnig @ 2016-05-20 09:24:02

Providing the download link is a different matter, since there's no easy way to copy the link deken offers. Maybe this needs to be a feature request for deken.

I found it here:
http://puredata.info/downloads/gem/releases/0.93.3/Gem-v0.93.3-%28Darwin-i386-32%29%28Darwin-PowerPC-32%29-externals.tar.gz.asc

fdch commented Jul 20, 2017

ver: 0.93.3
Gem/0.93.3 (deken installable file for OSX PowerPC+i386/32bit))
Uploaded by zmoelnig @ 2016-05-20 09:24:02

Providing the download link is a different matter, since there's no easy way to copy the link deken offers. Maybe this needs to be a feature request for deken.

I found it here:
http://puredata.info/downloads/gem/releases/0.93.3/Gem-v0.93.3-%28Darwin-i386-32%29%28Darwin-PowerPC-32%29-externals.tar.gz.asc

@fdch

This comment has been minimized.

Show comment
Hide comment
@fdch

fdch commented Jul 20, 2017

@umlaeute umlaeute added the bug label Nov 16, 2017

@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Dec 5, 2017

Owner
  • does it work if you load the image via [pix_buffer] (see help-file on how to load images from disk into [pix_buffer])?
  • does turning on/off threading make a difference? (send a [thread 0( resp [thread 1( message to [pix_image])
  • could you provide a complete backtrace?
Owner

umlaeute commented Dec 5, 2017

  • does it work if you load the image via [pix_buffer] (see help-file on how to load images from disk into [pix_buffer])?
  • does turning on/off threading make a difference? (send a [thread 0( resp [thread 1( message to [pix_image])
  • could you provide a complete backtrace?
@fdch

This comment has been minimized.

Show comment
Hide comment
@fdch

fdch Dec 5, 2017

pix_buffer loads images just as fine as does pix_multiimage
What do you mean by backtrace?

I remember I couldn't create pix_image (or even open a help file which had pix_image in it) since it caused and still causes a crash.

However, this is weird and I think this is where the bug comes from:

when I create pix_image as in pd -lib Gem
cmd+N
cmd+1
[pix_image]
click anywhere on canvas

Then, I get a crash with:

Pt_Start() called
load plugins 'image' in '/Users/federicocamarahalac/Documents/Pd/externals/Gem/'
pattern : /Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_image*.so
dylib loading file '/Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageQT.so'!
dylib loading file '/Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageSGI.so'!
pd(45261,0xa2ef3000) malloc: *** error for object 0x7a78a8dc: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Pd: signal 6
gui socket 4 - closing audio...
closing MIDI...
... done.

However, if I create pix_image and instead of clicking, I hit cmd+E, the object creates (!), and I get on the console:

tried /Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageQT.so and succeeded
tried /Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageSGI.so and succeeded
Image loading support: QT SGI
threaded ImageLoading not supported!

and on terminal:

Pt_Start() called
load plugins 'image' in '/Users/federicocamarahalac/Documents/Pd/externals/Gem/'
pattern : /Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_image*.so
dylib loading file '/Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageQT.so'!
dylib loading file '/Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageSGI.so'!

and no crash.

fdch commented Dec 5, 2017

pix_buffer loads images just as fine as does pix_multiimage
What do you mean by backtrace?

I remember I couldn't create pix_image (or even open a help file which had pix_image in it) since it caused and still causes a crash.

However, this is weird and I think this is where the bug comes from:

when I create pix_image as in pd -lib Gem
cmd+N
cmd+1
[pix_image]
click anywhere on canvas

Then, I get a crash with:

Pt_Start() called
load plugins 'image' in '/Users/federicocamarahalac/Documents/Pd/externals/Gem/'
pattern : /Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_image*.so
dylib loading file '/Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageQT.so'!
dylib loading file '/Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageSGI.so'!
pd(45261,0xa2ef3000) malloc: *** error for object 0x7a78a8dc: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Pd: signal 6
gui socket 4 - closing audio...
closing MIDI...
... done.

However, if I create pix_image and instead of clicking, I hit cmd+E, the object creates (!), and I get on the console:

tried /Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageQT.so and succeeded
tried /Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageSGI.so and succeeded
Image loading support: QT SGI
threaded ImageLoading not supported!

and on terminal:

Pt_Start() called
load plugins 'image' in '/Users/federicocamarahalac/Documents/Pd/externals/Gem/'
pattern : /Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_image*.so
dylib loading file '/Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageQT.so'!
dylib loading file '/Users/federicocamarahalac/Documents/Pd/externals/Gem/gem_imageSGI.so'!

and no crash.

@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Dec 5, 2017

Owner

with "backtrace", I mean getting the information which part of the code crashed by means of a debugger.

E.g. https://wiki.debian.org/HowToGetABacktrace

the howto is Debian specific, but the basics apply to OSX as well.
basically you need to:

  • install gdb (e.g. using brew)
  • run Pd through gdb
gdb /Applications/Pd.app/Contents/Resources/bin/pd -nrt
  • make Pd crash
  • create a backtrace
  • post it here

(at least, if you can :-))

Owner

umlaeute commented Dec 5, 2017

with "backtrace", I mean getting the information which part of the code crashed by means of a debugger.

E.g. https://wiki.debian.org/HowToGetABacktrace

the howto is Debian specific, but the basics apply to OSX as well.
basically you need to:

  • install gdb (e.g. using brew)
  • run Pd through gdb
gdb /Applications/Pd.app/Contents/Resources/bin/pd -nrt
  • make Pd crash
  • create a backtrace
  • post it here

(at least, if you can :-))

@fdch

This comment has been minimized.

Show comment
Hide comment
@fdch

fdch Dec 5, 2017

Thanks.
Is this enough?
bt-pix_image-crash.txt

fdch commented Dec 5, 2017

Thanks.
Is this enough?
bt-pix_image-crash.txt

@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Dec 5, 2017

Owner

yes thanks.
for the record, here's the relevant excerpt:

(gdb) bt
#0  0x9b07e572 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x9b13bc38 in ?? () from /usr/lib/system/libsystem_c.dylib
#2  0x95577292 in free () from /usr/lib/system/libsystem_malloc.dylib
#3  0x0492ba39 in gem::thread::Mutex::PIMPL::~PIMPL() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#4  0x0492b92f in gem::thread::Mutex::~Mutex() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#5  0x0492b42f in gem::thread::SynchedWorkerThread::~SynchedWorkerThread() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#6  0x0491fac4 in gem::image::PixImageThreadLoader::PixImageThreadLoader() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#7  0x0491fc3d in gem::image::PixImageThreadLoader::getInstance(bool) ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#8  0x0491f5f2 in gem::image::load::poll() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#9  0x04a7e2c3 in pix_image::pix_image(_symbol*) ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#10 0x04a7e3b0 in pix_image::pix_image(_symbol*) ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#11 0x0006b5b1 in pd_typedmess ()
#12 0x00395f00 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) quit
Owner

umlaeute commented Dec 5, 2017

yes thanks.
for the record, here's the relevant excerpt:

(gdb) bt
#0  0x9b07e572 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x9b13bc38 in ?? () from /usr/lib/system/libsystem_c.dylib
#2  0x95577292 in free () from /usr/lib/system/libsystem_malloc.dylib
#3  0x0492ba39 in gem::thread::Mutex::PIMPL::~PIMPL() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#4  0x0492b92f in gem::thread::Mutex::~Mutex() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#5  0x0492b42f in gem::thread::SynchedWorkerThread::~SynchedWorkerThread() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#6  0x0491fac4 in gem::image::PixImageThreadLoader::PixImageThreadLoader() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#7  0x0491fc3d in gem::image::PixImageThreadLoader::getInstance(bool) ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#8  0x0491f5f2 in gem::image::load::poll() ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#9  0x04a7e2c3 in pix_image::pix_image(_symbol*) ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#10 0x04a7e3b0 in pix_image::pix_image(_symbol*) ()
   from /Users/foobar/Documents/Pd/externals/Gem/Gem.d_fat
#11 0x0006b5b1 in pd_typedmess ()
#12 0x00395f00 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) quit
@umlaeute

This comment has been minimized.

Show comment
Hide comment
@umlaeute

umlaeute Dec 5, 2017

Owner

i think this was fixed by dae3d98

Owner

umlaeute commented Dec 5, 2017

i think this was fixed by dae3d98

@umlaeute umlaeute closed this Dec 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment