Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 0x80004003 - Invalid pointer Source: SciterSharpWindows Description: Object reference not set to an instance of an object. Specifically: CreateMainWindow #1

Closed
FuPeiJiang opened this issue Aug 5, 2021 · 6 comments

Comments

@FuPeiJiang
Copy link

hi, I'm coming from FuPeiJiang/ahk_parser.js#22

I've cloned the repo

I've downloaded
sciter.dll 8.23MB
SciterSharpWindows.dll 161.50KB
I've copied these files into the folder ahk-sciter-js\

I run using AutoHotkeyU64.exe with WorkingDir ahk-sciter-js\
note: that was AHK_L v1 version 1.1.33.09

I'm getting this error

---------------------------
main.ahk
---------------------------
Error:  0x80004003 - Invalid pointer
Source:		SciterSharpWindows
Description:	Object reference not set to an instance of an object.
HelpFile:		(null)
HelpContext:	0

Specifically: CreateMainWindow

	Line#
	148: {
	149: VarSetCapacity(GUID, 16, 0)  
	150: Return,DllCall("ole32\CLSIDFromString", "wstr", sGUID, "ptr", &GUID) >= 0 ? &GUID : ""
	151: }
	011: FileRead,html,main.html
	013: sci := Clr_LoadLibrary("SciterSharpWindows.dll")
	014: sciwin := Clr_CreateObject(sci, "SciterSharp.SciterWindow")
--->	015: sciwin.CreateMainWindow(400, 300)  
	016: sciwin.CenterTopLevelWindow()  
	017: sciwin.Title := "Using SciterSharp in AutoHotkey"  
	018: sciwin.LoadHtml(html)  
	019: sciwin.Show()  
	020: Return
	022: Return
	024: Return

Continue running the script?
---------------------------
Yes   No   
---------------------------

can you explain this error ?

using a debugger: I look at variables:
sci

Assembly
  Value:91946016
  VarType:9
  DispatchType:"_Assembly"
  DispatchIID:"{17156360-2F1A-384A-BC52-FDE93C215C5B}"

sciwin

Object
  Value:91945752
  VarType:9
  DispatchType:"IUnknown"
  DispatchIID:"{00000000-0000-0000-C000-000000000046}"

sciwin DispatchIID doesn't seem normal: it has too many zeros

@GirkovArpa
Copy link
Owner

Sciter is constantly undergoing breaking changes. Fortunately this older version should work. It was current at the time I made this repo.

@FuPeiJiang
Copy link
Author

thank you, works now

https://www.fuget.org/packages/SciterSharpWindows/3.0.0/lib/net45/SciterSharpWindows.dll/SciterSharp/SciterWindow
I can see the methods

so are we dependent on SciterSharpWindows ?
even if we changed to the updated method names, it still wouldn't work? because we need SciterSharpWindows to call them?

@GirkovArpa
Copy link
Owner

It does appear to be dependent on SciterSharpWindows, yes. I am not sure what "updated method names" refers to. Are you trying to use the latest version of Sciter?

@FuPeiJiang
Copy link
Author

sorry, I assumed that the breaking changes were that "the method names were changed to something else"
and it's not a method name, it's a class name SciterWindow
I assumed that SciterWindow was renamed, that's why it didn't work

but I have no clue what actually changed (what are the breaking changes)

Are you trying to use the latest version of Sciter?

I won't try, I just need a working AHK_v1 script, to be able to verify if AHK_v2 conversion works correctly

@GirkovArpa
Copy link
Owner

I am not sure what the breaking changes are either. In such cases I usually just download the required version and call it a day 😄

@FuPeiJiang
Copy link
Author

can you update README ?
change
[sciter.dll](https://github.com/c-smile/sciter-js-sdk/blob/main/bin/windows/x64/sciter.dll)
to
[sciter.dll](https://github.com/c-smile/sciter-js-sdk/blob/e1909ed966b585466bd235994f00a80ed58f30df/bin/windows/x64/sciter.dll)

"newest version of sciter.dll has breaking changes, this version should work"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants