Unity 3D (5) Locking on IOS

Asked

Viewed 162 times

3

I’m developing a game in Unity 3D, but when I run it looks great on PC , Android, browser, Linux, Windows, but when I run on IOS, it keeps crashing. I put only one cube and kept crashing. NOTE: I reduced the error to fit. See the code:

 float velocityX;
 float velocityY;
 void Update(){
    velocityX = 0.2f;
    velocityY = 0;
    pos.x = velocityX;
    pos.y = velocityY;

    transform.Translate(pos);
}

It’s just this code, I tried it with Fixedupdate.

When I run the game in emulator now I get the error:

Process:               Xcode [1417]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               6.3.1 (7703)
Build Info:            IDEFrameworks-7703000000000000~4
App Item ID:           497799835
App External ID:       812230896
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [1417]
User ID:               501

PlugIn Path:             /Users/pedrosoares/Library/Developer/CoreSimulator/Devices/4AC0B159-E3E1-4A44-8B7B-66346F44C0B8/data/Containers/Bundle/Application/AA467879-CC70-4BB8-972F-6E1EA7DF154E/mp.app/mp
PlugIn Identifier:       pedro.soares.pong.mp
PlugIn Version:          1.0 (1.0)

Date/Time:             2015-05-18 09:16:55.683 -0300
OS Version:            Mac OS X 10.10.3 (14D136)
Report Version:        11
Anonymous UUID:        511FEBBC-94B3-4DD2-29FD-475DE8150609

Sleep/Wake UUID:       667983E5-8B70-46EE-8891-C98A735AC253

Time Awake Since Boot: 34000 seconds
Time Since Wake:       850 seconds

Crashed Thread:        20

Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x000000012a9e9000

kernel messages:
-4 sec              CODE SIGNING: cs_invalid_page(0x12a9e9000): p=1417[Xcode] final status 0x3004200, denying page sending SIGKILL
-4 sec              CODE SIGNING: process 1417[Xcode]: rejecting invalid page at address 0x12a9e9000 from offset 0x14cd000 in file "/Users/USER/Library/Developer/CoreSimulator/Devices/4AC0B159-E3E1-4A44-8B7B-66346F44C0B8/data/Containers/Bundle/Application/AA467879-CC70-4BB8-972F-6E1EA7DF154E/mp.app/mp" (cs_mtime:1431951402.0 == mtime:1431951402.0) (signed:1 validated:1 tainted:1 wpmapped:0 slid:0)

VM Regions Near 0x12a9e9000:
    MALLOC_LARGE           000000012742f000-000000012951c000 [ 32.9M] rw-/rwx SM=PRV  
--> mapped file            000000012951c000-000000012b609000 [ 32.9M] r--/rwx SM=COW  /Users/USER/Library/Developer/CoreSimulator/Devices/4AC0B159-E3E1-4A44-8B7B-66346F44C0B8/data/Containers/Bundle/Application/AA467879-CC70-4BB8-972F-6E1EA7DF154E/mp.app/mp
    JS JIT generated code  000058ff36400000-000058ff36401000 [    4K] ---/rwx SM=NUL  

Application Specific Information:
ProductBuildVersion: 6D1002

Thread 0:: Dispatch queue: com.apple.main-thread


External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 2
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 12107
    thread_create: 0
    thread_set_state: 7

VM Region Summary:
ReadOnly portion of Libraries: Total=414.1M resident=131.5M(32%) swapped_out_or_unallocated=282.6M(68%)
Writable regions: Total=1.3G written=67.4M(5%) resident=90.4M(7%) swapped_out=39.2M(3%) unallocated=1.2G(93%)

REGION TYPE                        VIRTUAL
===========                        =======
Activity Tracing                     2048K
CG backing stores                    6408K
CG image                              780K
CG shared images                      304K
CoreAnimation                          72K
CoreData Object IDs                  4100K
CoreImage                               8K
CoreUI image data                     144K
Dispatch continuations               8192K
Foundation                             16K
Image IO                              136K
JS JIT generated code                   8K
JS JIT generated code (reserved)      1.0G        reserved VM address space (unallocated)
Kernel Alloc Once                       8K
MALLOC                              182.9M
MALLOC (admin)                         32K
Memory Tag 242                         12K
Memory Tag 249                        156K
Memory Tag 251                         32K
OpenCL                                 24K
SQLite page cache                    1792K
STACK GUARD                          56.1M
Stack                                33.7M
VM_ALLOCATE                          17.3M
WebKit Malloc                         464K
__DATA                               45.3M
__IMAGE                               528K
__LINKEDIT                          106.6M
__TEXT                              307.6M
__UNICODE                             552K
mapped file                         111.1M
shared memory                           4K
===========                        =======
TOTAL                                 1.9G
TOTAL, minus reserved VM space      885.7M


Model: MacBookAir6,2, BootROM MBA61.0099.B18, 2 processors, Intel Core i5, 1.3 GHz, 4 GB, SMC 2.13f15
Graphics: Intel HD Graphics 5000, Intel HD Graphics 5000, Built-In
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x02FE, 0x45424A3230554638454455302D474E2D4620
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x02FE, 0x45424A3230554638454455302D474E2D4620
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.15.166.24.3)
Bluetooth: Version 4.3.4f4 15601, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SD0128F, 121,33 GB
USB Device: Internal Memory Card Reader
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Air, Apple Inc., 23.6
  • I suggest you put where you call this structure, the device setup and the result of the Profiler so people can help you with the exact answer to the problem.

  • 1

    Peter, although his question was suspended as broad, it does not mean that it was "thrown away". Edit it to include more information about the specific problem (as @Nils suggested), which can be reopened. :)

  • @Pedro Soares, now you’re mixing two errors in the same question. One is code optimization on iOS, the other is Xcode crash. I suggest we open a side question to that. I will update my answer according to your first question, and then I will study what was the reason for the crash.

1 answer

2

It can be a lot of problems, from your version of Unity to the configuration and status of your iOS device.

I recommend running Unity profiler to investigate this problem further. http://docs.unity3d.com/Manual/Profiler.html

Specifically for iPhone http://docs.unity3d.com/Manual/iphone-InternalProfiler.html

If you cannot follow from this data, I suggest you share more information, such as your device model/configuration. And the profiler’s results. And where in your code you call this procedure, there’s a big difference between you putting in Update, Fixedupdate, and so on.*

With a little luck it can be something easily solvable in the build configuration. Or add code Application.targetFrameRate = 60 (Remember that iOS hangs on 30 frames per second by default the apps).

*Be careful that your question has little information, is not very specific and many possible answers, liable to be blocked by moderation because of this.

  • 1

    Nils, fantastic work you’ve been doing with Unity here in the community (even with questions - at least the latest - of lower quality). :)

  • 1

    Thank you very much, Luiz Vieira. I’ve always liked the way that solutions are made here at stackoverflow, but I think I just got more confident to answer (or appeared issues that I feel more comfortable responding and time to respond, and there are several communities ways)in addition to pushing everyone who is learning there on youtube to here.

  • 1

    That’s it. Please keep up the good work! [s] :)

  • I tried with an Iphone 4, Ipad 2, Ipad mini, Iphone 6 Emulator. The same thing if necessary I can post a video.

  • @Pedrosoares - Did you manage to run the Profiler? Could you send the result in the question, please? The video will serve to visualize the problem, but I need some data behind it to find out what’s really going on (or you can test the targetframerate/build settings I didn’t even tell you about).

  • Now that I have been installing the profile the emulator hangs when I will run the game. I will put the error in question.

  • Put the error in another question, they are different things. But since you are using Xcode, you can use Analyser

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.