我正在做一个简单的动态场景处理POC。我编写了一个简单的代码,它将一个场景作为一个子项添加到父场景中。
在执行此操作几次后,游戏会因以下日志而崩溃。
有关这些日志及其原因的任何信息或详细信息都会有很大帮助。
04-18 23:43:12.410: D/AndEngine(9346): SpeedyMindActivity.onSurfaceChanged(Width=800, Height=480) @(Thread: 'GLThread 8919')
04-18 23:45:04.824: W/InputDispatcher(136): channel '418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
04-18 23:45:04.824: E/InputDispatcher(136): channel '418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
04-18 23:45:04.840: I/WindowManager(136): WIN DEATH: Window{418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity paused=false}
04-18 23:45:04.929: W/ActivityManager(136): Force removing ActivityRecord{418f6170 com.aqif.speedyMind.activity/.SpeedyMindActivity}: app died, no saved state
04-18 23:45:04.972: W/InputDispatcher(136): Attempted to unregister already unregistered input channel '418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity (server)'
04-18 23:45:05.031: W/WindowManager(136): Force-removing child win Window{41951328 SurfaceView paused=false} from container Window{418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity paused=false}
04-18 23:45:05.203: I/WindowManager(136): WINDOW DIED Window{418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity paused=false}
的问候, Aqif Hamid
答案 0 :(得分:0)
我没有想出解决这个问题的方法。但更好的方法是缓存场景并从引擎中替换场景。