Skip to content

Releasing reference whose refcount is already zero #1371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
j-f1 opened this issue Jul 4, 2020 · 3 comments
Closed

Releasing reference whose refcount is already zero #1371

j-f1 opened this issue Jul 4, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@j-f1
Copy link
Member

j-f1 commented Jul 4, 2020

This happens in NavigationView here at this line:

}.environment(\.navigationDestination, subject.$destination)
[Error] Assertion failed: 
	(anonymous function) (dev.js:26)
	(anonymous function) (index.esm.js:168:190)
	forEach
	(anonymous function) (index.esm.js:168:131)
	(anonymous function) (index.esm.js:155:193)
	wasm-stub
	<?>.wasm-function[writev]
	<?>.wasm-function[__stdio_write]
	<?>.wasm-function[__fwritex]
	<?>.wasm-function[printf_core]
	<?>.wasm-function[vfprintf]
	<?>.wasm-function[fprintf]
	<?>.wasm-function[__assert_fail]
	<?>.wasm-function[bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrement<(swift::PerformDeinit)1>(unsigned int)]
	<?>.wasm-function[swift_release]
	<?>.wasm-function[$s11TokamakCore21_ViewModifier_ContentVyAA022_EnvironmentKeyWritingD0VyAA7BindingVyAA03AnyC0VGSgGGWOh]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_TA]
	<?>.wasm-function[$s10TokamakDOM4HTMLV__9listeners7contentACyxGSS_SDyS2SGSDySSy13JavaScriptKit11JSObjectRefCcGxyXEtcfC]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0Vvg]
	<?>.wasm-function[$s11TokamakCore14NavigationViewVyxGAA0D18DeferredToRenderer0A3DOMAaEP12deferredBodyAA03AnyD0VvgTW]
	<?>.wasm-function[$s11TokamakCore7AnyViewVyACxcAA0D0RzlufcACypcfU_]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC6render13compositeViewQrAA016MountedCompositeG0CyxG_tF]
	<?>.wasm-function[$s11TokamakCore20MountedCompositeViewC5mount4withyAA15StackReconcilerCyxG_tF]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufc]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufC]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufc]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufC]
	<?>.wasm-function[main]
	<?>.wasm-function[__original_main]
	<?>.wasm-function[_start]
	wasm-stub
	_start
	(anonymous function) (index.esm.js:182:184)
	(anonymous function) (dev.js:64)
	asyncFunctionResume
	(anonymous function)
	promiseReactionJobWithoutPromise
	promiseReactionJob
[Error] getStrongExtraRefCount() >= dec && "releasing reference whose refcount is already zero"
	(anonymous function) (dev.js:26)
	(anonymous function) (index.esm.js:168:190)
	forEach
	(anonymous function) (index.esm.js:168:131)
	(anonymous function) (index.esm.js:155:193)
	wasm-stub
	<?>.wasm-function[writev]
	<?>.wasm-function[__stdio_write]
	<?>.wasm-function[__fwritex]
	<?>.wasm-function[printf_core]
	<?>.wasm-function[vfprintf]
	<?>.wasm-function[fprintf]
	<?>.wasm-function[__assert_fail]
	<?>.wasm-function[bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrement<(swift::PerformDeinit)1>(unsigned int)]
	<?>.wasm-function[swift_release]
	<?>.wasm-function[$s11TokamakCore21_ViewModifier_ContentVyAA022_EnvironmentKeyWritingD0VyAA7BindingVyAA03AnyC0VGSgGGWOh]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_TA]
	<?>.wasm-function[$s10TokamakDOM4HTMLV__9listeners7contentACyxGSS_SDyS2SGSDySSy13JavaScriptKit11JSObjectRefCcGxyXEtcfC]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0Vvg]
	<?>.wasm-function[$s11TokamakCore14NavigationViewVyxGAA0D18DeferredToRenderer0A3DOMAaEP12deferredBodyAA03AnyD0VvgTW]
	<?>.wasm-function[$s11TokamakCore7AnyViewVyACxcAA0D0RzlufcACypcfU_]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC6render13compositeViewQrAA016MountedCompositeG0CyxG_tF]
	<?>.wasm-function[$s11TokamakCore20MountedCompositeViewC5mount4withyAA15StackReconcilerCyxG_tF]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufc]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufC]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufc]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufC]
	<?>.wasm-function[main]
	<?>.wasm-function[__original_main]
	<?>.wasm-function[_start]
	wasm-stub
	_start
	(anonymous function) (index.esm.js:182:184)
	(anonymous function) (dev.js:64)
	asyncFunctionResume
	(anonymous function)
	promiseReactionJobWithoutPromise
	promiseReactionJob
