Upload via iOS (Kotlin Native/Multiplatform) failed: pointer being freed was not allocated
See original GitHub issueKtor Version - 1.2.0 Ktor Engine Used(client or server and name)
- Multiplatform/Native Client
- core-iosarm64
- json-iosarm64
- ios-iosarm64
- serialization-iosarm64 Operating System - iOS Request: PUT content-type: Multipart/form-data Ktor Client Engine: iOS
Tried to upload an image via iOS ktor client and it produces the error shown below. Versions before 1.2.0
works.
iosApp(6943,0x1049d2b80) malloc: *** error for object 0x106794018: pointer being freed was not allocated
iosApp(6943,0x1049d2b80) malloc: *** set a breakpoint in malloc_error_break to debug
GlobalScope.launch(Dispatchers.Main) {
try {
client.submitForm {
url("http://192.168.1.47:8000/api/images/")
method = HttpMethod.Put
header(HttpHeaders.Authorization, "JWT $token")
body = MultiPartFormDataContent(
formData {
append(
"image",
data,
Headers.build {
append(HttpHeaders.ContentType, "image/jpg")
append(HttpHeaders.ContentDisposition, " filename=hello.jpg")
}
)
}
)
}
} catch (e: Exception){
}
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:12 (7 by maintainers)
Top Results From Across the Web
debugging "pointer being freed was not allocated" errors ...
Another way to do this. Make sure to turn NSZombie on so it reports the memory address of the object that is getting...
Read more >pointer being freed was not alloca… | Apple Developer Forums
Now sometimes when I move the mouse really fast I get an error "pointer being freed was not allocated" triggered inside drawRect of...
Read more >Error: pointer being freed was not allocated - Xojo Forum
When I use a larger one (100 lines), and using system.debugLog I can see that it processes the entire file, but then crashes...
Read more >Kotlin Native
Kotlin Native. Kotlin/Native is a technology for compiling Kotlin code to native binaries which can run without a virtual machine.
Read more >malloc: *** error for object XXXX: pointer being freed was not ...
I am using https://github.com/miyabi/unity-swift plugin to call a Swift audio conversion method. This is working fine, except that when the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cy6erGn0m
To save anyone else time… this seems to be fixed on Ktor 1.3.0-beta-1