Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - dhbenson

Pages: [1]
1
Plugin Development / Vector problems?
« on: January 26, 2011, 04:58:26 »
Hi there,

I'm trying write a Vamp plugin and I'm running into a strange problem. 

My plugin needs to store audio samples from one processing call to the next, so I want to include a vector of floats as a class member.

I've followed the tutorial, have installed the sdk, and can compile the example (MyPlugin) without any problems.

Things go wrong when I declare a vector in the protected: section of the header file.

>>
Code: [Select]
protected:
std::vector<float> test;
};
>>


When I add this single line, the plugin still compiles, but then generates a bunch of errors culminating in a segmentation fault when I run the plugin tester.   Console output and the error log and pasted below.

I'm on mac os 10.6.6.

Do you have any idea what the problem might be? 

I'm new to C++, so if this is a simple syntax error, please accept my apologies for asking about it here. 

Thanks so much for you help,


Dave

>>
Error log:
>>
Quote
Process:         vamp-plugin-tester [3367]
Path:            /Users/davebenson/tutorial/vamp-plugin-tester
Identifier:      vamp-plugin-tester
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  bash [409]

Date/Time:       2011-01-25 23:37:25.450 -0500
OS Version:      Mac OS X 10.6.6 (10J567)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000fffffffc
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libstdc++.6.dylib                0x9848ed85 std::string::_Rep::_M_dispose(std::allocator<char> const&) + 31
1   libstdc++.6.dylib                0x9848f5c1 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() + 29
2   vamp-plugin-tester               0x0001a197 __gnu_cxx::new_allocator<std::string>::destroy(std::string*) + 17 (new_allocator.h:107)
3   vamp-plugin-tester               0x0001a1b4 void std::_Destroy<std::string*, std::allocator<std::string> >(std::string*, std::string*, std::allocator<std::string>) + 26 (stl_construct.h:173)
4   vamp-plugin-tester               0x0001a3ec std::vector<std::string, std::allocator<std::string> >::~vector() + 58 (stl_vector.h:273)
5   vamp-plugin-tester               0x000034f2 main + 1930 (vamp-plugin-tester.cpp:156)
6   vamp-plugin-tester               0x0000261a _start + 216
7   vamp-plugin-tester               0x00002541 start + 41

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0xffffffff  ebx: 0x9848ed6f  ecx: 0xfffffff4  edx: 0xfffffffc
  edi: 0x00000001  esi: 0x00000006  ebp: 0xbffff808  esp: 0xbffff804
   ss: 0x0000001f  efl: 0x00010293  eip: 0x9848ed85   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0xfffffffc

Binary Images:
    0x1000 -    0x34fff +vamp-plugin-tester ??? (???) /Users/davebenson/tutorial/vamp-plugin-tester
0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <A4F6ADCC-6448-37B4-ED6C-ABB2CD06F448> /usr/lib/dyld
0x91f68000 - 0x91f6bfe7  libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib
0x97672000 - 0x97819ff7  libSystem.B.dylib 125.2.1 (compatibility 1.0.0) <62291026-D016-705D-DC1E-FC2B09D47DE5> /usr/lib/libSystem.B.dylib
0x9845f000 - 0x984c9fe7  libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib
0xffff0000 - 0xffff1fff  libSystem.B.dylib ??? (???) <62291026-D016-705D-DC1E-FC2B09D47DE5> /usr/lib/libSystem.B.dylib


>>


Console output:
>>
Quote
vamp-plugin-tester: Running...
Testing plugin: test:myplugin
 -- Performing test: A1 Invalid identifiers
 -- Performing test: A2 Empty metadata fields
 ** WARNING: Plugin description is empty
 ** WARNING: Plugin maker is empty
 ** WARNING: Plugin copyright is empty
 ** WARNING: Plugin parameter "parameter" description is empty
 ** WARNING: Plugin output "output" description is empty
 -- Performing test: A3 Inappropriate value extents
 -- Performing test: B1 Output number mismatching
 ** NOTE: No results returned for output "output"
 -- Performing test: B2 Invalid or dubious timestamp usage
 -- Performing test: C1 Normal input
 -- Performing test: C2 Empty input
 -- Performing test: C3 Short input
 -- Performing test: C4 Absolutely silent input
 -- Performing test: C5 Input beyond traditional +/-1 range
 -- Performing test: C6 Random input
 -- Performing test: D1 Consecutive runs with separate instances
 -- Performing test: D2 Consecutive runs with a single instance using reset
 -- Performing test: D3 Simultaneous interleaved runs in a single thread
 -- Performing test: D4 Consecutive runs with different start times
vamp-plugin-tester(3367) malloc: *** error for object 0x300fa0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
 ** WARNING: Consecutive runs with different starting timestamps produce the same result
 -- Performing test: E1 Inconsistent default program
 -- Performing test: E2 Inconsistent default parameters
vamp-plugin-tester(3367) malloc: *** error for object 0x301410: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
 -- Performing test: F1 Different sample rates
vamp-plugin-tester(3367) malloc: *** error for object 0x301650: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
vamp-plugin-tester(3367) malloc: *** error for object 0x301710: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
vamp-plugin-tester(3367) malloc: *** error for object 0x301630: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
 -- Performing test: F2 Lengthy constructor
vamp-plugin-tester: All tests succeeded for this plugin

vamp-plugin-tester: All tests succeeded, with 6 warning(s) and 1 other note(s)
Segmentation fault
>>



2
Hi there,

I'm developing a VAMP host using the host-sdk.  My code links to the "libvamp-hostsdk.a" library.

I'm getting weird behaviour when I try to load plugin libraries.  When I compile the example plugins, the resulting "vamp-example-plugins.dylib" loads just fine.  When I try to load libraries that I've downloaded from the net, though, I get errors like this:

>>
Vamp::HostExt::PluginLoader: Unable to load library "/Users/davebenson/Documents/examples/qm-vamp-plugins.dylib": dlopen(/Users/davebenson/Documents/examples/qm-vamp-plugins.dylib, 5): no suitable image found.  Did find:
   /Users/davebenson/Documents/examples/qm-vamp-plugins.dylib: no matching architecture in universal wrapper

>>

Strangely, though, when I use the same plugin library in Sonic Visualizer it loads perfectly.  Any idea what the problem is?  Why the errors?

I'm working on a 2009 MacBook Pro, Intel Core 2 Duo processor, running OS 10.6.4.

Many thanks for your help,


Dave

Pages: [1]