COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 04-22-2011, 10:28 AM   #1
onqel
Human being with feelings
 
onqel's Avatar
 
Join Date: Jun 2007
Location: Troms°, Norway
Posts: 223
Default OSX n00b Resource problem..

Hi

I've got access to a OSX system (10.6) with Xcode 4 .. the IPlugExample built just fine.

The problem occours now when I'm trying to build and run one of my own plugins.. It builds fine but the plugin can't find one of the resources (Assertion failed: (imgResourceFound)) .. I think I've tried and failed for a couple of hours now without luck and I haven't touched OSX and XCode before so if you guys can tell me what I'm doing wrong it'll be very helpful!

I'm the project I'm adding (all) my graphics to Resources/img/...
The resource.h tells the program to look for e.g "img/BG.png" ..
(All) the files appears in "Copy bundle resources" in both the AU and VST target ..

(The project is built a modifed IPlugExample.xcodeproj)

Thanks..
onqel is offline   Reply With Quote
Old 04-22-2011, 10:49 AM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,834
Default

I also got the imgResourceFound failure when I first tried to build for OS X. In my case the problem was that on Mac OS X filenames are case-sensitive. On Windows I never noticed this, because on Windows filenames aren't case-sensitive.

BTW, I found out which image it was by disabling all GUI controls, and then adding them again one by one. When I enabled the GUI control using the culprit image filename, I got the imgResourceFound failure again, so then I knew it had something to do with that specific image.
Tale is online now   Reply With Quote
Old 04-23-2011, 08:25 AM   #3
onqel
Human being with feelings
 
onqel's Avatar
 
Join Date: Jun 2007
Location: Troms°, Norway
Posts: 223
Default

Thanks,

it didn't help me much though :\
onqel is offline   Reply With Quote
Old 04-23-2011, 01:50 PM   #4
cc_
Human being with feelings
 
Join Date: Mar 2009
Posts: 256
Default

My images always end up in Contents/Resources/ (not in an img subdirectory).
cc_ is offline   Reply With Quote
Old 04-23-2011, 05:03 PM   #5
onqel
Human being with feelings
 
onqel's Avatar
 
Join Date: Jun 2007
Location: Troms°, Norway
Posts: 223
Default

Quote:
Originally Posted by cc_ View Post
My images always end up in Contents/Resources/ (not in an img subdirectory).
Yeah they end up the same here.. but, I put my images in the image folder under the XCode project's resource folder ..
I'll figure it out eventually

Last edited by onqel; 04-23-2011 at 05:10 PM.
onqel is offline   Reply With Quote
Old 04-24-2011, 04:31 PM   #6
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,016
Default

got any jpg resources? I just had this problem... img resource not found, i was trying to load a jpg and forgot i had removed it from my iplug, since i thought i'd never need it... typical!
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 04-25-2011, 06:23 AM   #7
onqel
Human being with feelings
 
onqel's Avatar
 
Join Date: Jun 2007
Location: Troms°, Norway
Posts: 223
Default

actually, I've got 1 jpg .. for the background .. Isn't it supported?
onqel is offline   Reply With Quote
Old 04-27-2011, 01:35 PM   #8
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,834
Default

That depends on the WDL/IPlug edition your are using. The original WDL does support JPEG.
Tale is online now   Reply With Quote
Old 11-16-2012, 01:18 PM   #9
onqel
Human being with feelings
 
onqel's Avatar
 
Join Date: Jun 2007
Location: Troms°, Norway
Posts: 223
Default

Got an iMac and tried compiling my plugins again with the 4.5 version of Xcode, but couldn't add images without getting the imgResourceFound error, tried everything I think, they were added to the right targets etc and added to the .vst/Resource folder as normal..
I ended up downgrading to Xcode 3.2.6 and everything compiles like a dream :P the 4.5 version seems buggy IMO, I can compile the examples right, but when I remove images and add some new ones the problem starts.. If there's a known solution to this I would like to know
onqel is offline   Reply With Quote
Old 06-29-2013, 11:40 AM   #10
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

blast, I'm having the same issue here, but I'm on xCode 3.2.6

I'm sure I'm just missing something simple somewhere. This is my first time using xcode so I'm kind of fumbling around. The wdl-ol examples compile fine for me, but when I try to compile my own, they compile but crash.

It's crashing in iGraphics::LoadBitmap(). OSLoadBitmap(ID, name) isn't returning a valid image.

