Endless NullPointerExceptions in Flash Builder 4.5 - eclipse

I've been using Flash Builder 4.5 with Flex SDK 3.5B on Mac OS X 10.8.2 for a couple months. It hasn't been a perfect experience—the software has quite a few bugs—but in general it has been working until recently.
Our application includes two Flash Builder "projects", one of which references the other. Whenever we clone the repository, it is necessary to update the .project file of the primary project to include the new path of the secondary project.
The last thing I did before everything broke was move the folder containing the projects to a new location. As expected, when I opened Flash Builder, it complained that it couldn't find my project files, and they were all marked as inaccessible in the "Package Explorer" view. I did not remove the inaccessible projects from my workspace, but I attempted to re-import the primary project from its new location. This marked the first time I saw a dialog that has haunted me ever since:
The "Problems" view told me to refer to the error log...
...but the error log was empty!
The "Package Explorer" view didn't change (the new project wasn't listed) so I decided to just try the import again. When I selected the project directory, Flash Builder said I couldn't import it because the project was already in the workspace. "But the Package Explorer says it isn't... maybe it'll let me try again if I restart Flash Builder," I thought. I thought wrong. When I restarted, this is what I saw:
java.lang.NullPointerException
at com.adobe.flexbuilder.util.PathUtils.resolveLocaleInSourcePath(PathUtils.java:297)
at com.adobe.flexbuilder.project.actionscript.internal.ActionScriptProject.getProjectPath(ActionScriptProject.java:713)
at com.adobe.flexbuilder.project.actionscript.internal.ActionScriptProject.getSourceContainers(ActionScriptProject.java:681)
at com.adobe.flexbuilder.as.editor.ui.packageexplorer.content.FlexPackageExplorerContentManager.getSourceRoot(FlexPackageExplorerContentManager.java:644)
at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.getWorkspaceRootChildren(FlexPackageExplorerContentProvider.java:152)
at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.getChildren(FlexPackageExplorerContentProvider.java:80)
at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.inputChanged(FlexPackageExplorerContentProvider.java:449)
[...]
It couldn't even display the list of projects so I could remove the one that was causing the issue. A similar message was displayed in the "Editor" view. Deleting all of the project's files didn't help either. I was unable to fix the workspace, and the only way I could continue to use Flash Builder was by creating a new workspace.
Since then, I have tried many different things:
Reinstalled Flash Builder 4.5.
Reinstalled Flex SDK 3.5B.
Checked out a six-month-old version of the project.
Upgraded to Flash Builder 4.6.
Created a new user profile on my computer.
Tried to remove whatever trace files might have broken things:
Used Instruments to monitor all files the Flash Builder process touches.
Uninstalled Flash Builder.
Used find to locate any files that included builder or eclipse in their name.
Deleted all files found in (1) or (3) that seemed possibly related to Flash Builder.
Reinstalled Flash Builder.
Installed Flash Builder 4.5 on another Mac running Mac OS X 10.6.8.
Checked out a two-year-old version of the project with Flex SDK 3.5 on the other Mac.
Tried in a new workspace on another Mac that already had the project working in an existing workspace. (Yes, it broke when we tried to import it into the new workspace, even though it continues to work fine in the existing workspace.)
Installed Flash Builder 4.5 in a Windows 7 VM.
None have made any difference. That seems impossible.
Other members of my team have been working on this project for a couple years without running into this particular issue, yet now versions of the project from before I started appear to be broken, and even using brand new installations of Flash Builder on entirely different systems also breaks.
I contacted Adobe's phone support for help with this issue. I waited on hold for over an hour after being told it would be fifteen minutes, only to have them tell me that they no longer offer phone support for the product. (Sadly, their phone tree couldn't figure that out before I waited on hold.) However, I was told that "tier 2 email support" was available at platformt2-noida#adobe.com. I should have known better than to get my hopes up the address was invalid and my messages all bounced!
I have no idea what's going on. It seems like I must have done something else and forgotten about it, because the current situation makes no sense. Has anybody encountered this issue before? Do you have any idea what might be causing it, or what I might do to fix it?

We finally found a solution. It's rather anticlimactic.
Ignore all of the errors.
Import your project files and activate the correct SDK version in whatever order you want. If you end up with a messed up "Project Explorer" view, just close the view and reopen it, or restart Flash Builder.
Once the "Project Explorer" view is available, select your primary project and run it. It should work!
Nothing was actually permanently broken. The "Project Explorer" view may be in a temporarily unusable state if you import the primary project first, or use the wrong SDK version, but as long as you eventually fix those things then the "Project Explorer" view will also be fixed the next time it's opened.

make a backup copy of all the projects in your workspace, then delete all the files (including the hidden ones) in your workspace.
Next point Flashbuilder at the now empty workspace directory (forces it to recreate all the workspace files).
now import the project folders that you had backed up.

Related

Unity 3D is Layout Errors On a fresh install

Unity 3d doesnt work, when I try to open my project it says that This can happen if layout contains custom windows and there are compile errors in the project. I tried reinstalling OpenGL and something that I found on the internet but didn't work. The error window says that Revert Factory Settings but same thing happens after it too my Unity version is 2020.1.0a My OS is Ubuntu and I gave all the permissions to some folders. Didn't work And all this happened after a fresh install
Unity 2020.1.0a3 is an ALPHA VERSION!
As any alpha version it is not stable for production and can be expected to be full of bugs and unexpected behavior.
Search through the Known Issues in 2020.1.0a3 maybe your problem is already listed there.
In general do not touch alpha or beta versions unless you want to checkout a new added feature and test it.
For anything else stick to the stable releases like 2019.1.14f1 or 2019.2.6f1
On the last letter you can see their state:
a = Alpha
b = Beta
f = Release
Not sure if these are related but here and here also others had this problem already in early version so maybe one of their hot-fixes work for you as well.
This error may occur in released versions.
To resolve this problem:
Go to this directory:
C:\Users{YOUR_USER}\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default
Open Default.wlt file with Notepad or any text editor and copy all its contents.
Go to your unity project directory like this:
{YOUR_UNITY_PROJECT}\Library
Open CurrentLayout-default.dwlt file with Notepad or any text editor and delete all its contents then paste the contents of Default.wlt that you copied in step 2
If these files exist in Library delete them:
CurrentMaximizeLayout.dwlt
CurrentLayout.dwlt
Stop the Unity Hub service by a click the system tray and right-click on Unity Hub icon then select Quit Unity Hub.
Run your project again.

"selection cannot be launched and there are no recent launches" when using pydev/eclipse

I am getting the above error when launching a python file that worked in the past. I think I know how this happened but not sure how to fix it. I have 2 computers dual booting different os and use dropbox to stay synced between them all. In the past I synced my eclipse workspace with my mac and windows computers this way and everything worked fine(except I would have to change the location of the python interpreter depending on what system I was using).
I started getting the above message after I added a linux(fedora) to share dropbox files. But my problem is now when I try to update my python interpreter(in windows) it doesn't save my setting. I can hit autoconfig and it'll find the python path and all the files and I hit apply/okay, but when I go back its all blank. I'm pretty sure the linux machine messaged my settings up, but I need to develop on all 3 boxes so I need them to be kind of synced.
Wondering how to fix this and if there's another way to do this so I don't have this problem in the future?
update: this def. has something to do with my workspace. When I change the default workspace to a new folder and set the python interpreter it works. Still not sure how to permanently fix this(don't want to have to copy code back and forth to new workspaces.
I think an answer of how to share workspace among other enviroments is still very helpful but if anyone is having a simlair problem and just needs to fix it to work quickly here's the solution:
go to File, switch workspaces and figure out where your workspace is located
Go to that folder and rename the .metadata folder and relaunch eclipse
In eclipse everything will be missing, so go to file-->import and import the folder with all your projects(do the root folder of all the projects so you don't have to import each one individually).
setup any customizations you had before
This is not the best solution but it works. Hopefully someone else has a way of preventing this problem from happening in multiple environments.
It seems the preferred way is through F9: http://pydev.org/manual_adv_launch.html
eclipse run as same as what it run last time.
then first time run in this way.
in package explorer (left).
doubleclick res then menu.
then rightclick main menu (name.xml).
frmo menu select run then run as application.
and you can run as default in next time(from menu or shortcut).
This problem can often be solved by exiting out of eclipse and restarting (if that happens to be convenient for you). Changing workspaces midstream can often confuse Eclipse even if PyDev is correctly configured.

Xcode 4.2. gets stuck "Attaching to myapp" when running

In xcode 4.2, sometimes when you're going to run your ios proj on simulator, the status windows says "Attaching to myapp", and just gets stuck there... until you cancel.
Now, this has been asked before:
XCode 4 hangs at "Attaching to (app name)"
and surprisingly, besides the accepted answer on that thread, there are at least 10 other possible solutions others have been adding, all for the same issue, people says one of them worked while the others didn't...
please note, this is not a sequence of steps. each one is a possible solution:
1- restart xcode and/or restart simulator (reset content and settings) and/or restart computer.
2- click on project name in project navigator. in build settings tab, go to packaging and make sure that "Product Name" is the same that the one xcode says simulator is attaching to when running. if they are different, it will fail.
3- go to your projectname.xcodeproj folder. inside there delete anything named with your userid. when you reopen xcode those files will be recreated and it should work…
4- Manually delete the build directory for your project.
5- Go to organizer window. select Projects, select your app in the left hand side and then delete over "Derived Data"
6- Check Launch option is set to "Automatically" in Product->Edit Scheme, "Run" scheme.
7- In Project->"Edit Schemes"->Run. Change the Debugger from GDB to None (this doesn't make sense to me..).
8- Kill the process gdb-i386-apple-darwin from Activity Monitor. this is assuming gdb is not responding.
9- In "Product"->Edit Scheme. in Run, click yourappname.app, choose other, navigate to your .app in your project. now run.
10- Check that you don't have two different Info.plist in your project. if you do, remove the bad one.
In my case, none of them do the job. My project builds succesfully, everything seems fine, .plist, bundle identifier, name, etc.. and still can't pass the "attaching" part. i don't understand the reason of this, so any suggestions to fix it and possibly understand the problem i'll really appreciate it.
New projects were failing to launch in the simulator, getting stuck on the attach step.
This seems to be after Xcode 4.3 was installed, but I can't recall the last new project I created.
This is what worked for me, the clue coming from this thread...
Project->"Edit Schemes"->Run. Change the Debugger from LLDB to GDB
Another computer with the same version of Xcode works fine. Maybe my LLDB is corrupt?
Did you recently upgrade to OSX 10.7.2? I started having the same problem after I upgraded. I noticed that the Simulator always get stuck if I'm connected to a Wi-Fi network that forces Captive Portal authentication. This happens with other apps as well (Chrome, Safari). I'm not really sure why this happens, but I did read that 10.7.2 has issues with Captive Portal authentication.
Anyway, in my case, I repaired disk permission from Disk Utility and rebooted my machine. This seems to resolve the issue.
Just rebooting the computer worked for me.
Tried all the solutions but none applied to my case. XCode 4.2, OS X 10.6.8
Found that the Info.plist bundle identifier had been accidentally deleted when adding a custom app icon. Adding that back fixed the problem.
Anyway that's my fix, hope it helps someone.
Also before figuring out that, found I could start the simulator from another app and then use the app icon on the simulator for the app that would not attach, and start it up that way.
seems like there seem to be a lot of things causing this, but one thing that worked for me was simply cleaning out the build folder by pressing Cmd+Option+Shift+K or alternately if you select the Product dropdown in the toolbar and hold the Option button you should see the "Clean Build Folder" option appear
I also tried all solutions in that topic but all failed. But finally it was found out that what was went wrong.
What made this issue occurred is that some settings in Target->Build Settings was got modified by me for including C headers. And after I added all C headers and make it built. This issue occurred.
It might be only works on the situation I described before.
I just created an empty project and check all items in Target->Build Settings between the attaching-stuck app and the empty one. It was found that some items in the attaching-stuck one was different from the empty one.
So I deleted it and make it attached successfully.
It seems different in my case and also solved in a different way. If you got stuck every time after drop some files or folders into your project with the 'Create folder references for any added folders' way, this will be the solution.
Click the project node(the root node) on Xcode's project navigator and select target node. It's under the 'TARGETS'. Then click the 'Build Phases' tab. There are 4 sections of some list and you can click the triangle to expand the list.
You need to concentrate on the 'Compile Sources' and 'Copy Bundle Resources' section. Code files like .m must be placed on the 'Compile Sources' section and are compiled automatically. Resource files like .jpg must be placed on the 'Copy Bundle Resources' section and are copied into the project's package.
So, if the dropped files and folders are not in the 'Copy Bundle Resources' list, just drag it form the project navigator and drop onto the list. That will solve the problem.
If it doesn't work, delete all the referenced files and folders, click '+' button on the resource (or compile) section and click 'Add other...' button. Then you can include files and folders as the 'Create folder references for any added folders' way. I think the 'drag and drop' works well after the '+ button' way is done once.
In addition, 'Resource' may not allowed for folder name.
I experienced the 'stuck' problem every time when I attach files and folders as reference on Xcode 4.2 ~ 4.3.3. Reinstalling mac was a useless effort for me.
I have noted in Lion that when the iOS sim locks up or hangs the app,
that if I go to a shell, and do ps -ef |grep SDK, I will
see many, many processes running associated with the simulator.
I tried to kill off these processes but they rapidly respawn
and the only solution then is to reboot. Also, in the ps output,
you will also see instances of your app running as well.
So the Simulator issue is caused by previously running processes
that appear to block the correct running of the latest one.
I guess Apple will have a fix for this eventually, as it is quite onerous.
Rebooting works for me, too, but this shouldn't be necessary. I'd recommend filing a bug at bugreport.apple.com. You can duplicate the one I created - the more it's duplicated, the more likely Apple is to fix the problem.
I tried all of the solutions above but without luck ...
When I search for simular problem here :
Xcode error: failed to launch [directory] -- invalid host string: 'localhost'
I found it fixed my problem!
Hope this helps those who are still searching for a clue .
Upgrading to XCode 4.6.2 resolved this issue for me
Even if the app is not attaching after cleaning the project, changing the app name, restart the by resetting the simulator, and if you are using LLDB compiler, it is because the LLDB compiler is not able to connect to the local debug server in order to solve this, take a look at this
Why does the LLDB Debugger constantly fail to attach?
This really solves your problem!

Xcode 4 crashes when we run a project at the same time on two machines with Git

We have two developers working on the same project. This project is integrated with Git.
When one developer is working on the project and other developer tries to run the project, Xcode 4 crashes as shown.
What could be wrong and how to rectify it?
Thanks!
I think what has happened is that your project.pbxproj file has gone some merge conflict stuff embedded in it. Open it in a text editor and look for lines like:
>>>>>>>
If you see that, it means you need to clean up the file.
There's no way for git to be doing anything across systems while both developers are just working, so the issue is something someone checked in...
Another issue is that if a project file is changed by another developer, and someone pulls the changes with the project open, they have to re-open the project to see all of the targets as they are meant to be used in the project. I have not seen that cause a crash though.

Receive message "A signed resource has been added, modified, or deleted" when trying to debug an App on iPhone

While attempting to debug a build created using the 3.2 SDK on an iPhone device I receive the message "A signed resource has been added, modified, or deleted.".
I can clean, rebuild, then install with no error, but if I try to install without cleaning the error shows.
Anyone have an idea as to what might be causing this?
I found a workaround for the bug.
If you delete the .app file in build/Debug-iphoneos/ before building for the device, the app gets installed without errors.
And there is a simple way to do that before every build.
Make sure you have selected "Device" in the dropdown overview menu.
In XCode go to Project > New target...
Then find "Shell Script target" under MacOSX/Other
Name it and add it to the current project
Now, in the left navigation panel, under targets, expand your newly created target and double-click on Run Script.
In the window that opens replace "# shell script goes here" with "rm -fr build/Debug-iphoneos/*.app" (without the quotes).
Now open your main target preferences and under Direct Dependencies add your newly created target.
Build and Go! :)
This error occurs when there is a special character in the Product Name. In my case it was a "?"
If you change the Product Name it automatically updates the "Bundle Name" and "Bundle Display Name" so it is often the best choice to rename an app.
If you want to include special characters in the app name you have to manually rename the "Bundle Name" and "Bundle Display Name"
Bundle Name: This is the actual app bundle name in the file system such as "Awesome App.app". It is generally not visible to the user.
Bundle Display Name: This is a short name displayed under the app icon on the device. Since the bundle name would be truncated to "Awes…tion" you have the option to have a shorter name which fits better such as "Awesome App". It should be similar to the App Store name (set in iTunes Connect)
This is pretty clearly a bug in the 3.2 SDK, but I don't want to downgrade. I've found that doing a Clean by pushing Command+Shift+K, then Return is pretty fast before pushing Command+R to build.
Xcode 8, reason of the "A signed resource has been added, modified, or deleted." was that target was signed with an enterprise provision profile.
In my case, it happened when no changes were made. Make a change to any file and run again.
This can have several causes. The fastest way to figure out what is causing it is to go into Xcode, Window menu, Devices, then click the reveal button at the bottom of the pane to show the Console. Now attempt to run. You should see log output that names the specific files it is complaining about.
Most of the solutions previously posted are just artificial ways of getting Xcode to regenerate the contents of the build folder and/or re-sign the files.
In my case, my WatchKit extension was somehow acquiring references to Cocoapods frameworks that were only targeted toward the main app so they got signed during the build, then pruned later (as they were not used). Then on device, iOS complained that they were missing from the .appex folder for the extension. I ended up not needing any pods in the extension so I just removed them all and removed the extension as a target, then did some minor cleanup to remove the pod-related debris left in the build steps. Now everything works perfectly.
(SOLVED) This is a weird one. I tried everything I could find. Eventually I changed the product name from "Unit Tests (device)" to "Device Unit Tests" - removing the brackets. Now everything works. The spaces in it appear to be fine.
Previously on stackoverflow:
I've just run into this bug with two static library projects. One builds and tests using the GHUnit test runner on the device without a problem. The other projects will not install and gets this error. That means it's something thats different between these two projects. I've so far tried wiping the build directory, taking spaces out of the executable name, and various clean and builds as suggested here.
Same for me, thought it has something to do with multiple targets etc. because I changed a lot there. But it's highly possible that it's a Bug in the 3.2.2 release since I did not test extensively in this sdk version before the massive target changes in my project.
solved my issue!!!
I found out by accident that somehow a space " " found it's way into the Product Name of my app so it was called "First Second.app" instead of "FirstSecond.app". After deleting the space the issue was gone!
I changed it here:
right click on target
Get Info
Build Tab
Packaging Section
Product Name <- The name here will be used for the bundle (.app) name
Hope this helps, let me know!
Cheers,
nils
I could solved by changing project name.
[project]-[Rename] menu. "phase1 (new)" -> "pahse1"
I was getting this same error, but intermittently. I tried all the above and it still didn't work. Today I found what was causing it.
The error seems to occur when editing a xib in interface builder. If you try to run while the interface builder is open in xcode it will cause the above error. To solve just close the interface builder editor. i.e. just select a code file from your project so you are in the Source Editor.
The simplest (and probably most common cause) appears to be rebuilding without any changes.
So the simplest thing to cure it is to make a trivial change to a source file (such as adding a space, then deleting it), and then rebuilding.
If this doesn't work, feel free to try all the other answers here.
For months, I'd get this error without realizing it was due to such a simple cause. I'd usually do a Clean Build to get rid of it.
When I created ipa through terminal using xcodebuild commands, ipa created but while installing it I was getting same error. exportOptionsPlist solved my issue.
xcodebuild -exportArchive -archivePath projectPath/myapp.xcarchive -exportPath projectPath/myApp.ipa -exportOptionsPlist ProjectFolder/exportPlist.plist
In my case, Quit and restarting XCode worked.
For me the issue was related to the provisioning profile settings. The clue to this was that debug builds were installing ok, but release builds were not. I wanted to test a release build, so I ran the scheme with that build configuration.
I fixed it by duplicating the Release Configuration, then modifying those fields in the Build Settings to have the same provisioning stuff as if I am debugging it.
(Adding another build configuration will give you headaches if you are using Cocoapods however, then you'll have to modify your Podfile)
I'm getting the same thing, when installing on a iPod Touch. I can't link for the simulator (for other reasons), so can't say whether the problem occurs there.
Yes, rebuilding clean or deleting the app from the device allows me to install again. Neither are desirable, iterative solutions!
The minimal "cleaning" I've come across as a work around is manually deleting the Foo.app in the build/Debug-iphoneos directory.
it seems this is a bug in xcode 3.2.2:
iphonedevsdk
I had the same problem in Xcode 3.2.1 when I put a + in my app name. Specifically the "product name" in the build settings. It is fine to have a + in the bundle name in your Info.plist. The same probably applies to other punctuation characters.
Go to Window > Organizer > Projects > Find your project and delete derived data
I got this error intermittently while installing app using iPhone config utility on Windows7. Following solution works - Go to C:\Users\{lanusername}\AppData\Local\Temp and delete app specific folders (e.g. abc.app) and try installing app again.
I reported this bug on ICU (Windows versions) to Apple in June 2011. With the following workarounds:
The workaround is this ....
Win XP
1) Close ICU
2) Delete the temp folder: c:\Documents and Settings\[username]\Local Settings\Temp\[AppName].app
3) Delete the deploy folder: c:\Documents and Settings\[username]\Application Data\AppleComputer\MobileDevice
4) Restart ICU. Drag in the App and install normally.
============================
Win 7
1) Close ICU
2) Delete the temp folder: c:\Users\[username]\AppData\Local\Temp\[AppName].app
3) Delete the deploy folder: c:\Users\[username]\AppData\Local\Apple Computer\MobileDevice\Applications\[AppName].app
4) Restart ICU. Drag in the App and install normally.
=========================================================
I simply rebuilt my app, and that solved the issue.
I also faced the same issue. After wasting lot of time I realized that my product name has a special character "?" which cased the problem
Having the DerivedData folder at a network location caused this problem for me.
After trying everything else, I found out my workstation couldn't agree with the University server about what the time was. (It thought everything was always modified). I also had to clean for every rebuild to avoid that frustrating message.
In the end I gave up and built locally, changing Xcode > Preferences > Locations ... feeling altogether pretty dumb for having ever built over the network.
We ran into this issues on XCode_6.3.1. We were building a AppleWatch app, with an extension. We do have a bunch of Pods.. After debugging the issue for almost a bunch of hours, what we found was that there was an issue with the way a file was adde to the project..
It seems like some references to a unused file was sitting in the iPhone App, though it was used in the Watch App.. It turns out that the error XCode was showing was totally useless.
After removing this file and re adding it back to the project the project started working fine & was able to install to the device. To make it even harder to debug the issues, the debug version was installed without an issue, but was unable to install the norman version..
Make sure you add your files to the right target and, look at git history and see if there are lingering fragments that are added to the wrong target.
This is a very general error message indicating something is wrong during the validation process of the code signature. To find out the specific error, you can go to Xcode->Window->Devices and check your device log.
In my case, I have following console spew
Feb 1 18:53:07 iPod-touch installd[40] : 0x1001f8000 -[MICodeSigningVerifier performValidationWithError:]: 192: Failed to verify code signature of : 0xe8008017 (Signed resources have been added, removed, or modified)
Check on this 3rd party framework again, I found an extra CodeResources file under the framework root. Remove that file fixed the problem.