Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

EXC_BAD_ACCESS (code=EXC_I386_GPFLT) crash on GC using MacOS native API #1780

Closed
soywiz opened this issue Jul 9, 2018 · 2 comments
Closed
Assignees

Comments

@soywiz
Copy link
Contributor

soywiz commented Jul 9, 2018

screen shot 2018-07-09 at 02 49 35

This branch:
https://github.com/korlibs/korlibs/tree/native.error.on.gc.using.macos.native.api

To reproduce:

./gradlew clean install
cd samples
../gradlew :sample1-native:compileDebugMacos_x64KotlinNative
sample1/native/build/exe/main/debug/macos_x64/sample1-native.kexe
@olonho
Copy link
Contributor

olonho commented Jul 9, 2018

Problem look similar to #1748 in this case on instance of com.soywiz.korag.AGNative. When walking over fields of AGNative instance field 16th, onReady we get

(lldb) p (void*)Konan_DebugGetFieldAddress(0x101a51738, 16)
(void *) $42 = 0x0000000101a517c8
(lldb) p (char*)Konan_DebugGetFieldName(0x101a51738, 16)
(char *) $43 = 0x00000001003cc641 "onReady"
(lldb) x/2g 0x0000000101a517c8
0x101a517c8: 0x3ff0000000000000 0x0000000101a51908

Looks like some other module wrote 0x3ff == 1023 on place, where onReady callback is expected. This likely happens due to fact that we see mismatching object layout in different libraries.

@homuroll
Copy link
Contributor

homuroll commented Aug 2, 2018

Fixed in master.

@homuroll homuroll closed this as completed Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants