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

Fixes for 2.0 #67

Merged
merged 5 commits into from
Sep 18, 2022
Merged

Fixes for 2.0 #67

merged 5 commits into from
Sep 18, 2022

Conversation

MSGhero
Copy link
Contributor

@MSGhero MSGhero commented Sep 11, 2022

I'm leaving this as a draft until I get things fully working on my current project. Feel free to update master in the meantime, I'll just leave it draft if so.

`lime` or `openfl` not really sure which
This didn't compile for me, so let me know if I'm missing something
@MSGhero MSGhero changed the title Some of readme not updated for 2.0 Fixes for 2.0 Sep 11, 2022
@MSGhero
Copy link
Contributor Author

MSGhero commented Sep 11, 2022

I'm getting a hard thread exception on Heaps HL "Can't cast (void (dynamic,virtual<className:String,customParams:hl.types.ArrayDyn,fileName:String,lineNumber:i32,methodName:String>)) to (void (String))", so I'm gonna stop for now and check the diff

And let me know if this is all due to some git mistake, because I'm surprised to get compile errors.

Edit: problem started when async threading was introduced. It works if I do #if target.threaded && !hl, but I'd rather solve it. Again, it seems weird that this wouldn't affect other tested targets.

On HL, maybe others
@MSGhero MSGhero marked this pull request as ready for review September 13, 2022 01:40
@MSGhero
Copy link
Contributor Author

MSGhero commented Sep 13, 2022

All working now on HL

@Geokureli
Copy link
Owner

Thanks for this! I'm on vacation right now, ill try to take a look at this soon.

@Geokureli
Copy link
Owner

Geokureli commented Sep 14, 2022

When i tried the openfl sample project with HL on your branch I got this error after I clicked the start button:

SIGNAL 11
sys.ssl.$Certificate.loadDefaults(/usr/local/lib/haxe/std/hl/_std/sys/ssl/Certificate.hx:54)
sys.ssl.Socket.init(/usr/local/lib/haxe/std/hl/_std/sys/ssl/Socket.hx:128)
sys.net.$Socket.constructor(/usr/local/lib/haxe/std/hl/_std/sys/net/Socket.hx:130)
sys.ssl.$Socket.constructor(/usr/local/lib/haxe/std/hl/_std/sys/ssl/Socket.hx:102)
sys.Http.customRequest(/usr/local/lib/haxe/std/sys/Http.hx:108)
sys.Http.request(/usr/local/lib/haxe/std/sys/Http.hx:68)
io.newgrounds.utils.$AsyncHttp.sendSync(io/newgrounds/utils/AsyncHttp.hx:95)
io.newgrounds.utils.$AsyncHttp.sendThreaded(io/newgrounds/utils/AsyncHttp.hx:222)
sys.thread._Thread.$HaxeThread.~create.0(/usr/local/lib/haxe/std/hl/_std/sys/thread/Thread.hx:131)

this works fine on my master branch. Although on master, I get a non-crashing error:

Uncaught exception: Can't cast (void (dynamic,virtualclassName:String,customParams:hl.types.ArrayDyn,fileName:String,lineNumber:i32,methodName:String)) to (void (String))
Called from sys.thread._Thread.$HaxeThread.~create.0(/usr/local/lib/haxe/std/hl/_std/sys/thread/Thread.hx:136)

...and it also seems to hang

@Geokureli
Copy link
Owner

I changed loaderData's (any:Any, ?pos:PosInfos)->Void (msg:String, ?pos:PosInfos)->Void and now I'm just getting SIGNAL 11

are you using latest lime/openfl/swf? are you testing on a personal project?

when i try on the test project with -Dsimple I get this error:

hl(72318,0x700009559000) malloc: Incorrect checksum for freed object 0x7fdba9086c78: probably modified after being freed.
Corrupt value: 0x3
hl(72318,0x700009559000) malloc: *** set a breakpoint in malloc_error_break to debug

also, I've only got my mac until Saturday

@MSGhero
Copy link
Contributor Author

MSGhero commented Sep 15, 2022

I'm using heaps HL, no openfl or lime at all.

If you're getting bytecode level errors for code that runs fine for me, and I get compiler errors for code that works for you, then I have to assume openfl is doing something weird.

If master works completely fine for you, I guess we have to ifdef these changes in some way? I don't get why even Timer doesn't error for you since that is just a normal int/float type check.

Also, enjoy your vacation and don't think about code.

@Geokureli
Copy link
Owner

Geokureli commented Sep 15, 2022

Screen Shot 2022-09-15 at 3 27 25 PM

Screen Shot 2022-09-15 at 3 29 07 PM

I'm not quite sure

Edit: lime defines it's own timer, what a jerk
https://github.com/openfl/lime/blob/develop/src/haxe/Timer.hx

@MSGhero
Copy link
Contributor Author

MSGhero commented Sep 15, 2022

That commit breaks in heaps HL, so it's not something I want to add to the PR without an ifdef Ahh sorry I misread what you changed. That does work for me.

@Geokureli
Copy link
Owner

Geokureli commented Sep 18, 2022

I tried testing HL on my windows device, got the following error:

../lib/Source/io/newgrounds/Call.hx:215: [Newgrounds API] :: Error: SSL - No CA Chain is set, but required to operate

All of the threads I can find regarding this seem out of date and unrelated
HaxeFoundation/hxcpp#570
yupswing/akifox-asynchttp#43

Edit: this happens on master too, so it's unrelated.

@Geokureli Geokureli merged commit 457cc00 into Geokureli:master Sep 18, 2022
@Geokureli
Copy link
Owner

Geokureli commented Sep 18, 2022

I was under the impression that the signal 11 error and malloc errors were introduced by these changes, however when I change master's logVerbose to (String, ?PosInfos)->Void, I get them as well. It seems that non-crashing cast error threw an exception that was caught, preventing these errors

I'll just make a separate issue for that

@Geokureli
Copy link
Owner

Thanks again for this! I was worried these changes were too drastic and no one would want to upgrade to 2.0.0, so this gives me confidence.

That said, I still think I'm going to build a version 1.4.0, which is just 1.3.0 with the new external app_id feature, just in case people need that feature but don't want to migrate an entire project

@MSGhero MSGhero deleted the patch-1 branch September 19, 2022 01:11
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

Successfully merging this pull request may close these issues.

2 participants