Defold 1.2.164 has been released


Well, we haven’t had access to all internal sdk functions in our extensions, but we’re getting there little by little. This one we’ve used for many years internally, we just had to temporarily switch to lua_pcall in the external code.



There were somewhere a practical example of that, I remember I played @Dragosha’s Slasher based example on mobile browser, but now I can’t find it :confused:




Perhaps, I’ve found two issues on iOS with 1.2.164

  1. Crash an app after wakeup iOS.
  • run app
  • wait for device sleeping
  • wakeup device
  • an app immediate collapses

I’ve tested the game with and without Native extensions, the same results.
Tested on iPadOS 13.1.3, iPAD Pro 12.9 (first generation)


Also @sergey.lerg has something similar bug on his apps.

  1. Crash extension callback when there is an error in Lua callback.
    my case:

This bug is found Apple review team in my last build when try “restore purchases” (they tested on iPad running iOS 13.2.2), after that I had a little research and reproduced that on iPAD mini 2, iOS,12.3.1.

I fixed my Lua code and have no that issue anymore, BUT, old code worked with my Lua error a year…

sorry, no screen from console made.



Hmm, I couldn’t reproduce it yet :confused:

About the crash log, can you perhaps download it with the Download container?

You’ll find this in the window XCode -> Devices and Simulators



I have a crash log from a tester
LunarOrbit-2019-11-28-120919.txt (87.4 KB)

Happened after resuming the game after the ipad was locked.

1 Like


Is this a vanilla build? I.e. no extensions?

|5   LunarOrbit                    |0x0000000104f87fa0 0x104cc0000 + 2916256|
|6   LunarOrbit                    |0x0000000104f87cd8 0x104cc0000 + 2915544|
|7   LunarOrbit                    |0x0000000104f879dc 0x104cc0000 + 2914780|

Since I assume it’s a custom build, and I don’t have the unstripped exe, I cannot symbolicate :confused:



Many extensions. Can’t reliably reproduce it myself, so hard to make a case.



Understandable. I’d like to remind anyone of keeping the exe+debug symbols for each release you do, for this exact purpose. :slight_smile:



Hi guys, increased number of crashes for users with version 164 could not reproduce in debug thru

