COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 05-09-2016, 01:55 PM   #1
jack461
Human being with feelings
 
jack461's Avatar
 
Join Date: Nov 2013
Location: France
Posts: 181
Default Strange plugin / Xcode behaviour

Hi !

I am working on an iMac, OS X 10.9, Xcode 6.2, and able to test only AU and VST versions, essentially with REAPER.

I compile my plugin, and run it with REAPER 64 bits.
When REAPER is started by Xcode, I use a session where the plugin is NOT used in any track.

Now, the strange thing.

When I compile and run the VST version, Xcode indicates (by traces in the code) that the plugin is created, then deleted.
When I install the plugin in a REAPER track, the plugin is created a second time, and is deleted when I end the REAPER session.

Now, when I compile and run the AU version, Xcode does not create the plugin.
The plugin is created only when I install it as a track FX, and is normally deleted when I end the session.

When I run directly REAPER, the VST is created only when I install it as a track FX.

Is there a reason why Xcode behaves differently for the VST and AU versions ?

Finally, I have a lot of occasional exceptions when I launch the plugin from Xcode.
The error code is in dispatch_introspection_queue_item_get_info:

Code:
thread 6: EXC_BAD_ACCESS (code=1, address=0x1dc60sfd0)
...
0x100d3f4fa:  testq  %rax, %rax
0x100d3f4fd:  movl   $0x0, %r14d
0x100d3f503:  je     0x100d3f50e               ; dispatch_introspection_queue_item_get_info + 674
on this instruction ====>  0x100d3f505:  movq   0x20(%rax), %r14
0x100d3f509:  movswq 0x28(%rax), %r9
0x100d3f50e:  cmpq   0x8b1b(%rip), %r10        ; (void *)0x0000000100d3292b: _dispatch_after_timer_callback
When the error occurs, the plugin has not yet been created. This error seems to occur once in three or four consecutive runs (without modifying the code).

I have been working for two weeks on the problem to try to better nail it, It really seems that I can't give more precise indications about it.

So, if someone can be of any help ?

Many thanks.
jack461 is offline   Reply With Quote
Old 05-09-2016, 10:57 PM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,652
Default

I think what happens is that REAPER on launch detects that your VST bundle has changed, and therefore temporarily loads it. This is how REAPER detects new plug-ins. For some reason REAPER can't detect new AUs, so I guess this is why it doesn't happen with AU.

I can't help you with the exception... Does dispatch_introspection_queue_item_get_info mean anything to you i.e. is this a data type your plug-in uses?
Tale is offline   Reply With Quote
Old 05-10-2016, 11:00 AM   #3
jack461
Human being with feelings
 
jack461's Avatar
 
Join Date: Nov 2013
Location: France
Posts: 181
Default

Tale, you're totally right. After a new compilation of the VST version of the plugin, REAPER, whether it is launched by Xcode or directly, loads temporarily the plugin, even if it is not used in the session. It does not do that for the AU version. So this answers completely my first question - many thanks for this clarification.

For the exception, I don't know what to think. It happens as soon as I click the 'Build and Run the current scheme" icon of Xcode, and REAPER does not even display its GUI.

There are only six thread, with
Code:
1: Queue: com.apple.main-thread (serial)
2: empty 
3: Queue: com.apple.libdispatch-manager (serial)
4: empty
5: empty
6:[*] 0 dispatch_introspection_queue_item_get_info 
[*] 12 thread_start
The actual first line of the code dump is :

Code:
libdispatch.dylib`dispatch_introspection_queue_item_get_info
(and I didn't know I asked for that :-)

I am running the code with "Enable Gard Edges" and "Enable Gard Malloc" checked in Run/debug Diagnostics, and the only messages displayed are :
Code:
GuardMalloc[REAPER-8779]: Allocations will be placed on 16 byte boundaries.
GuardMalloc[REAPER-8779]:  - Some buffer overruns may not be noticed.
GuardMalloc[REAPER-8779]:  - Applications using vector instructions (e.g., SSE) should work.
GuardMalloc[REAPER-8779]: version 27
(lldb)
before the error and the debugger prompt. So this may be a consequence of running REAPER with this memory debugging mode. I will try some tests with and without the Diagnostics checked...
jack461 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.