I have my images (all png) loaded into my [project name]/resources/img folder.

Is there some checkbox I'm missing somewhere? or am I loading them wrong?
bozmillar is offline   Reply With Quote
Old 06-29-2013, 12:17 PM   #11
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

I'm guessing I have a relative path somewhere set up wrong or something. When I compiled my project in xCode, I had to change the path to Denormal.h from

#include "../WDL/denormal.h" (VS)
to
#include "../../WDL/denormal.h" (Xcode)

I'm guessing that somewhere a path changed and I don't know where that is. I see that common.xcconfig has some paths set.

Code:
WDL_PATH = $(SRCROOT)/../../WDL
IPLUG_PATH = $(WDL_PATH)/IPlug
VST3_SDK = $(SRCROOT)/../../VST3_SDK
PT9_SDK = $(SRCROOT)/../../PT9_SDK
AAX_SDK = $(SRCROOT)/../../AAX_SDK
CA_SDK = $DEVELOPER_DIR/Extras/CoreAudio
Is there a chance any of those are wrong if I didn't change them? I can't find where SRCROOT is defined.
bozmillar is offline   Reply With Quote
Old 06-29-2013, 06:34 PM   #12
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

ok, a little more info.

There is a line in LoadImgFromResourceOSX() that is:

NSBundle* pBundle = [NSBundle bundleWithIdentifier:ToNSString(bundleID)];

It's always returning NULL, which makes LoadImgFromResourceOSX() return 0.
bozmillar is offline   Reply With Quote
Old 06-29-2013, 06:42 PM   #13
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

by the way, when I just make changes to one of the sample project, it seems to work just fine. I'm just trying to give clues to see if anything sticks out as obviously wrong.

Is it bad that my PLUG_MFR has whitespaces in it?
bozmillar is offline   Reply With Quote
Old 06-30-2013, 12:37 AM   #14
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,834
Default

Quote:
Originally Posted by bozmillar View Post
Is it bad that my PLUG_MFR has whitespaces in it?
No, that is OK. However, your BUNDLE_MFR (and BUNDLE_NAME) shouldn't contain spaces.

I would print out your BUNDLE_ID to see if that looks OK. It should be something like e.g. "com.Martinic.vst.ComboF".
Tale is online now   Reply With Quote
Old 06-30-2013, 12:46 AM   #15
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

hmm. yeah, my bundleID is com.BozDigitalLabs.standalone.Rhino
bozmillar is offline   Reply With Quote
Old 06-30-2013, 12:49 AM   #16
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

Here's my entire resource.h file. I'm assuming it's something in here, but I don't know.

Code:
#define PLUG_MFR "Boz Digital Labs"
#define PLUG_NAME "Rhino"

#define PLUG_CLASS_NAME Rhino

#define BUNDLE_MFR "BozDigitalLabs"
#define BUNDLE_NAME "Rhino"

#define PLUG_ENTRY Rhino_Entry
#define PLUG_VIEW_ENTRY Rhino_ViewEntry

#define PLUG_ENTRY_STR "Rhino_Entry"
#define PLUG_VIEW_ENTRY_STR "Rhino_ViewEntry"

#define VIEW_CLASS Rhino_View
#define VIEW_CLASS_STR "Rhino_View"

// Format        0xMAJR.MN.BG - in HEX! so version 10.1.5 would be 0x000A0105
#define PLUG_VER 0x00000905
#define VST3_VER_STR "0.9.5"

// http://service.steinberg.de/databases/plugin.nsf/plugIn?openForm
// 4 chars, single quotes. At least one capital letter
#define PLUG_UNIQUE_ID 'BlRn'
// make sure this is not the same as BUNDLE_MFR
#define PLUG_MFR_ID 'BDLa'

// ProTools stuff

#if (defined(AAX_API) || defined(RTAS_API)) && !defined(_PIDS_)
  #define _PIDS_
  const int PLUG_TYPE_IDS[2] = {'EFN1', 'EFN2'};
  const int PLUG_TYPE_IDS_AS[2] = {'EFA1', 'EFA2'}; // AudioSuite
#endif

#define PLUG_MFR_PT "BozDigialLabs\nBozDigitalLabs\nBozDigital"
#define PLUG_NAME_PT "Rhino\nBDLA"
#define PLUG_TYPE_PT "Effect"
#define PLUG_DOES_AUDIOSUITE 1