0 match2 0x00000001012c54f8 _ZN7dmCrash7OnCrashEi + 96\n1 libsystem_platform.dylib 0x00000001b99e8894 4D8CF271-94F7-3D09-8E5E-5E462A8B3B17 + 34964\n2 libsystem_pthread.dylib 0x00000001b99f1c00 F8B082D8-24D9-3B1E-B80B-645FC8A88E14 + 27648\n3 libsystem_c.dylib 0x00000001b9941844 abort + 100\n4 libsystem_c.dylib 0x00000001b9940c64 err + 0\n5 match2 0x00000001012a7f6c +[IndexedPosition positionWithIndex:] + 0\n6 match2 0x00000001012a7ca4 -[EAGLView destroyFramebuffer] + 224\n7 match2 0x00000001012a79a8 -[EAGLView layoutSubviews] + 64\n8 UIKitCore 0x00000001be1d7604 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 15296004\n9 QuartzCore 0x00000001c072578c 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 1378188\n10 QuartzCore 0x00000001c072b908 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 1403144\n11 QuartzCore 0x00000001c0736528 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 1447208\n12 QuartzCore 0x00000001c067eed0 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 696016\n13 QuartzCore 0x00000001c06a8bbc 8705A7FE-6FD6-301F-BE30-D32F13CB6C0E + 867260\n14 UIKitCore 0x00000001bdd4bd0c B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10530060\n15 UIKitCore 0x00000001bdd4b080 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10526848\n16 UIKitCore 0x00000001bdd4bc44 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10529860\n17 UIKitCore 0x00000001be1ca09c B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 15241372\n18 UIKitCore 0x00000001bdd4b9e4 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10529252\n19 UIKitCore 0x00000001bd3840c4 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 274628\n20 UIKitCore 0x00000001bdf731d8 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 12788184\n21 UIKitCore 0x00000001bdd4b8b4 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10528948\n22 UIKitCore 0x00000001bdd4d268 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10535528\n23 FrontBoardServices 0x00000001bee26184 E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 344452\n24 FrontBoardServices 0x00000001bee261d4 E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 344532\n25 FrontBoardServices 0x00000001bee25d74 E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 343412\n26 UIKitCore 0x00000001bdd4d190 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10535312\n27 UIKitCore 0x00000001bdd4c6d0 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10532560\n28 UIKitCore 0x00000001bdd4d050 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10534992\n29 UIKitCore 0x00000001bd383fbc B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 274364\n30 UIKitCore 0x00000001bd38423c B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 275004\n31 UIKitCore 0x00000001bdd4cda0 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 10534304\n32 UIKitCore 0x00000001be266d0c B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 15883532\n33 UIKitCore 0x00000001be266b94 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 15883156\n34 UIKitCore 0x00000001bd383814 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 272404\n35 UIKitCore 0x00000001bd38483c B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 276540\n36 UIKitCore 0x00000001bd8f74e4 B7E79AF1-F09F-3BCE-B073-ECEA027BC0E8 + 5989604\n37 FrontBoardServices 0x00000001beddf2f8 E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 54008\n38 FrontBoardServices 0x00000001bee03dd8 E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 204248\n39 FrontBoardServices 0x00000001bede8fb4 E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 94132\n40 FrontBoardServices 0x00000001bee03d0c E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 204044\n41 libdispatch.dylib 0x00000001b99a7184 B7EED4C7-560D-3DA6-9B50-ED52A150AAC6 + 377220\n42 libdispatch.dylib 0x00000001b9981420 B7EED4C7-560D-3DA6-9B50-ED52A150AAC6 + 222240\n43 FrontBoardServices 0x00000001bee284c8 E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 353480\n44 FrontBoardServices 0x00000001bee28194 E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 352660\n45 FrontBoardServices 0x00000001bee286bc E4498CED-0520-3E13-BAF0-00C5CF8C7108 + 353980\n46 CoreFoundation 0x00000001b9c577c4 FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 694212\n47 CoreFoundation 0x00000001b9c5771c FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 694044\n48 CoreFoundation 0x00000001b9c56eb4 FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 691892\n49 CoreFoundation 0x00000001b9c52000 FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 671744\n50 CoreFoundation 0x00000001b9c518a0 CFRunLoopRunSpecific + 464\n51 GraphicsServices 0x00000001c3ba9328 GSEventRunModal + 104\n52 UIKitCore 0x00000001bdd42740 UIApplicationMain + 1936\n53 match2 0x0000000100f92cc8 _Z11engine_mainiPPc + 160\n54 libdyld.dylib 0x00000001b9adc360 1DB44CE7-7030-3D97-9461-6EC743F47783 + 4960\n

1 Like


This is for HTML5 builds (tested with Scale mode: Downscale Fit, but probably the same for other scaling modes)

On 1.2.163:
window.WINDOW_EVENT_RESIZED is being called immediately upon game launch (callback is registered from init)

On 1.2.164:
window.WINDOW_EVENT_RESIZED is only called if you start resizing the browser manually. However, the original game project’s dimensions may already be different upon game launch, so there is currently no way to detect the new dimensions immediately?


High DPI Window Size Discrepancy

We have in our backlog for 1.2.165 to add more functions to window.* to read the window size at any time, something like window.get_size()



I’ve tried to reproduce the issue with other my apps without native extensions and got the same error in console.

Steps to reproduce:

  • run app
  • wait for device sleeping
  • wakeup device
  • an app immediate collapses (collapses if debug bundle or just freeze if release bundle)

An open source example for testing:

Could you try to make iOS bundle of this one and test it?

I tested on iPad6,7 (iPad Pro 12.9" first generation) OS Version: iPhone OS 13.2.3 (17B111)
Full crash reports:


"app_name":"Slasherprototype","timestamp":"2019-12-16 13:14:12.54 +0500","app_version":"1.0","slice_uuid":"ced35aed-ca09-323f-b83f-69012e514433","adam_id":0,"build_version":"1.0","bundleID":"com.dragosha.slasher","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 13.2.3 (17B111)","incident_id":"AC8B7325-3F47-431D-868E-B53DC6C58D60","name":"Slasherprototype"}
Incident Identifier: AC8B7325-3F47-431D-868E-B53DC6C58D60
CrashReporter Key:   6729a68f7454a798696efaf75cc9613cc6a6ddb9
Hardware Model:      iPad6,7
Process:             Slasherprototype [2379]
Path:                /private/var/containers/Bundle/Application/AA854BAC-7041-45E8-84A6-965A07872824/
Identifier:          com.dragosha.slasher
Version:             1.0 (1.0)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.dragosha.slasher [978]

