Xcode 5 constantly crashing. Looking for root cause. - objective-c

I know this is a site more for coding questions, but I have been having a problem with my game crashing for about two weeks now, and Apple hasn't even begun to be helpful in solving the issue or even identifying what it could be. I was hoping maybe someone has experienced something similar and could at least get me pointed in the right direction.
For about a week I had a problem with Xcode crashing every time i accessed a current file (gameboard.m) in my game. This file had existed in my game for months and NEVER caused a crash and never did until a few days after I installed Xcode 5. Whenever I would be working, and click on my gameboard.m, it would, with increasing frequency, crash xcode. When looking at activity monitor, my free ram would go from 5gigs to about 10 mbs, and I would have to force-quit xcode.
After gameboard.m would crash xcode, it would crash xcode upon opening every time after that. I found a temporary fix for the issue by duplicating my file, going into it and deleting the gameboard.m file, then copy and pasting it from the previous version and re-importing it.
Sometimes I could click on gameboard.m and it would open just fine, but then if i press Cmd+Opt+Shift+Left to collapse all my methods, THAT would crash xcode. Every time xcode crashes its the same thing, Ram goes to 0, freezes until force-quitted. After the first week and about 30 copy-pastes fo my game, my quick fix stopped working and I couldnt open ANY file on my desktop, including files I havent opened in months.
So far I've submitted a bug ticket, to which i have gotten no replys besides asking for additional crash reports, I've reinstalled xcode MANY times, created a new user and tried working on that, and am about to reinstall my OS. I'm trying to figure out if it is a code related problem, or a hardware problem that needs to get fixed. I know I have some memory leaks in my game which I am trying to address right now (I've been teaching myself how to program since the start and this has been a gaping hole in my education until now. Any good source material you guys know of point it my way!!)
Side question: If you have a memory leak, when does the computer take back over the allocated ram? Exiting simulator? Restarting computer?
Again, i know this is a bit of an unusual question for SO, but I've been unable to do any work for 2 weeks now and I cant see any end in sight, so any help or ideas i can get from you guys would be very helpful. Thank you!!

The most common way to resolve Xcode crashes is to clear out the derived data directory. Go to Preferences>Locations to find out where it is. Delete the whole directory tree. The default is ~/Library/Developer/Xcode/DerivedData but it may be different for you.
That said, the fact that this continued even when you were working as a different user is troubling, since by default the derived data directory is per-user, but it is possible you've set it to a single place.

I'm assuming by 'bug ticket' you mean the RADAR system (with its new facelift). If this is really preventing you from working on your app and that is critical, what you need to do is file a Technical Support Incident. You get 2 with your developer account, and you can buy 2 more at any time. This will put you in touch with an apple engineer that will focus on finding a solution to your problem as quickly as possible. I've only had to use it twice, and both times they had a solution for me within 48 hours.

I solved this by closing the project, then opening only the offending file in Xcode 5. Then 'Save' and the project then opened fine!

My Xcode was crashing every time I opened it for the last opened project. I got the issue resolved by following the following steps took from here.
Open a Finder window and navigate to your project
Right-click on the .xcodeproj file (it’s a package actually)
Select Show Package Contents
A new window appears
Delete a folder called xcuserdata
Also, delete scuserdata folder from project.xcworkspace inside the .xcodeproj file

Related

api-ms-win-core-winrt-string-l1-1-0.dll is missing

Im using widows 7 on my working PC and i know i should update (i have win10 on my common pc)
but i still need to finish some important art projects and updating my system now would cause me a lot of compatibility trouble with some wierd and old programs i use so im stuck with win7 until im done with theses projects.
However, last night i had an update (i thought there was no more updates wor win7 Oo')
and since then, my mouse software wont work anymore !
the software is called "Steelseries Engine"
i worked until late and the software was working, but today, it wont start.
i tried to restart, update, and reinstalling but the problem seems to come from some missing dll.
when i go into the install folder and launch it from there, it gives me the following error :
the program cant start because "api-ms-win-core-winrt-string-l1-1-0.dll" is missing.
Anyone could tell me how to repair that ? is it something related to visual c++ or something ?
I really need help, because i have to finish my project fast and witout my mouse setup/macros its going to take ages.
art
Thanks a lot.
I have got the same problem from yesterday, now.
Same message, same circonstances, "steel series" connected + windows 7, and i see no reason why it started. i reinstalled the steelseries engine exe i kept from my personal depository file, and it worked, then today i rebooted the PC and the dll message came back. Very strange. Stranger is that the steel series engine exe for the mouse and Co is not available for windows 7 anymore ont the steelseries website, it is written "For windows 8 and upper versions."
edit: i fixed the .ddl missing trouble, even though i don't know how it started. Thanks to CCLEANER, i found in the start list a long command line stating that the .dll will be deleted by a steel series operator. Delete this useless line (i don't know where it suddenly came from, may be a corrupted auto upgrade by SSeries) and reinstall steelseriesengine. I'm pretty sure this problem had nothing to do with W7. Enjoy.

MSCOMCTLocx registering but still showing as 'Missing'

I am using VBA hosted in a drafting program called MicroStation. I have been using MSCOMCTL for the last few years to use controls such as Tab Views and ListViews. I have come back from a work trip and found my home PC to have a Windows Updated and im assuming that its broken it as i have found many articles relating to similar problems.
MSCOMCTL will register and says it has succeed, but still shows as missing in the VBA IDE. Usually i can just use the regsvr32 command and it will work no problems.
I have researched alot and have found a heap of solutions, but none work for me. The main one seems to be to run.
regsvr32 c:\windows\syswow64\regtlib.ocx
But i cant find regtlib.ocx on my Windows 10 - 64 Bit PC.
With this VBA Program, the company where it is deployed is very restricted on what the users can do so im hoping to find an alternative to MSCOMCTL but still within VBA that i can somehow package / compile within my VBA file and doesnt need to be installed onto the PC. Either that or a solution to get the file working. I have been reading article after article and trying a heap of things over the past few days but nothing has worked. It seems at the moment that my best option is to redesign the forms without the Tab Control and List Views. But i find this crazy as they are microsoft files.
Thanks in advance!
So far i have tried the below (plus a couple more escape me at this time)
*Replacing MSCOMCTL.ocx with a downloaded version (backed up the original just in case)
*Replacing MSCOMCTL.ocx with a version installed with Office 2013, located under the program files x86/office/root etc.
*Registering MSCOMCTL in safemode to ensure it wasn't in use.
*Searching the C drive for regtlib.ocx as that has been known to fix it.
*I did find an alternative, but requires various files to be installed onto the PC which wouldn't work in this case with the company's restrictions
*I know this is not a new issue, but most of the posts are a few years old and their solutions (usually re-registering the file) have not worked for me.
Thanks everyone. Problem has been solved. It was a combination of a couple of things based on dbmitch's answer.
By unchecking the missing control, closing down the host program and rebooting. Then opening up the VBA file and searching for the "Microsoft Common Controls" and selecting it. Even though the text was the exact same as the "Missing" one it seems to have done the trick.
I did do that step, but didn't close down the program and start again in between.
Thanks for your help guys!

visual studio 2013 local variables not showing in debugger

I have a solution written in VB with some C# components. The solution uses some libraries from 2 outside sources. I have been working on this project for several months without issue. I cannot identify anything specific that I did to change my system or configuration. I was just working through the code, transitioning from an old set of library calls to the new library calls. The new library calls require complete rewrite so I change sections of the code and test to that point. Visual Studio 2013 debugger as of Friday morning will no longer recognize or show my local variables in this solution. The only things that appear in the Locals window are under Me. The code does work and I have it writing out to a text log file to confirm the values of variables at certain points, but the debugger has gone blind. When I add any of these local variables to Watch the response is " is not declared. It may be inaccessible due to its protection level."
Steps I've taken so far with no permanent success:
looked online and tried the few matches I found with no success
deleted the bin and obj folders and had the solution rebuild with no
success
recreated solution from scratch, copied over base files and rebuilt
solution and project (which worked for a few hours), until I did a
rebuild project and problem appeared again
updated to pack 5 and no success
I have opened my older projects and checked them. The debugger runs just fine and shows the variables. It is obviously something that happens during the rebuild process.
Any assistance would be greatly appreciated.
Thanks
Update:
Let me try to explain a little more clearly the situation.
I have an application I have built and am selling to some customers. Version 1 is installed and running at several locations. It is written in VB and uses some older COM libraries for a particular integration process.
The vendor is retiring the COM libraries. Their new libraries are in C#.
I created a new copy of my entire application (solution) and imported the new C# libraries. I have been going through and replacing the old code with the code for the new calls.I recompiled the solution and everything ran fine in debug.
The objects used with the new calls are completely different and there is limited documentation so I update a section of code and test to that point. Each time I "Save all Files", rebuild the project and test the changes. Everything worked fine for a few days. On Friday morning I started working on more changes and got an odd error. The system was not getting a proper value for a certain variable. When I went to check it in the WATCH window, debugger said it could not evaluate it. I figured something was hung up so I shut everything down and rebooted my machine. When I tried it again later, the same problem.
After several hours of no success I exited VS, renamed the folder to "OLD" and recreated the solution from the older version. Immediately everything was looking fine. I started making the changes and testing. Each time I did a rebuild, everything looked fine until the last change. Here I am again.
The code works fine up to the point I have updated. The only issue is that the debugger windows are not working correctly. If a variable is declared at the Class level outside the Sub, they can be seen. The only variables the debugger is blind to are the local variables within the running Sub.
I looked for anyone else with this issue and only found a few items. I tried the suggestions but no joy. I am left with having to temporarily define the variables outside the sub so I can see them while debugging.
I am on VS 2013 Update 5.
Do I need to move to VS 2015 to get around this?
Thanks again for your time and assistance.
I am assuming that you haven't changed versions of visual studio since the last time a rebuild worked for you.
recreated solution from scratch, copied over base files and rebuilt solution and project (which worked for a few hours), until I did a rebuild project and problem appeared again
Based on this, you create it from scratch and everything works until you do the rebuild right? But you are copying the base files still and you have new library calls since the last time a rebuild didn't mess up the locals window. So one of those is almost assuredly the culprit.
Since the library calls seem to be the thing that changed based on your post start there. If you go back to the old code and do a rebuild does it fix it? Assuming so, put the library calls back one at a time until it breaks.
If going back to the old code doesn't fix it, create from scratch with the old code and copy over the base files and rebuild. If that fixes it, add new library calls one at a time and rebuild after each until it breaks.
If that doesn't fix it either, then you will need to dig deeper on what else might have changed.
You are copying base files so eliminate those as the problem if you can:
Are you able to use placeholders instead of the base files or something that won't necessarily work as a finished product but that will allow you to debug, rebuild, debug again to see if the problem is related to one of them? Check the dates on the base files and ensure that they haven't changed since the last time a rebuild worked.
Something you could do concurrently could be to have have a colleague do a rebuild on their machine and see if the same issue comes up for them. It would (almost) completely eliminate the possibility that it is a configuration / program corruption issue on yours. Alternately, there are some free vb.net compilers online that you can upload files and code to. I'm not sure if that would be practical for you (due to the components of your program and/or sensitivity of the data) or not and haven't ever tried any where there is C# code in there but I wouldn't think that would be an issue.

Uncaught Error: ENOENT: no such file or directory, open 'C:\tmp\statistics.ivr'

Description of the problem:
I'm testing the irisVR Beta and I'm trying to launch some cranium.obj 3D model I have. I dragged and dropped the model directly on irisVR launch window and clicked launch. A terminal opens up for half a second and closes. Then nothing happens.
Image 1 -- Iris launch window -- indefinite progress bar
Image 2 -- irisVR console.log
Here is the error I am getting in the console.log:
Question:
What is causing this error, and how do I fix it?
Nate here from IrisVR. Just wanted to let you know that for the next few versions (next few weeks), we have removed OBJ support. Your question makes me realize that our documentation needs some TLC and is misleading - I have added updating it to my task list and it should be amended by EOD tomorrow. Thanks for that!
You'll notice that the drop-zone graphic only includes the SketchUp and Revit icons. This won't last long, I promise! We are building a new system for handling the model geometry and optimizing it for VR and it broke part of the OBJ code. Ultimately, these changes are going to lead to some terrific improvements. Given our limited programming bandwidth right now, we had to pick two file formats to carefully maintain throughout this migration process and we'll pick up the pieces with OBJ ASAP
Thanks again for your patience and for using the app! In the meantime, give a SketchUp model a try :)
Another tester here - ran into the same issue on a fresh Bootcamp install, it's not isolated to the *.obj support that Nate mentioned as was able to recreate with both Sketchup and Revit models.
The current release (v0.2.4) appears to have some dependencies on the Microsoft Visual C++ 2010 redistributable. If you don't have this installed, it will block the associated IrisVR ModelConverter from running and that statistics.ivr file from being generated. Unfortunately there is nothing logged to this effect, so took a bit of digging to find. You will however see a window flash up briefly, then close. This is the ModelConverter attempting to launch and quit.
To resolve, download and install the redistributable from here.

Xcode 4.4 unable to rename classes/variables

On both Xcode 4.4 and 4.4.1 I'm experiencing the same issue in that with the specific project I'm working on, I don't seem to be able to rename any classes or variables from the Refactor menu option.
Each time I try and do a rename, I type in the new name for the class/variable and click Preview at which point the bottom left begins a spinner with Finding files.... However, I then get a message saying:
The selection is not a type that can be renamed.
Make a different selection and try again.
I'm pretty sure that this is not an issue with my specific install of Xcode, because I can refactor other projects fine, it's just that I can't seem to be able to refactor this specific project.
Anyone with any ideas? I don't have any particularly exotic configuration for this project, it just seems to be a random affliction. I've deleted all of my derived data and re-indexed, but that doesn't seem to help.
Since it works OK in other projects, I'm thinking one thing I could try to do is re-generate the actual project file(s) itself. I don't know if there is a way to do this automatically?
If they're in dropbox get them out of there. It mangles project files. I've had it happen numerous times and at times it makes refactoring > renaming not work.
I have managed to solve this issue after trying many different things (tweaking project settings, pch, etc.) and it turns out there was a very simple (and totally counter-intuitive) method of fixing this issue.
All I have done is:-
Copy my entire project folder (so from Project to Project Copy).
Move Project (the original folder) to trash.
Rename Project Copy to Project.
Mysteriously, everything now works fine.
I really cannot figure out why this works. As mentioned previously, I had already deleted all derived data, etc. so I don't know why this should make things spontaneously work, but it does.
Would appreciate anyone who is able to shed some light on this as it does expose just how fiddly Xcode can be, and any understanding of what goes on under the hood is always beneficial.
Sounds like a buggered index.
I usually use the nuke from space option to delete everything in the derived data directory.
Unless you have changed it (I change mine to /tmp/bbum-derived), it'll be at:
~/Library/Developer/Xcode/DerivedData
Thus, I'll quit Xcode and do:
rm -rf ~/Library/Developer/Xcode/DerivedData
Yes, it is a bit brute force, but it works. You can likely force Xcode to rebuild the index from the UI, but I never bother. Of course, I'm also installing quite a few "odd" builds of this and that as a part of my day job...
(that is an rm -rf. It means "nuke everything and don't ask" in unix parlance. It is dangerous. Do not mistype that command.)
It seems you have an active selection somewhere in the gui, perhaps some of your files or classes are selected ? Try unselect in every sub window and retry refactoring.
I'm a bit late to this thread, but I ran into the same problem today and I was able to get it to finally refactor correctly, thought I share it.
So in large part I did what bbum said, I closed xCode, nuked the Derived data for the project the class files were in and re opened the project. Doing just that, it didn't work; the key, I found (at least for me), is that I had to do a clean (command shift k) after xCode restarts. After that I was able to rename the class files again :)
Also as a side note, my project is divided into the main project, and a static library. When I had to rename classes in the static library, I had to quit the main project and do what I described in the static library itself. Somehow I got the same error described in the question when I tried to do the refactor/rename from the main project.
Good luck!
This thread was very helpful for me in determining the problem.
It turned out that I had to Repair Disk with Disk Utility. I had visited a site earlier that had hijacked Safari and was telling me to call a number for emergency repairs, an obvious scam.
I followed the Disk Utility instructions to repair disk (including restarting with CMD-R pressed). Another clue was that I tried to commit to git and Xcode said No Way, Jose.
Afterwards I was able to refactor and commit changes as if nothing ever happened. I hope this helps someone else as a possible cause to investigate.