/* PLUG_TYPE_PT can be "None", "EQ", "Dynamics", "PitchShift", "Reverb", "Delay", "Modulation", 
"Harmonic" "NoiseReduction" "Dither" "SoundField" "Effect" 
instrument determined by PLUG _IS _INST
*/

#define PLUG_CHANNEL_IO "1-1 2-2"

#define PLUG_LATENCY 0
#define PLUG_IS_INST 0

// if this is 0 RTAS can't get tempo info
#define PLUG_DOES_MIDI 0

#define PLUG_DOES_STATE_CHUNKS 1

// Unique IDs for each image resource.
#define BG_ID 101
#define KNOB_ID 102
#define KNOBSMALL_ID 103
#define CLICKENABLE_ID 104
#define EDIT_ID 105
#define CLICKLIGHT_ID 106
#define CLICKEDIT_ID 107
#define BOOMENEABLE_ID 108
#define BOOMLIGHT_ID 109
#define	BOOMEDIT_ID 110
#define DRYENABLE_ID 111
#define DRYLIGHT_ID 112
#define DRYEDIT_ID 113
#define CHECKBOX_ID 114
#define SWEEPLIGHT_ID 115
#define FADERNUB_ID 116
#define ABOUT_ID 117
#define ABOUTBG_ID 118
#define RESET_ID 119
#define LICENSE_ID 120
#define TARGETNOTLIGHT_ID 121
#define HARMONICSLIGHT_ID 122
#define BUYNOW_ID 123
#define CONTINUETRIAL_ID 124
#define YOUTUBE_ID 125
#define TWITTER_ID 126
#define FACEBOOK_ID 127
#define CLICKHELP_ID 128
#define BOOMHELP_ID 129
#define DRYHELP_ID 130


// Image resource locations for this plug.
#define BG_FN "../resources/img/backplate.png"
#define KNOB_FN "resources/img/knobBig.png"
#define KNOBSMALL_FN "resources/img/screenKnobWide.png"
#define CLICKENABLE_FN "resources/img/click2.png"
#define CLICKLIGHT_FN "resources/img/smallMeterLight.png"
#define CLICKEDIT_FN "resources/img/clickEdit3.png"
#define EDIT_FN "resources/img/edit.png"
#define BOOMENEABLE_FN "resources/img/boom.png"
#define BOOMLIGHT_FN "resources/img/boomLight.png"
#define BOOMEDIT_FN "resources/img/boomEdit3.png"
#define DRYENABLE_FN "resources/img/dry.png"
#define DRYLIGHT_FN "resources/img/dryLight.png"
#define DRYEDIT_FN "resources/img/dryEdit3.png"
#define CHECKBOX_FN "resources/img/switch.png"
#define SWEEPLIGHT_FN "resources/img/sweepLight.png"
#define FADERNUB_FN "resources/img/cursor.png"
#define ABOUT_FN "resources/img/about.png"
#define ABOUTBG_FN "resources/img/aboutBG2.png"
#define RESET_FN "resources/img/reset.png"
#define LICENSE_FN "resources/img/licenseBG.png"
#define TARGETNOTLIGHT_FN "resources/img/targetNoteLight.png"
#define HARMONICSLIGHT_FN "resources/img/harmonicsLight.png"
#define BUYNOW_FN "resources/img/buyNow.png"
#define CONTINUETRIAL_FN "resources/img/continueTrial.png"
#define YOUTUBE_FN "resources/img/youtube.png"
#define TWITTER_FN "resources/img/twitter.png"
#define FACEBOOK_FN "resources/img/facebook.png"
#define CLICKHELP_FN "resources/img/click help.png"
#define BOOMHELP_FN "resources/img/oomph help.png"
#define DRYHELP_FN "resources/img/direct help.png"


// GUI default dimensions
#define GUI_WIDTH 262
#define GUI_HEIGHT 434

// on MSVC, you must define SA_API in the resource editor preprocessor macros as well as the c++ ones
#if defined(SA_API) && !defined(OS_IOS)
#include "app_wrapper/app_resource.h"
#endif

// vst3 stuff
#define MFR_URL "http://bozdigitallabs.com/"
#define MFR_EMAIL "boz@bozdigitallabs.com"
#define EFFECT_TYPE_VST3 "Fx"