Date/Time:           2019-12-16 13:14:12.3476 +0500
Launch Time:         2019-12-16 13:10:54.1805 +0500
OS Version:          iPhone OS 13.2.3 (17B111)
Release Type:        User
Baseband Version:    n/a
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Thread 0 name:  engine_main  Dispatch queue:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001815c7ec4 0x1815a3000 + 151236
1   libsystem_pthread.dylib       	0x00000001814e3774 0x1814e1000 + 10100
2   libsystem_c.dylib             	0x00000001814378c0 0x1813c4000 + 473280
3   libsystem_c.dylib             	0x0000000181437850 0x1813c4000 + 473168
4   libsystem_c.dylib             	0x0000000181436c64 0x1813c4000 + 470116
5   Slasherprototype              	0x0000000102688674 0x102474000 + 2180724
6   Slasherprototype              	0x00000001024d81ec 0x102474000 + 410092
7   Slasherprototype              	0x0000000102530b6c 0x102474000 + 772972
8   Slasherprototype              	0x0000000102535a8c 0x102474000 + 793228
9   Slasherprototype              	0x000000010247b088 0x102474000 + 28808
10  Slasherprototype              	0x000000010247bd38 0x102474000 + 32056
11  Slasherprototype              	0x000000010263b300 0x102474000 + 1864448
12  QuartzCore                    	0x00000001880dc860 0x1880cb000 + 71776
13  IOKit                         	0x000000018270e930 0x182708000 + 26928
14  CoreFoundation                	0x0000000181724670 0x1816a4000 + 525936
15  CoreFoundation                	0x000000018174de40 0x1816a4000 + 695872
16  CoreFoundation                	0x000000018174d56c 0x1816a4000 + 693612
17  CoreFoundation                	0x0000000181748440 0x1816a4000 + 672832
18  CoreFoundation                	0x00000001817478a0 0x1816a4000 + 669856
19  GraphicsServices              	0x000000018b69f328 0x18b69c000 + 13096
20  UIKitCore                     	0x0000000185838740 0x184e37000 + 10491712
21  Slasherprototype              	0x000000010247be98 0x102474000 + 32408
22  libdyld.dylib                 	0x00000001815d2360 0x1815d1000 + 4960

iOS crash on app focus gain in dmGraphics::Clear(dmGraphics::Context*, unsigned int, unsigned char, unsigned char, unsigned char, unsigned char, float, unsigned int)
Crash when app comes back from sleep

Hi @Dragosha, I’m trying to reproduce this issue, but I cannot seem to do so.
Do you still see this crash?



Hi @Mathias_Westerdahl , on old builds (May 2020), yes, still. I will test with 171 and back to comments.

1 Like



Well, I’ve rebuild ‘slasher-prototype’ with 171 and run it on iPad with newest iOS 13.6
and catch the same issue, but now with important ‘error-script’ remarks:

Seems, render.get_window_width() and render.get_window_height() return wrong value after iPad was wakeup. Now I’ll try to check this values in update(), as @britzl suggests in the linked topic.

1 Like


So, added values checking to rendercam render-script:

but it not helps, just prevents from error-script messages in console :thinking:

@totebo are you complete solved this issue here? Crash when app comes back from sleep

1 Like


The error still happens, but doesn’t seem to cause a hard crash. I think the Orthographic camera helper module needs to be patched to fix the remaining errors.



Seems issue is fixed :slight_smile:
Not sure what helped: transfer OS on my iPad to iOS 14 (from 13), 1.2.177 version of Defold or additional get_window_with checking in render script, but LyL is correct waking up now.

Happy holidays! :partying_face:



Happy to hear that! @JCash has made changes to the application lifecycle and state handling, although mostly on Android.