twain-dsm icon indicating copy to clipboard operation
twain-dsm copied to clipboard

macOS 2.4.x MSG_OPENDSM memory exception

Open enlightenedmouse opened this issue 5 years ago • 1 comments

Description

DG_CONTROL / DAT_PARENT / MSG_OPENDSM fails on macOS using any of the 2.4.x releases of the TWAINDSM.framework.

malloc: Non-aligned pointer 0x1004e632a being freed malloc: *** set a breakpoint in malloc_error_break to debug

Tested on

macOS Mojave Version 10.14.6

enlightenedmouse avatar Nov 28 '19 20:11 enlightenedmouse

Seems the culprit is the CFStringCreateWithCStringNoCopy method within the DSM_LoadFunction:

https://github.com/twain/twain-dsm/blob/98a4b653611f9b3ca0df995c3f455d7205cb79e4/TWAIN_DSM/src/dsm.cpp#L3897

enlightenedmouse avatar Nov 28 '19 20:11 enlightenedmouse