xricht17 / twpp

TWAIN framework for C++11. Makes development of applications and data sources much easier.
MIT License
39 stars 17 forks source link

Mac: issue getting image data #10

Closed kwach closed 7 years ago

kwach commented 7 years ago

Doing either native transfer or memory transfer I'm getting an error EXC_BAD_ACCESS (code=1, address=0x8bb4ff0)

src.imageMemXfer(imageMemXfer);

in this function

ReturnCode dsmPtr(Identity* dest, DataGroup dg, Dat dat, Msg msg, void* data) noexcept{
        assert(isValid());

        auto mgr = d()->m_mgr;
        return mgr->m_entry(&mgr->m_appId, dest, dg, dat, msg, data); //<--
    }

This is because

src.setupMemXfer(setupMemXfer);

returns Twpp::Success with (Twpp::SetupMemXfer) setupMemXfer = (m_minSize = 0, m_maxSize = 0, m_prefSize = 0)

Setting whatever (1024102410) in those params doesn't change a thing for me.

Native Xfer mode, as in example, does the same thing.

What other data can help identifying the issue?

xricht17 commented 7 years ago

Try setting CFBundleIconFile as advised here: https://stackoverflow.com/questions/4100619/how-can-i-figure-out-if-an-exc-bad-access-error-is-even-the-fault-of-my-code

It looks like TWAIN is a mess on Mac OS and Image Capture API is the way to go: https://stackoverflow.com/questions/4044622/what-is-the-state-of-twain-on-the-macintosh-today

xricht17 commented 7 years ago

Hi. Could you please check whether the issue is fixed for you, or still persists, with the current version? I am going to close this issue on 2017-11-02 if there is no activity.

kwach commented 7 years ago

I did abandon the Mac TWAIN interface all-together. I was not able to make it work.

Sorry. M.

On 19 Oct 2017, at 18:05, Martin Richter notifications@github.com wrote:

Hi. Could you please check whether the issue is fixed for you, or still persists, with the current version? I am going to close this issue on 2017-11-02 if there is no activity.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xricht17/twpp/issues/10#issuecomment-337956192, or mute the thread https://github.com/notifications/unsubscribe-auth/AH0eyymoLLP2pjAydguoX1UzWDn8Nef7ks5st3MxgaJpZM4PDxhe.