I changed the file paths and can run my app from Xcode. However, when I try to run it in debug from VS Code it crashes throwing these errors:
<unknown>:0: error: PCH was compiled with module cache path '/Users/Dan/Downloads/Business/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH', but the path is currently '/Users/Dan/Downloads/Business/apps/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH'
<unknown>:0: error: missing required module 'SwiftShims'
<unknown>:0: error: PCH was compiled with module cache path '/Users/Dan/Downloads/Business/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH', but the path is currently '/Users/Dan/Downloads/Business/apps/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH'
<unknown>:0: error: missing required module 'SwiftShims'
<unknown>:0: error: PCH was compiled with module cache path '/Users/Dan/Downloads/Business/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH', but the path is currently '/Users/Dan/Downloads/Business/apps/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH'
<unknown>:0: error: missing required module 'SwiftShims'
<unknown>:0: error: PCH was compiled with module cache path '/Users/Dan/Downloads/Business/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH', but the path is currently '/Users/Dan/Downloads/Business/apps/bowa/build/macos/ModuleCache.noindex/1OUJJSWMDF0CH'
<unknown>:0: error: missing required module 'SwiftShims'
Command EmitSwiftModule failed with a nonzero exit code
error: emit-module command failed with exit code 1 (use -v to see invocation)
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/App' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/Info.plist' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.json' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/FontManifest.json' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/NOTICES.Z' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/fonts/MaterialIcons-Regular.otf' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/isolate_snapshot_data' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/kernel_blob.bin' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/lib/images/IMG-1124.jpg' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/vm_snapshot_data' is located outside of the allowed root paths.
warning: Stale file '/Users/Dan/Downloads/Business/apps/bowa/macos/DerivedDataMoved/Runner/Index/Build/Products/Debug/FlutterMacOS.framework/Versions/A/FlutterMacOS' is located outside of the allowed root paths.
** BUILD FAILED **
Exception: Build process failed
Exited
I have found some answers recommending deleting, changing, and cleaning the DerivedData folder. I have tried cleaning my Xcode project and running, Deleting the DerivedData folder and running, renaming DerivedData Folder and saving relatively, and deleting specifically the ModuleCache.noindex folder in DerivedData.
None of these solutions have worked for me and I'm not sure why.
Great Tool and thank you for your considerable time and effort! I've noticed is upon launching the Designer to attempt deleting unused images: once the Designer is launched, but is still loading the Theme, I can select the "Delete unused images" which launches its interface(list). But if I let the Theme load then the Delete unused images list will not appear. Once Theme has loaded it is populates with images, all with the Selector name as 'import-############" So the Theme is using these images... even if I don't intend to. I have designed all of the interface layout in the Gui Builder. If i remove one of these 'import-############" files and save then try run project, the project does run, eventually(10minutes+ before simulator launch) but continually gives the following: Warning: loading large images using EncodedImage.create(InputStream) might lead to memory issues, try using EncodedImage.create(InputStream, int). Too further this diagnosis if I launch designer and allow Theme to load (2-3minutes aprox) and click save then try to run project, so deleting nothing, I get the same error message. So it seems to me when I launch Designer, it imports these images which then causes the error/warning. So is there a way to avoid this importing of images and remove the unwanted images? In contrast if I don't launch Designer, and straight run the project in Netbeans. I don't get the error/warning and the project launches in simulator much speedier. For each of these scenarios I have copied a new project folder then launched netbeans. This folder, the project would not have had the Designer launched prior.
If I manually remove unused images I get null pointer Exception errors...
Re Shai's comments on 26/May
So when I delete the images and both "theme.res" files the project fails to run and generates following output:
Generating GUI sources
timeStr=1.0.0-1589639113000-1588429678000, lastTime=1.0.0-1589639113000-1588429678000
CIMenus.java unmodified, skipping
timeStr=1.0.0-1588250408000-1588255873000, lastTime=1.0.0-1588250408000-1588255873000
SplashForm.java unmodified, skipping
timeStr=1.0.0-1589730011000-1589485802000, lastTime=1.0.0-1589730011000-1589485802000
PractiseArea.java unmodified, skipping
timeStr=1.0.0-1588621870000-1588255973000, lastTime=1.0.0-1588621870000-1588255973000
Login.java unmodified, skipping
timeStr=1.0.0-1588507007000-1588506037000, lastTime=1.0.0-1588507007000-1588506037000
CISpaceInvader.java unmodified, skipping
timeStr=1.0.0-1589637149000-1588621944000, lastTime=1.0.0-1589637149000-1588621944000
LessonPlayer.java unmodified, skipping
init:
Deleting: /Users/andrew/netbeans-workspace/CrackinIt/build/built-jar.properties
deps-jar:
Updating property file: /Users/andrew/netbeans-workspace/CrackinIt/build/built-jar.properties
JavaFX is loaded
Retina Scale: 2.0
Updating merge file /Users/andrew/netbeans-workspace/CrackinIt/css/theme.css.merged
Input: /Users/andrew/netbeans-workspace/CrackinIt/css/theme.css
Output: /Users/andrew/netbeans-workspace/CrackinIt/src/theme.res
Acquiring lock on CSS checksums file /Users/andrew/netbeans-workspace/CrackinIt/.cn1_css_checksums...
Lock obtained
An error occurred while updating resources for UIID import-1588534357646. Processing property bgImage
Releasing lock
java.lang.RuntimeException: java.io.FileNotFoundException: /Users/andrew/netbeans-workspace/CrackinIt/css/images/Button1-7.png (No such file or directory)
at com.codename1.designer.css.CSSTheme.getBackgroundImage(CSSTheme.java:2310)
at com.codename1.designer.css.CSSTheme.getBackgroundImages(CSSTheme.java:1981)
at com.codename1.designer.css.CSSTheme.updateResources(CSSTheme.java:1678)
at com.codename1.designer.css.CN1CSSCLI.compile(CN1CSSCLI.java:535)
at com.codename1.designer.css.CN1CSSCLI.main(CN1CSSCLI.java:390)
at com.codename1.designer.ResourceEditorApp.main(ResourceEditorApp.java:556)
Caused by: java.io.FileNotFoundException: /Users/andrew/netbeans-workspace/CrackinIt/css/images/Button1-7.png (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at java.net.URL.openStream(URL.java:1045)
at com.codename1.designer.css.CSSTheme.getBackgroundImage(CSSTheme.java:2258)
... 5 more
/Users/andrew/netbeans-workspace/CrackinIt/build.xml:628: Java returned: 1
BUILD FAILED (total time: 4 seconds)
When I delete the images and the "theme.res" file from the "build" folder the project launches with a "theme.res"(res) file in the project viewer, project runs. If I launch the res file and allow it to load theme then save and exit from the designer, the project runs.
But if I launch the res file and allow it to load theme then remove one of the images that isn't being used, save and exit from the designer, the "theme.res" file is gone from project viewer. When attempting to run project, it now gives the following:
ant -f /Users/andrew/netbeans-workspace/CrackinIt -Dnb.internal.action.name=run run
Generating GUI sources
timeStr=1.0.0-1589639113000-1588429678000, lastTime=1.0.0-1589639113000-1588429678000
CIMenus.java unmodified, skipping
timeStr=1.0.0-1588250408000-1588255873000, lastTime=1.0.0-1588250408000-1588255873000
SplashForm.java unmodified, skipping
timeStr=1.0.0-1589730011000-1589485802000, lastTime=1.0.0-1589730011000-1589485802000
PractiseArea.java unmodified, skipping
timeStr=1.0.0-1588621870000-1588255973000, lastTime=1.0.0-1588621870000-1588255973000
Login.java unmodified, skipping
timeStr=1.0.0-1588507007000-1588506037000, lastTime=1.0.0-1588507007000-1588506037000
CISpaceInvader.java unmodified, skipping
timeStr=1.0.0-1589637149000-1588621944000, lastTime=1.0.0-1589637149000-1588621944000
LessonPlayer.java unmodified, skipping
init:
Deleting: /Users/andrew/netbeans-workspace/CrackinIt/build/built-jar.properties
deps-jar:
Updating property file: /Users/andrew/netbeans-workspace/CrackinIt/build/built-jar.properties
JavaFX is loaded
Retina Scale: 2.0
Updating merge file /Users/andrew/netbeans-workspace/CrackinIt/css/theme.css.merged
Input: /Users/andrew/netbeans-workspace/CrackinIt/css/theme.css
Output: /Users/andrew/netbeans-workspace/CrackinIt/src/theme.res
Acquiring lock on CSS checksums file /Users/andrew/netbeans-workspace/CrackinIt/.cn1_css_checksums...
Lock obtained
/Users/andrew/netbeans-workspace/CrackinIt/src/theme.res has been modified since it was last compiled. Making copy at /Users/andrew/netbeans-workspace/CrackinIt/css/.backups/theme.res.1590562229494.bak
An error occurred while updating resources for UIID import-1588534357646. Processing property bgImage
Releasing lock
java.lang.RuntimeException: java.io.FileNotFoundException: /Users/andrew/netbeans-workspace/CrackinIt/css/images/Button1-7.png (No such file or directory)
at com.codename1.designer.css.CSSTheme.getBackgroundImage(CSSTheme.java:2310)
at com.codename1.designer.css.CSSTheme.getBackgroundImages(CSSTheme.java:1981)
at com.codename1.designer.css.CSSTheme.updateResources(CSSTheme.java:1678)
at com.codename1.designer.css.CN1CSSCLI.compile(CN1CSSCLI.java:535)
at com.codename1.designer.css.CN1CSSCLI.main(CN1CSSCLI.java:390)
at com.codename1.designer.ResourceEditorApp.main(ResourceEditorApp.java:556)
Caused by: java.io.FileNotFoundException: /Users/andrew/netbeans-workspace/CrackinIt/css/images/Button1-7.png (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at java.net.URL.openStream(URL.java:1045)
at com.codename1.designer.css.CSSTheme.getBackgroundImage(CSSTheme.java:2258)
... 5 more
/Users/andrew/netbeans-workspace/CrackinIt/build.xml:628: Java returned: 1
BUILD FAILED (total time: 3 seconds)
The unused image files aren't in the project folder
This will never work for you.
Once you use CSS the designer is only useful for viewing the generated file. But since the CSS regenerates the resource file any change you make will be discarded. You need to delete the images you no longer use manually from the CSS images directory then physically delete the res file to make sure it's regenerated from scratch.
I was trying to update openssl so that it could use libssl.1.0.0 instead of libssl.0.9.8.dylib
So I moved the two files
/usr/lib/libssl.0.9.8.dylib
/usr/lib/libssl.0.9.7.dylib
into my home and I copied libssl.1.0.0.dylib inside /usr/lib. That didn't worked too so I re-moved the two original files to their location but now Apache (and other app using ssl) don't start anymore. Apache says:
Syntax error on line 111 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/Library/modules/mod_ssl.so into server: dlopen(/Applications/MAMP/Library/modules/mod_ssl.so, 10): Symbol not found: _SSLv2_client_method\n Referenced from: /Applications/MAMP/Library/modules/mod_ssl.so\n Expected in: /usr/lib/libssl.0.9.8.dylib\n in /Applications/MAMP/Library/modules/mod_ssl.so`
and libssl.0.9.8.dylib is present inside usr/lib so I don't know why/what it does not find. Is it possibile to fix?
My application (C++) loads its dll by linking against the stub library, the dll is then expected to reside in the same directory as the executable.
However I've had a report from a user who received the error message "System Error - The program can't start because xyz.dll is missing from your computer".
It turns out the reason is that he had my application installed in a path that contains a semicolon (which is supposed to be a valid character in ntfs file names)
I went on to try with a couple of other applications I have installed on my System and some (audacity, git, python, vlc) exhibit the same behaviour (append semicolon to folder name -> dlls can't be loaded) but most don't.
So now I'm wondering: Is this an error on my part? If so: what am I doing wrong? What would I have to do for the dll to be discovered even if its in a path with a semicolon?
On console, I am getting these errors:
27.08.11 20:56:06,371 sandboxd: ([83008]) TextEdit(83008) deny file-read-data /Users/az/Library/Frameworks/FScript.framework/Versions/A/FScript
27.08.11 20:56:06,372 TextEdit: Error loading /Users/az/Library/Containers/com.apple.TextEdit/Data/Library/Application Support/SIMBL/Plugins/FScriptAnywhere.bundle/Contents/MacOS/FScriptAnywhere: dlopen(/Users/az/Library/Containers/com.apple.TextEdit/Data/Library/Application Support/SIMBL/Plugins/FScriptAnywhere.bundle/Contents/MacOS/FScriptAnywhere, 265): Library not loaded: #executable_path/../Frameworks/FScript.framework/Versions/A/FScript
Referenced from: /Users/az/Library/Containers/com.apple.TextEdit/Data/Library/Application Support/SIMBL/Plugins/FScriptAnywhere.bundle/Contents/MacOS/FScriptAnywhere
Reason: no suitable image found. Did find:
/Users/az/Library/Frameworks/FScript.framework/Versions/A/FScript: open() failed with errno=1
The file FScriptAnywhere.bundle/Contents/Frameworks/FScript.framework/Versions/A/FScript exists. Thus, I don't understand the error / the problem.
Any idea?
Found the problem:
#executable_path is relative to the app, not the bundle, i.e. in this case TextEdit. Of course it doesn't find the framework there.
It also cannot load the framework from ~/Library/Frameworks because of the sandboxing of TextEdit.
Copying the framework over to /Library/Frameworks solved the problem.