sciter-sdk / rust-sciter

Rust bindings for Sciter
https://sciter.com
MIT License
804 stars 76 forks source link

"first" example crashes (reads from null pointer after last line of main()) #22

Closed Boscop closed 6 years ago

Boscop commented 6 years ago

I downloaded the Sciter SDK, copied the sciter.dll for win64 and generated the sciter.lib file from it. I cloned rust-sciter and ran the examples, all worked except first which crashed:

      Running `target\debug\examples\first.exe`
calling SciterAPI x64
getting abi version
sciter abi version: 0
sciter class name: H-SMILE-CHILD
sciter version: 4.1.1.5703 [4, 1, 1, 5703]
error: process didn't exit successfully: `target\debug\examples\first.exe` (exit code: 3221225477)

Unhandled exception at 0x00007FFB36A93499 (sciter.dll) in first.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

So it's reading from a null pointer for some reason, after the last line of main, weird.. Any idea how to fix this? (I'm on Win8.1 btw)

pravic commented 6 years ago

and generated the sciter.lib file from it.

Why would you need it?

pravic commented 6 years ago

But yes, a problem exists. I'll look on it.

pravic commented 6 years ago

It looks like a problem in Sciter at the moment.

The 4.0.8.5649 works fine.

pravic commented 6 years ago

Thanks for pointing it out. Apparently 4.1 versions of Sciter were poisoned with this bug.

Boscop commented 6 years ago

Thanks. Where can I subscribee to this bug in sciter?

Do you know where can I download the SDK for version 4.0.8.5649? :)

From the whole zip I only need to extract the .dll, right?

Btw, can Sciter be used with languages compiling to JS (like Elm/PureScript) or only with tiscript?

pravic commented 6 years ago

Here https://sciter.com/forums/ or here https://github.com/c-smile/sciter-sdk

It is fixed already and new build of sciter sdk will be available in the next release.

I gave you a link to the 4.0.8, you need only dll from there. Or you can clone the whole repository and checkout the specified version.

Sciter uses its own script which is incompatible with JS. An idea to support JS via external engine was considered from time to time since people keep asking it, but it's just an idea still.

pravic commented 6 years ago

The issue is fixed in Sciter 4.1.2:

sciter version: 4.1.2.5717 [4, 1, 2, 5717]