JetBrains / kotlin-native

Kotlin/Native infrastructure
Apache License 2.0
7.02k stars 566 forks source link

kfun:android.os.AtomicInteger.getAndAdd(kotlin.Int)ValueType #1823

Closed chinacharis closed 6 years ago

chinacharis commented 6 years ago

Instances of kotlin.Error, kotlin.RuntimeException and subclasses aren't propagated from Kotlin to Objective-C/Swift. Other exceptions can be propagated as NSError if method has or inherits @Throws annotation. Uncaught Kotlin exception: konan.worker.InvalidMutabilityException: mutation attempt of frozen android.os.AtomicInteger@25cfb8 (hash is 0x25cfb8) at 3 ucstar_basesdk 0x0000000103e6f8c6 kfun:kotlin.Exception.(kotlin.String?)kotlin.Exception + 70 at 4 ucstar_basesdk 0x0000000103e6f7e6 kfun:kotlin.RuntimeException.(kotlin.String?)kotlin.RuntimeException + 70 at 5 ucstar_basesdk 0x0000000103f10bbd kfun:konan.worker.InvalidMutabilityException.(kotlin.Any)konan.worker.InvalidMutabilityException + 285 at 6 ucstar_basesdk 0x0000000103f10c55 ThrowInvalidMutabilityException + 85 at 7 ucstar_basesdk 0x0000000103f284d8 MutationCheck + 24 at 8 ucstar_basesdk 0x0000000103bbb03b kfun:android.os.AtomicInteger.#internal + 59 at 9 ucstar_basesdk 0x0000000103bbb11b kfun:android.os.AtomicInteger.getAndAdd(kotlin.Int)ValueType + 155 at 10 ucstar_basesdk 0x0000000103c91580 kfun:com.ucstar.android.p39g.InvokeIdCreator.newId()ValueType + 80 at 11 ucstar_basesdk 0x0000000103c90bea kfun:com.ucstar.android.p39g.InvocationTx.()com.ucstar.android.p39g.InvocationTx + 314 at 12 ucstar_basesdk 0x0000000103dca8f4 kfun:com.ucstar.android.p39g.ServiceProxyBase.invoke(kotlin.String;kotlin.String;kotlin.Boolean;android.os.RunnableEx?) + 148 at 13 ucstar_basesdk 0x0000000103dca748 kfun:com.ucstar.android.biz.p30e.DepartServiceImpl.fetchDepartAndUserList(kotlin.String)com.ucstar.android.sdk.InvocationFuture + 184 at 14 ucstar_basesdk 0x0000000103dc5433 kfun:com.ucstar.android.p39g.ServiceProxyBase.()com.ucstar.android.p39g.ServiceProxyBase + 387 at 15 UIKit 0x0000000105e456fb -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 278 at 16 UIKit 0x0000000105e47172 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4123 at 17 UIKit 0x0000000105e4c5cb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1677 at 18 UIKit 0x000000010620ef7e 111-[UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866 at 19 UIKit 0x00000001065e1a39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153 at 20 UIKit 0x000000010620ebba -[UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236 at 21 UIKit 0x000000010620f3db -[UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675 at 22 UIKit 0x0000000106b80614 82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299 at 23 UIKit 0x0000000106b804ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433 at 24 UIKit 0x000000010686475d 125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221 at 25 UIKit 0x0000000106a5f4b7 _performActionsWithDelayForTransitionContext + 100 at 26 UIKit 0x0000000106864627 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223 at 27 UIKit 0x00000001065e10e0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392 at 28 UIKit 0x0000000105e4aeac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515 at 29 UIKit 0x000000010641dbcb -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361 at 30 FrontBoardServices 0x000000010a0d12f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331 at 31 FrontBoardServices 0x000000010a0d9cfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225

SvyatoslavScherbina commented 6 years ago

Uncaught Kotlin exception: konan.worker.InvalidMutabilityException: mutation attempt of frozen android.os.AtomicInteger@25cfb8 (hash is 0x25cfb8)

You seem to modify frozen object. See changelog and documentation for more details.

chinacharis commented 6 years ago

thanks