Closed ludimation closed 9 years ago
Stealing this one to see if I can get it running.
Build pauses pretty consistently on image 64 and image 128, then throws an error:
openNISample007Debug(2038,0xa18d11a8) malloc: *** mach_vm_map(size=5283840) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
openNISample007Debug(2038,0xa18d11a8) malloc: *** mach_vm_map(size=5283840) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
openNISample007Debug(2038,0xa18d11a8) malloc: *** mach_vm_map(size=5283840) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
(lldb)
Thread 1 stack:
Thread 1Queue : com.apple.main-thread (serial)
#0 0x9a33a952 in __pthread_kill ()
#1 0x9c0ff167 in pthread_kill ()
#2 0x952c529c in abort ()
#3 0x964586c9 in abort_message ()
#4 0x9647947d in default_terminate_handler() ()
#5 0x96476c30 in std::__terminate(void (*)()) ()
#6 0x96476865 in __cxa_rethrow ()
#7 0x000afcec in std::vector<ofImage_<unsigned char>, std::allocator<ofImage_<unsigned char> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<ofImage_<unsigned char>*, std::vector<ofImage_<unsigned char>, std::allocator<ofImage_<unsigned char> > > >, ofImage_<unsigned char> const&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/bits/vector.tcc:291
#8 0x000aefbf in std::vector<ofImage_<unsigned char>, std::allocator<ofImage_<unsigned char> > >::push_back(ofImage_<unsigned char> const&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/bits/stl_vector.h:608
#9 0x000ab184 in testApp::setup() at /Users/ludimation/of_v0.8.4_osx_release/apps/harlequin/OPENFRAMEWORKS_openNI/src/testApp.cpp:89
#10 0x004dfd88 in Poco::PriorityDelegate<ofBaseApp, ofEventArgs, false>::notify(void const*, ofEventArgs&) at /Users/ludimation/of_v0.8.4_osx_release/libs/openFrameworksCompiled/project/osx/../../../../libs/poco/include/Poco/PriorityDelegate.h:168
#11 0x004e5926 in Poco::PriorityStrategy<ofEventArgs, Poco::AbstractPriorityDelegate<ofEventArgs> >::notify(void const*, ofEventArgs&) [inlined] at /Users/ludimation/of_v0.8.4_osx_release/libs/openFrameworksCompiled/project/osx/../../../../libs/poco/include/Poco/PriorityStrategy.h:81
#12 0x004e58fc in Poco::AbstractEvent<ofEventArgs, Poco::PriorityStrategy<ofEventArgs, Poco::AbstractPriorityDelegate<ofEventArgs> >, Poco::AbstractPriorityDelegate<ofEventArgs>, Poco::FastMutex>::notify(void const*, ofEventArgs&) at /Users/ludimation/of_v0.8.4_osx_release/libs/openFrameworksCompiled/project/osx/../../../../libs/poco/include/Poco/AbstractEvent.h:241
#13 0x004e33cf in void ofNotifyEvent<ofEvent<ofEventArgs>, ofEventArgs>(ofEvent<ofEventArgs>&, ofEventArgs&) at /Users/ludimation/of_v0.8.4_osx_release/libs/openFrameworksCompiled/project/osx/../../../../libs/openFrameworks/events/ofEventUtils.h:172
#14 0x004e2a35 in ofNotifySetup() at /Users/ludimation/of_v0.8.4_osx_release/libs/openFrameworks/events/ofEvents.cpp:115
#15 0x0053b7c4 in ofAppGlutWindow::runAppViaInfiniteLoop(ofBaseApp*) at /Users/ludimation/of_v0.8.4_osx_release/libs/openFrameworks/app/ofAppGlutWindow.cpp:368
#16 0x004dc9e4 in ofRunApp(ofBaseApp*) at /Users/ludimation/of_v0.8.4_osx_release/libs/openFrameworks/app/ofAppRunner.cpp:138
#17 0x000d4869 in main at /Users/ludimation/of_v0.8.4_osx_release/apps/harlequin/OPENFRAMEWORKS_openNI/src/main.cpp:15
#18 0x9370c701 in start ()
Changed max files to load to 127 which still runs. Gonna give this one a rest for tonight and show it to someone else who might be able to figure out the stack overflow.
Can't recreate error, I have successfully loaded as many as 200 images. Using OF 8.3; OSX 10.9.5. It does pause when loading at 64 images and 128 images, so I suspect that the vector is resizing once it's full. It might make sense to resize/init the vector to the size needed before loading the images from disk. This way the vector resizing allocation doesn't have to happen during image load.
We re-sized the vector (so it doesn't pause at 2^n images), but it's still crapping out at around 265 images which is likely because we are running out of VRAM (currently have 1GB on my laptop).
This is pretty much done for now. Still having trouble building it for OSX 10.7, but I'm moving that to #28. I also moved over RAM / VRAM issues to #27.
Would be great to load more images: