Showing posts with label iOS. Show all posts
Showing posts with label iOS. Show all posts

Thursday, January 8, 2015

Least crashing during Unreal iphone development

Running Unreal on my old MAC is troublesome, lots of crashes. As mentioned previously these seem largely memory related but it does sound like others find Unreal less stable on the MAC.

Here's what I do to improve the situation:

  • Close everything, EVERYTHING, except the editor
    • Close the launcher once the editor is
    • Close iphoto as it probably booted up when you plugged in your phone
    • Close itunes
    • Close source control
    • Close XCode
    • Don't touch anything if you can help it.....
      • Edit your project on a PC if possible, just use the MAC to cook - to do this open Unreal (close stuff!) launch on iphone then exit and iterate using XCode
Open up the activity monitor and purge anything with CPU or memory use that seems non critical and expensive.

I would guess that the MAC build stabilizes over time, though I am likely to buy more memory in the meantime.

Wednesday, January 7, 2015

Running Unreal on an Old(ish) MAC

Porting my project to MAC within Unreal wasn't too bad, took about a day longer than the two days my gut had predicted. About a day's work left (I think!) but not unexpected work, just work I didn't realise I'd need to do to get working on iPhone - mainly packaging related.

Expected

  • Compiling! My code was mostly clean of Windows (thanks to Unreal doing all the heavy lifting and trying to stick to Epic's functions for anything OS related) but XCode was a bit stricter on some code issues. Everything pointed out was valid and the only real library difference was the lack of XXX_s versions of string functions and a couple of other string manipulation functions that turn out to not be in the standard libs (_ttoi). A couple of hours spent here working out what the compiler was talking about in my small project (~100 smallish files).
  • Signing and packaging. At least semi expected. Even now when I've got things working I'm still waiting for the house of cards to all fall down around my ears. The system for signing code is fairly complicated and then I think made more complicated by unreal taking over some of it for you. It took me over half a day to get this right (I think).


Unexpected:

  • Breakpoints: Didn't work out of the box - though the fix is simple and did work (and easy to find online).
  • Horrible stability: My assumption would be terrible performance with lots of virtual memory used but so far I think I crash about every three meaningful actions - including just browsing blueprints or changing project settings. Given the number of malloc references in the callstacks, or obvious null pointer derefs I currently assume a link between the lack of memory and the stability. Will only know if I get around to upgrading the machines memory, for now I'm just about able to package and run and that's enough.
  • Packaging: So far I've been loading loose files from the Content directory. These don't seem to load on the iPhone. Time to start packaging. I couldn't find much documentation but asking on AnswerHub got me pointed in the right direction.
  • Output: Need to look into this but vswprintf seems to handle wide char's differently on MAC, so its treating the first character as a NULL terminated string and ignoring the rest. Likely just a format string change?