/* "Fx|Analyzer"", "Fx|Delay", "Fx|Distortion", "Fx|Dynamics", "Fx|EQ", "Fx|Filter",
"Fx", "Fx|Instrument", "Fx|InstrumentExternal", "Fx|Spatial", "Fx|Generator",
"Fx|Mastering", "Fx|Modulation", "Fx|PitchShift", "Fx|Restoration", "Fx|Reverb",
"Fx|Surround", "Fx|Tools", "Instrument", "Instrument|Drum", "Instrument|Sampler",
"Instrument|Synth", "Instrument|Synth|Sampler", "Instrument|External", "Spatial",
"Spatial|Fx", "OnlyRT", "OnlyOfflineProcess", "Mono", "Stereo",
"Surround"
*/
bozmillar is offline   Reply With Quote
Old 06-30-2013, 01:14 AM   #17
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,016
Default

If you click on the Targets section in xcode, and go to "Copy Bundle Resources" for the standalone (or whatever target your building) do you see all the png files there?
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 06-30-2013, 02:07 AM   #18
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,834
Default

Just a wild guess, but is the CFBundleIdentifier in your .plist file also set to "com.BozDigitalLabs.standalone.Rhino"?

Quote:
Originally Posted by bozmillar View Post
Code:
#define BG_FN "../resources/img/backplate.png"
Is this correct? Because all your other images are in resources/img/, not ../resources/img/.
Tale is online now   Reply With Quote
Old 06-30-2013, 09:18 AM   #19
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,016
Default

BTW you might want to find a different name for your plugin

http://www.bigtickaudio.com/
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 06-30-2013, 10:28 AM   #20
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

Quote:
Originally Posted by olilarkin View Post
If you click on the Targets section in xcode, and go to "Copy Bundle Resources" for the standalone (or whatever target your building) do you see all the png files there?
Yes, I see them in there.
bozmillar is offline   Reply With Quote
Old 06-30-2013, 10:29 AM   #21
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

Quote:
Originally Posted by Tale View Post
Just a wild guess, but is the CFBundleIdentifier in your .plist file also set to "com.BozDigitalLabs.standalone.Rhino"?


Is this correct? Because all your other images are in resources/img/, not ../resources/img/.
oh, sorry. I was trying that to see if that was an issue and didn't switch it back before pasting the code. It doesn't work if I have it as resources/img/ either.
bozmillar is offline   Reply With Quote
Old 06-30-2013, 10:34 AM   #22
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

Quote:
Originally Posted by Tale View Post
Just a wild guess, but is the CFBundleIdentifier in your .plist file also set to "com.BozDigitalLabs.standalone.Rhino"?
Ah Ha! No it isn't.
bozmillar is offline   Reply With Quote
Old 06-30-2013, 10:37 AM   #23
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 576
Default

That was it! You guys are like magic.

The whole name thing came up last week. I think I'm just going to have to ask the guys as Big Tick if there are any issues. If there are, I'll just change the name.
bozmillar is offline   Reply With Quote
Old 06-30-2013, 10:41 AM   #24
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,834
Default

Quote:
Originally Posted by bozmillar View Post
That was it! You guys are like magic.
Yay!
Tale is online now   Reply With Quote
Old 06-13-2014, 03:47 PM   #25
stw
Human being with feelings
 
Join Date: Apr 2012
Posts: 235
Default

Quote:
Originally Posted by Tale View Post
No, that is OK. However, your BUNDLE_MFR (and BUNDLE_NAME) shouldn't contain spaces.
Sorry for digging out that old thread...
but i ran into similar issues and finally found the reason for it.
All of a sudden i got crashes with Reaper on Mac while scanning my plug. First it seemed to be some graphics related issue because i got a break at bitmap loadings. After a whole day of bug hunting which lead me into every line of code of my creation i just found out that a simple "-" added in my BUNDLE_MFR name in the resource.h caused the whole trouble!
I checked this with the IPlugEffect example and got the same crashes.
But the issue is not the added character itself but rather that the BUNDLE_MFR didn't corespondend to the project .plist bundle names from the python duplication script anymore!
I didn't notice that Mac related bug because i developed on Win most time before.

So i just want to spread the info that one has to be careful when editing any of these resource.h definitions.
Maybe that kind of info could be included in upcoming releases of wdl-ol.
stw is offline   Reply With Quote
Old 09-01-2017, 09:32 AM   #26
1eqinfinity
Human being with feelings
 
Join Date: Apr 2014
Posts: 77
Default

@stw Thank you! I totally forgot that long ago after running the duplicate script I did some changes in resource.h. iplist files had the old data.
__________________
soundcloud.com/crimsonbrain
1eqinfinity 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 04:09 PM.


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