[Error]  (
	(anonymous function) (dev.js:26)
	(anonymous function) (index.esm.js:168:190)
	forEach
	(anonymous function) (index.esm.js:168:131)
	(anonymous function) (index.esm.js:155:193)
	wasm-stub
	<?>.wasm-function[writev]
	<?>.wasm-function[__stdio_write]
	<?>.wasm-function[__fwritex]
	<?>.wasm-function[printf_core]
	<?>.wasm-function[vfprintf]
	<?>.wasm-function[fprintf]
	<?>.wasm-function[__assert_fail]
	<?>.wasm-function[bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrement<(swift::PerformDeinit)1>(unsigned int)]
	<?>.wasm-function[swift_release]
	<?>.wasm-function[$s11TokamakCore21_ViewModifier_ContentVyAA022_EnvironmentKeyWritingD0VyAA7BindingVyAA03AnyC0VGSgGGWOh]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_TA]
	<?>.wasm-function[$s10TokamakDOM4HTMLV__9listeners7contentACyxGSS_SDyS2SGSDySSy13JavaScriptKit11JSObjectRefCcGxyXEtcfC]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0Vvg]
	<?>.wasm-function[$s11TokamakCore14NavigationViewVyxGAA0D18DeferredToRenderer0A3DOMAaEP12deferredBodyAA03AnyD0VvgTW]
	<?>.wasm-function[$s11TokamakCore7AnyViewVyACxcAA0D0RzlufcACypcfU_]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC6render13compositeViewQrAA016MountedCompositeG0CyxG_tF]
	<?>.wasm-function[$s11TokamakCore20MountedCompositeViewC5mount4withyAA15StackReconcilerCyxG_tF]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufc]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufC]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufc]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufC]
	<?>.wasm-function[main]
	<?>.wasm-function[__original_main]
	<?>.wasm-function[_start]
	wasm-stub
	_start
	(anonymous function) (index.esm.js:182:184)
	(anonymous function) (dev.js:64)
	asyncFunctionResume
	(anonymous function)
	promiseReactionJobWithoutPromise
	promiseReactionJob
[Error] /Users/runner/runners/2.263.0/work/swift/swift/include/swift/Runtime/../../../stdlib/public/SwiftShims/RefCount.h
	(anonymous function) (dev.js:26)
	(anonymous function) (index.esm.js:168:190)
	forEach
	(anonymous function) (index.esm.js:168:131)
	(anonymous function) (index.esm.js:155:193)
	wasm-stub
	<?>.wasm-function[writev]
	<?>.wasm-function[__stdio_write]
	<?>.wasm-function[__fwritex]
	<?>.wasm-function[printf_core]
	<?>.wasm-function[vfprintf]
	<?>.wasm-function[fprintf]
	<?>.wasm-function[__assert_fail]
	<?>.wasm-function[bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrement<(swift::PerformDeinit)1>(unsigned int)]
	<?>.wasm-function[swift_release]
	<?>.wasm-function[$s11TokamakCore21_ViewModifier_ContentVyAA022_EnvironmentKeyWritingD0VyAA7BindingVyAA03AnyC0VGSgGGWOh]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_TA]
	<?>.wasm-function[$s10TokamakDOM4HTMLV__9listeners7contentACyxGSS_SDyS2SGSDySSy13JavaScriptKit11JSObjectRefCcGxyXEtcfC]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0Vvg]
	<?>.wasm-function[$s11TokamakCore14NavigationViewVyxGAA0D18DeferredToRenderer0A3DOMAaEP12deferredBodyAA03AnyD0VvgTW]
	<?>.wasm-function[$s11TokamakCore7AnyViewVyACxcAA0D0RzlufcACypcfU_]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC6render13compositeViewQrAA016MountedCompositeG0CyxG_tF]
	<?>.wasm-function[$s11TokamakCore20MountedCompositeViewC5mount4withyAA15StackReconcilerCyxG_tF]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufc]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufC]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufc]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufC]
	<?>.wasm-function[main]
	<?>.wasm-function[__original_main]
	<?>.wasm-function[_start]
	wasm-stub
	_start
	(anonymous function) (index.esm.js:182:184)
	(anonymous function) (dev.js:64)
	asyncFunctionResume
	(anonymous function)
	promiseReactionJobWithoutPromise
	promiseReactionJob
[Error] : decrementStrongExtraRefCount: 567)

	(anonymous function) (dev.js:26)
	(anonymous function) (index.esm.js:168:190)
	forEach
	(anonymous function) (index.esm.js:168:131)
	(anonymous function) (index.esm.js:155:193)
	wasm-stub
	<?>.wasm-function[writev]
	<?>.wasm-function[__stdio_write]
	<?>.wasm-function[vfprintf]
	<?>.wasm-function[fprintf]
	<?>.wasm-function[__assert_fail]
	<?>.wasm-function[bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrement<(swift::PerformDeinit)1>(unsigned int)]
	<?>.wasm-function[swift_release]
	<?>.wasm-function[$s11TokamakCore21_ViewModifier_ContentVyAA022_EnvironmentKeyWritingD0VyAA7BindingVyAA03AnyC0VGSgGGWOh]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_TA]
	<?>.wasm-function[$s10TokamakDOM4HTMLV__9listeners7contentACyxGSS_SDyS2SGSDySSy13JavaScriptKit11JSObjectRefCcGxyXEtcfC]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0Vvg]
	<?>.wasm-function[$s11TokamakCore14NavigationViewVyxGAA0D18DeferredToRenderer0A3DOMAaEP12deferredBodyAA03AnyD0VvgTW]
	<?>.wasm-function[$s11TokamakCore7AnyViewVyACxcAA0D0RzlufcACypcfU_]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC6render13compositeViewQrAA016MountedCompositeG0CyxG_tF]
	<?>.wasm-function[$s11TokamakCore20MountedCompositeViewC5mount4withyAA15StackReconcilerCyxG_tF]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufc]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufC]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufc]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufC]
	<?>.wasm-function[main]
	<?>.wasm-function[__original_main]
	<?>.wasm-function[_start]
	wasm-stub
	_start
	(anonymous function) (index.esm.js:182:184)
	(anonymous function) (dev.js:64)
	asyncFunctionResume
	(anonymous function)
	promiseReactionJobWithoutPromise
	promiseReactionJob
[Error] Unhandled Promise Rejection: RuntimeError: Unreachable code should not be executed (evaluating 'a._start()')
	<?>.wasm-function[abort]
	<?>.wasm-function[__assert_fail]
	<?>.wasm-function[bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrement<(swift::PerformDeinit)1>(unsigned int)]
	<?>.wasm-function[swift_release]
	<?>.wasm-function[$s11TokamakCore21_ViewModifier_ContentVyAA022_EnvironmentKeyWritingD0VyAA7BindingVyAA03AnyC0VGSgGGWOh]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0VvgAA01_cD5ProxyV4bodyQrvpQOyx_Qo_yXEfU_TA]
	<?>.wasm-function[$s10TokamakDOM4HTMLV__9listeners7contentACyxGSS_SDyS2SGSDySSy13JavaScriptKit11JSObjectRefCcGxyXEtcfC]
	<?>.wasm-function[$s11TokamakCore14NavigationViewV0A3DOME12deferredBodyAA03AnyD0Vvg]
	<?>.wasm-function[$s11TokamakCore14NavigationViewVyxGAA0D18DeferredToRenderer0A3DOMAaEP12deferredBodyAA03AnyD0VvgTW]
	<?>.wasm-function[$s11TokamakCore7AnyViewVyACxcAA0D0RzlufcACypcfU_]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC6render13compositeViewQrAA016MountedCompositeG0CyxG_tF]
	<?>.wasm-function[$s11TokamakCore20MountedCompositeViewC5mount4withyAA15StackReconcilerCyxG_tF]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufc]
	<?>.wasm-function[$s11TokamakCore15StackReconcilerC4view6target8renderer9schedulerACyxGqd___10TargetTypeQzxyyycctcAA4ViewRd__lufC]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufc]
	<?>.wasm-function[$s10TokamakDOM11DOMRendererCyACx_13JavaScriptKit11JSObjectRefCtc0A4Core4ViewRzlufC]
	<?>.wasm-function[main]
	<?>.wasm-function[__original_main]
	<?>.wasm-function[_start]
	wasm-stub
	_start
	(anonymous function) (index.esm.js:182:184)
	(anonymous function) (dev.js:64)
	asyncFunctionResume
	(anonymous function)
	promiseReactionJobWithoutPromise
	promiseReactionJob
@MaxDesiatov MaxDesiatov added the bug Something isn't working label Jul 4, 2020
@MaxDesiatov
Copy link

Please attach the snapshot version that you've reproduced this with.

I really hope that this is something that's fixed in more recent snapshots, from either branch. I'm still working on #1365, after that one's fixed I'll try to reproduce it then with new snapshots.

@j-f1
Copy link
Member Author

j-f1 commented Jul 5, 2020

Just reproduced on wasm-DEVELOPMENT-SNAPSHOT-2020-07-04-a.

@MaxDesiatov
Copy link

Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants