|
04-22-2011, 10:28 AM
|
#1
|
Human being with feelings
Join Date: Jun 2007
Location: Tromsø, Norway
Posts: 223
|
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..
|
|
|
04-22-2011, 10:49 AM
|
#2
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
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.
|
|
|
04-23-2011, 08:25 AM
|
#3
|
Human being with feelings
Join Date: Jun 2007
Location: Tromsø, Norway
Posts: 223
|
Thanks,
it didn't help me much though :\
|
|
|
04-23-2011, 01:50 PM
|
#4
|
Human being with feelings
Join Date: Mar 2009
Posts: 256
|
My images always end up in Contents/Resources/ (not in an img subdirectory).
|
|
|
04-23-2011, 05:03 PM
|
#5
|
Human being with feelings
Join Date: Jun 2007
Location: Tromsø, Norway
Posts: 223
|
Quote:
Originally Posted by cc_
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.
|
|
|
04-24-2011, 04:31 PM
|
#6
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
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!
|
|
|
04-25-2011, 06:23 AM
|
#7
|
Human being with feelings
Join Date: Jun 2007
Location: Tromsø, Norway
Posts: 223
|
actually, I've got 1 jpg .. for the background .. Isn't it supported?
|
|
|
04-27-2011, 01:35 PM
|
#8
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
That depends on the WDL/IPlug edition your are using. The original WDL does support JPEG.
|
|
|
11-16-2012, 01:18 PM
|
#9
|
Human being with feelings
Join Date: Jun 2007
Location: Tromsø, Norway
Posts: 223
|
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
|
|
|
06-29-2013, 11:40 AM
|
#10
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
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?
|
|
|
06-29-2013, 12:17 PM
|
#11
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
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.
|
|
|
06-29-2013, 06:34 PM
|
#12
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
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.
|
|
|
06-29-2013, 06:42 PM
|
#13
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
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?
|
|
|
06-30-2013, 12:37 AM
|
#14
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
Quote:
Originally Posted by bozmillar
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".
|
|
|
06-30-2013, 12:46 AM
|
#15
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
hmm. yeah, my bundleID is com.BozDigitalLabs.standalone.Rhino
|
|
|
06-30-2013, 12:49 AM
|
#16
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
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"
*/
|
|
|
06-30-2013, 01:14 AM
|
#17
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
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?
|
|
|
06-30-2013, 02:07 AM
|
#18
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
Just a wild guess, but is the CFBundleIdentifier in your .plist file also set to "com.BozDigitalLabs.standalone.Rhino"?
Quote:
Originally Posted by bozmillar
Code:
#define BG_FN "../resources/img/backplate.png"
|
Is this correct? Because all your other images are in resources/img/, not ../resources/img/.
|
|
|
06-30-2013, 09:18 AM
|
#19
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
BTW you might want to find a different name for your plugin
http://www.bigtickaudio.com/
|
|
|
06-30-2013, 10:28 AM
|
#20
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
Quote:
Originally Posted by olilarkin
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.
|
|
|
06-30-2013, 10:29 AM
|
#21
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
Quote:
Originally Posted by Tale
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.
|
|
|
06-30-2013, 10:34 AM
|
#22
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
Quote:
Originally Posted by Tale
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.
|
|
|
06-30-2013, 10:37 AM
|
#23
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
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.
|
|
|
06-30-2013, 10:41 AM
|
#24
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,646
|
Quote:
Originally Posted by bozmillar
That was it! You guys are like magic.
|
Yay!
|
|
|
06-13-2014, 03:47 PM
|
#25
|
Human being with feelings
Join Date: Apr 2012
Posts: 279
|
Quote:
Originally Posted by Tale
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.
|
|
|
09-01-2017, 09:32 AM
|
#26
|
Human being with feelings
Join Date: Apr 2014
Posts: 84
|
@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.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:18 AM.
|