DefCon - The Defold developer console

04-03 09:58:15.021   509   863 E VT      : [SRV] [VT THREAD] [VT_Bind] Fail to connect . retry count: 1739308
04-03 09:58:15.035  1127  1192 W WindowAnimator: Failed to dispatch window animation state change.
04-03 09:58:15.035  1127  1192 W WindowAnimator: android.os.DeadObjectException
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.os.BinderProxy.transactNative(Native Method)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.os.BinderProxy.transact(Binder.java:511)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:548)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:295)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:687)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.access$000(WindowAnimator.java:56)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:128)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:894)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.view.Choreographer.doCallbacks(Choreographer.java:698)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.view.Choreographer.doFrame(Choreographer.java:630)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:882)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.os.Handler.handleCallback(Handler.java:815)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.os.Handler.dispatchMessage(Handler.java:104)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.os.Looper.loop(Looper.java:207)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at android.os.HandlerThread.run(HandlerThread.java:61)
04-03 09:58:15.035  1127  1192 W WindowAnimator: 	at com.android.server.ServiceThread.run(ServiceThread.java:46)
04-03 09:58:15.038   350   391 I SurfaceFlinger: [SF client] DEL(0x7f94970880) for (1127:system_server)
04-03 09:58:15.038   350   391 D SurfaceFlinger:     remove: com.defold.dmengine/com.dynamo.android.DefoldActivity
04-03 09:58:15.051   350   350 I BufferQueueConsumer: [com.defold.dmengine/com.dynamo.android.DefoldActivity](this:0x7fa1e0d400,id:28781,api:1,p:-1,c:-1) disconnect(C)
04-03 09:58:15.051   350   350 I BufferQueue: [com.defold.dmengine/com.dynamo.android.DefoldActivity](this:0x7fa1e0d400,id:28781,api:1,p:-1,c:-1) ~BufferQueueCore
04-03 09:58:15.052   350   350 D GraphicBuffer: free, handle(0x7fa6c9e720) (w:1080 h:1920 s:1088 f:0x2 u:0x000b00)
04-03 09:58:15.052  1127  1192 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{5422a71 u0 com.miui.home/.launcher.Launcher t4281} time:877477091
04-03 09:58:15.052   350   350 I [MALI][Gralloc]: [-]hnd(0x7fa6c9e720), client(28), share_fd(68)
04-03 09:58:15.052  1127  1192 I Timeline: Timeline: App_transition_stopped time:877477092
04-03 09:58:15.052  1127  1192 V WindowManager: Looking for focus: 8 = Window{92244c0 u0 StatusBar}, flags=-2122317752, canReceive=false
04-03 09:58:15.052  1127  1192 V WindowManager: findFocusedWindow: Found new focus @ 5 = Window{cc24100 u0 В приложении "dmengine" произошла ошибка.}
04-03 09:58:15.101  1127  1195 D AutomaticBrightnessController: updateAmbientLux: mAmbientLuxValid=trueAAL=true
04-03 09:58:15.101  1127  1195 D AutomaticBrightnessController: calculateAmbientLux: [-10000, 100]: lux=0.0, weight=5.1005E7
04-03 09:58:15.101  1127  1195 D AutomaticBrightnessController: calculateAmbientLux: totalWeight=5.1005E7, newAmbientLux=0.0
04-03 09:58:15.101  1127  1195 D AutomaticBrightnessController: updateAmbientLux: ambientLux=0.0, timeToBrighten=4000, timeToDarken=8000, current=0.0
04-03 09:58:15.101  1127  1195 D AutomaticBrightnessController: updateAmbientLux: Scheduling ambient lux update for 877481141877481141 (in 4000 ms)
04-03 09:58:15.184  2064  2289 D OpenGLRenderer: CacheTexture 7 upload: x, y, width height = 60, 499, 17, 25
04-03 09:58:15.187   350   389 I BufferQueueProducer: [StatusBar](this:0x7fa1df4000,id:7,api:1,p:2064,c:350) queueBuffer: fps=0.07 dur=15091.32 max=15091.32 min=15091.32
04-03 09:58:15.293  1127  1127 E WifiTrafficPoller: TRAFFIC_STATS_POLL true Token 8893 num clients 14
04-03 09:58:15.293  1127  1127 E WifiTrafficPoller:  packet count Tx=11129248 Rx=15380446
04-03 09:58:15.293  1127  1127 E WifiTrafficPoller: notifying of data activity 3
04-03 09:58:15.304  1127  1932 D PerfServiceManager: [PerfService] MESSAGE_TIMEOUT:101
04-03 09:58:15.304  1127  1932 I libPerfService: [perfScnDisable] scenario:1
04-03 09:58:15.392  1127 10630 I System.out: <doReceiveResponse
04-03 09:58:15.392  1127 10630 W ErrorReport: Fail to sendHttpRequest
04-03 09:58:15.392  1127 10630 W ErrorReport: java.lang.IllegalArgumentException: HTTP entity may not be null
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:115)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:151)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at miui.util.ErrorReport.c(SourceFile:396)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at miui.util.ErrorReport.sendReportRequest(SourceFile:353)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at miui.util.ErrorReport$1.a(SourceFile:369)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at miui.util.ErrorReport$1.doInBackground(SourceFile:366)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at android.os.AsyncTask$2.call(AsyncTask.java:295)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
04-03 09:58:15.392  1127 10630 W ErrorReport: 	at java.lang.Thread.run(Thread.java:818)
04-03 09:58:15.393  1127 10630 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1300 android.content.ContextWrapper.bindService:614 miui.os.DropBoxManager.cq:361 miui.os.DropBoxManager.a:350 miui.os.DropBoxManager.addText:314
04-03 09:58:15.398  1959  1970 W MessageQueue: Handler (com.miui.internal.server.DropBoxManagerService$2) {e965c51} sending message to a Handler on a dead thread
04-03 09:58:15.398  1959  1970 W MessageQueue: java.lang.IllegalStateException: Handler (com.miui.internal.server.DropBoxManagerService$2) {e965c51} sending message to a Handler on a dead thread
04-03 09:58:15.398  1959  1970 W MessageQueue: 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:555)
04-03 09:58:15.398  1959  1970 W MessageQueue: 	at android.os.Handler.enqueueMessage(Handler.java:707)
04-03 09:58:15.398  1959  1970 W MessageQueue: 	at android.os.Handler.sendMessageAtTime(Handler.java:609)
04-03 09:58:15.398  1959  1970 W MessageQueue: 	at android.os.Handler.sendMessageDelayed(Handler.java:579)
04-03 09:58:15.398  1959  1970 W MessageQueue: 	at android.os.Handler.sendMessage(Handler.java:516)
04-03 09:58:15.398  1959  1970 W MessageQueue: 	at com.miui.internal.server.DropBoxManagerService.add(SourceFile:226)
04-03 09:58:15.398  1959  1970 W MessageQueue: 	at com.miui.internal.server.IDropBoxManagerService$Stub.onTransact(SourceFile:62)
04-03 09:58:15.398  1959  1970 W MessageQueue: 	at android.os.Binder.execTransact(Binder.java:458)
04-03 09:58:15.521   509   863 E VT      : [SRV] [VT THREAD] [VT_Bind] Fail to connect . retry count: 1739309
04-03 09:58:15.599   350  3581 I BufferQueueProducer: [В приложении "dmengine" произошла ошибка.](this:0x7f96dfa400,id:28782,api:1,p:1127,c:350) new GraphicBuffer needed
04-03 09:58:15.599   350  3581 D GraphicBuffer: free, handle(0x7fa678b080) (w:1080 h:842 s:1088 f:0x1 u:0x000900)
04-03 09:58:15.599   350  3581 I [MALI][Gralloc]: [-]hnd(0x7fa678b080), client(28), share_fd(76)
04-03 09:58:15.600   350  3581 I [MALI][Gralloc]: [+]hnd(0x7fa678b080), client(28), share_fd(29), hnd->flags:4
04-03 09:58:15.600   350  3581 D GraphicBuffer: alloc, handle(0x7fa678b080) (w:1080 h:842 s:1088 f:0x1 u:0x000b00) err(0)
04-03 09:58:15.601  1127  1419 I [MALI][Gralloc]: [+]r_hnd(0x7f58b97940), client(125), share_fd(336)
04-03 09:58:15.601  1127  1419 D GraphicBuffer: register, handle(0x7f58b97940) (w:1080 h:842 s:1088 f:0x1 u:0x000b00)
04-03 09:58:15.609   350   350 D MALI    : eglCreateImageKHR:511: [Crop] 0 0 0 0  img[1080 842]
04-03 09:58:15.929   506   559 D AALService: enableAALEvent: 1 -> 0
04-03 09:58:16.022   509   863 E VT      : [SRV] [VT THREAD] [VT_Bind] Fail to connect . retry count: 1739310
04-03 09:58:16.295  1127  1127 E WifiTrafficPoller: TRAFFIC_STATS_POLL true Token 8893 num clients 14
04-03 09:58:16.296  1127  1127 E WifiTrafficPoller:  packet count Tx=11129266 Rx=15380447
04-03 09:58:16.522   509   863 E VT      : [SRV] [VT THREAD] [VT_Bind] Fail to connect . retry count: 1739311
04-03 09:58:16.538  1127  1402 D InputReader: AP_PROF:AppLaunch_dispatchPtr:Down:877478578, ID:0, Index:1584512960
04-03 09:58:16.539  1127  1127 D SettingsInterface:  from settings cache , name = three_gesture_screenshot , value = null
04-03 09:58:16.539  1127  1127 D SettingsInterface:  from settings cache , name = is_show_three_gesture_alert , value = null
04-03 09:58:16.539  1127  1401 I PerfService: PerfServiceNative_boostEnableTimeoutMsAsync:3, 100
04-03 09:58:16.539  1127  1932 I libPerfService: [perfScnEnable] scenario:3
04-03 09:58:16.540  1127  1401 D PowerManagerService: userActivityFromNative
04-03 09:58:16.540  1127  1401 D lights  : write_int open fd=314
04-03 09:58:16.540  1127  1401 D LightsService: setLight_native: light=2, colorARGB=0XFFFFFFFF, flashMode=0, onMS=0, offMS=0, brightnessMode=0
04-03 09:58:16.540  1127  1401 D PowerManagerService: userActivityNoUpdateLocked: eventTime=877478578, event=2, flags=0x0, uid=1000
04-03 09:58:16.540  1127  1401 D PowerManagerNotifier: onUserActivity: event=2, uid=1000
04-03 09:58:16.540  1127  1932 I libPerfService: 3: set: -1, 4, 2,
04-03 09:58:16.540  1127  1401 D PowerManagerService: updateUserActivitySummaryLocked: mWakefulness=Awake, mUserActivitySummary=0x1, nextTimeout=877489079 (in 10499 ms)

Is it crashing when you call webview.open() or immediately on app start?

In this case I make webview.open when app starts in init() method.
But earler I tried to open webview by input event and recieved the same crash.
I think will be right to say that it crash when I made webview.open

And you’re saying that it doesn’t crash if you remove the console?

Yes, I just remove console.go from the main collection and all works fine.
I can share you the project.

Yes, please share it (bjorn.ritzl@king.com)

done, project name is WEBVIEW

2 Likes

The problem is actually caused by a bug with the webview component. If a webview is created within a coroutine it crashes the engine when the callback from webview.create() is invoked if the coroutine has finished. Now, you might not think that you did run the webview from within a coroutine but you actually did since the call to webview.create() was wrapped in a pcall which in turn was monkey patched using coxpcall.lua to work when you yield inside a pcall. Minimal example to reproduce crash:

coroutine.wrap(function()
    local id = webview.create(function()
        -- crash!
    end)
    webview.open(id, "http://www.google.com")
end)()

I’ve created a ticket DEF-2632 to fix this.

I have run tests on the modules provided by DefNet and come to the conclusion that the use of pcall in DefNet doesn’t pose a problem and I have thus removed coxpcall. Please try again with DefNet 3.1 as a dependency (or the latest from master if you feel adventurous).

6 Likes

Cool! With DefNet 3.1 works fine! Thank you!!!
Can you change Installation Readme in DefCon git?

3 Likes

Ah, thanks for pointing it out. I’ve updated the readme.

3 Likes

I love DefCon more and more!
I cannot imagine how to be without Defcon when making native extensions.
Thank you!

I found small issue. It’s absolutely not a critical, but just I leave it here.
All logs duplicated as many times as I run “log” command

Ah, good catch! I’ve updated DefCon to handle this.

2 Likes

Bumping this post to say that DefCon is really great, and for any Defold developers out there who have not used it yet start using it today. Any new Defold users make it a priority to add this to your project and test it out because it is super useful and convenient especially for mobile testing.

4 Likes


on icon it show the 8080 port, but in fact it should be 8098
(I 5 min tried to understand what’s wrong with the console) :rofl:

4 Likes

My bad – making a fix

thumbnail

5 Likes

Updated. Thanks Agulev and Axel!

2 Likes

I’ve found two related issues on iPhone-

  1. If you connect to DefCon from a browser, and the device sleeps, the game will be frozen when you wake the device.
  2. If (without making a connection) you allow the device to sleep & wake twice, it isn’t possible to make a connection to DefCon.

We use DefCon on iOS to offer the same functionality that we use imgui for on Android, as I’ve had trouble getting that to work on iOS (https://github.com/britzl/extension-imgui/issues/15). I actually noticed these issues a while ago, and was calling window.set_dim_mode(window.DIMMING_OFF) to work around them, but that might have been masking a more serious issue.

1 Like

Please try again. It should work now.

Yes it does, thank you.
There are now some errors building the engine on Windows, hopefully they’re just missing includes?
I’ll add the same info to the Github issue.

/imgui/src/extension_imgui.cpp
Line 89: use of undeclared identifier ‘GL_CLAMP_TO_EDGE’
Line 90: use of undeclared identifier ‘GL_CLAMP_TO_EDGE’
Line 1663: use of undeclared identifier ‘gl3wInit’; did you mean ‘glfwInit’?
Line 1664: use of undeclared identifier ‘GL3W_OK’

Reported as https://github.com/britzl/defcon/issues/11 and https://github.com/britzl/defcon/issues/12

1 Like