Comments (35)
+1
from wax.
+1
from wax.
+1
from wax.
+10086
from wax.
I figured out how to compile wax_stdlib with 64bits support, take a look guys
https://github.com/felipejfc/wax_x86-64
However there is still work to do, the library is being successfully loaded but it is not working as expected yet, the method pcallUserdata on it's 5th call is making reference to a invalid address in memory and I can't figure out why yet. I invite you all to try to fix this. Later today I'll update the readme on my fork with the instructions of how I've compiled for 64 bit but you can start debugging with the precompiled one to find why it is not working and fell free to push fixes. remember to compile the projects in ARM64.
Regards
from wax.
i try compiled wax_stdlib.h 64-bit
https://github.com/maxfong/wax_stdlib_x64
from wax.
does this work?
I can compile and load the lib but still I get a crash in method wax_fromInstance
do you got it to work?
I always get EXC_BAD_ACCESS code=1
regards
from wax.
Friends, I've got it fully working on both architectures, here you go:
https://github.com/felipejfc/wax_x86-64
Regards!
from wax.
int size = wax_fromObjc(L, type, usedArgs); -> int size = wax_sizeOfTypeDescription(type); fix crash...
from wax.
download wax_x86-64 ,in States (without wax.framework), try on iphone5 (hardware support 32bit),it run ok. but on iphone6plue (hardware support 32bit and 64bit),it crash ,in wax_helpers.m , "if ([instance isKindOfClass:[NSString class]]) {" thread 1:EXC_BAD_ACCESS(code=1,address=0x81a59408e1b9)
from wax.
strange, I can run well here on iphone 6 simulator!
from wax.
iphone 6 simulator run OK,but iphone 6 machine run crash 。 With the above question。
from wax.
@felipejfc Thanks,my wax_stdlib_x64 Only how create wax_stdlib_x64.h file;
my WaxPatch_X64 using your's wax_x86-64 find iphone6 crash, if change int size = wax_fromObjc(L, type, usedArgs); to int size = wax_sizeOfTypeDescription(type); ,Some features are not available。。。
from wax.
If you change this line you'll miss some features @maxfong, I'm aware of the bug now @linmingzhi, I'm getting crash now using a device too... I'll try to figure it out! THe problem lies in grabbing va_list
from wax.
I've put a description on the problem in my repo
https://github.com/felipejfc/wax_x86-64
from wax.
HI,@felipejfc, i test your's code,find arm64 device,lua using OC delegate run crash and wax examples run crash,thank you for your efforts :>,come on
from wax.
@maxfong I'm aware of the issues, I'm currently working on a fix, I can already access the arguments but I need to fix an issue with pointers... I'm very near of fixing it, keep an eye on it
from wax.
@linmingzhi @maxfong it must be fully working now, can you guys confirm?
regards!
from wax.
Oh well I guess I identified another issue with multiple arguments method calls that is not covered by the tests --''
I'll be fixing it later
from wax.
Ok, now I think it is really working @linmingzhi @maxfong @KimReboot @HuJianChong https://github.com/felipejfc/wax_x86-64
I managed to run tests and examples
from wax.
@felipejfc ,if i // for (int i = 0; i < n-2; i++) { free(sharedMemoryForArgs[i]); },it will work OK,THX
from wax.
@maxfong If you free then it don't work? I think it's better to free them to avoid a memory leak... It works OK here even freeing the args, can you provide a code where freeing causes problems?
from wax.
@felipejfc my repo:https://github.com/maxfong/WaxPatch_X64/tree/develop, run develop branch, for free sharedMemoryForArgs will crash
from wax.
@maxfong it is true that it was causing a crash, I released a new commit with fix for that, the arguments needs to be freed so that no memory leak occurs. can you try it?
from wax.
NSMutableString *pp = [[NSMutableString alloc] init];
NSString *dir = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:modeName];
NSArray *fileList = [fileManager contentsOfDirectoryAtPath:dir error:&error];
for (NSString *file in fileList) {
//load A lot of resources (.lua) in the file
[pp appendFormat:@"%@/?.lua;",[dir stringByAppendingPathComponent:file]];
}
[pp appendFormat:@"%@/?/%@",dir,[[dir stringByAppendingPathComponent:[dic objectForKey:@""]] stringByAppendingPathComponent:[dic objectForKey:@"Enter"]]];
setenv(LUA_PATH, [pp UTF8String], 1);
wax_start((char *)[[dic objectForKey:@"Enter"] UTF8String], nil);
then causing a crash ../stdlib/waxClass.lua:28: Can't override method with return type d .And @maxfong is a bit similar ---run develop branch, for free sharedMemoryForArgs will crash
from wax.
@linmingzhi can you provide more information on this crash? what are you trying to do? are you using my last repo version? I've already solved the problem @maxfong pointed for sharedMemoryForArgs
from wax.
HI @linmingzhi , @felipejfc did
// for (int i = 0; i < n-2; i++) {
// free(sharedMemoryForArgs[i]);
// }
//
// free(sharedMemoryForArgs);
from wax.
@maxfong @linmingzhi felipejfc@45bbb5e
To avoid memory leak!
from wax.
trying to use https://github.com/felipejfc/n-wax to replace wax with 64bit-enabled one.
but i cant compile my app (
- build using "master branch" fails with linker error
Undefined symbols for architecture arm64:
"_ffi_type_pointer", referenced from:
_overrideMethod in wax_instance.o
"_ffi_typeForTypeEncoding", referenced from:
_overrideMethod in wax_instance.o
"_createFFIClosure", referenced from:
_overrideMethod in wax_instance.o
ld: symbol(s) not found for architecture arm64
- build with "no-ffi" branch fails with linker errors
Undefined symbols for architecture armv7:
"_NewArgumentList", referenced from:
_myForwardInvocation in wax_instance.o
"_addArgument", referenced from:
_myForwardInvocation in wax_instance.o
"_freeArguments", referenced from:
_myForwardInvocation in wax_instance.o
ld: symbol(s) not found for architecture armv7
in both cases i cant find this method anywhere (except bold declarations)
@felipejfc any advice? thanks for trying to keep this project up! wax is convinient indeed, it`s a pity it is dropped by probablycore //
from wax.
@IPv6 I think you are not including all n-wax files in your project, check if you are including wax_ffi_closure .m and .h and also /lib/libffi files
from wax.
About the no_ffi branch you are probably not including wax_arguments .m and .h. In both cases you need to add files to your project, with the hacks i made for making it work i added new files into Wax. Note that I do not know which version is more performatic /stable. With or without libffi. Ild like your feedback
from wax.
@felipejfc Hi, I have just tested n-wax(the newest master branch: 89f3d35), the "states example" crash on iphone6 plus hardware device(Thread1: EXC_BAD_ACCESS (code=2, address=0x104aa8490)), but run OK on iphone6 plus simulator. Bug from libffi??
from wax.
@felipejfc Hi,would you please show me some details about how to compile wax_stdlib_64.h,thanks
from wax.
@qazaaa https://github.com/maxfong/wax_stdlib_x64
from wax.
wax is maintained by alibaba now, 64bit is support. see https://github.com/alibaba/wax
from wax.
Related Issues (20)
- Twitter example fails due changed API
- Possible small bug in wax_xml.m?
- Support for Objective-C blocks HOT 4
- error in wax_sqlite_operations.m ? HOT 1
- wax 3rd-party framework & Catalog supporting issue in hybrid project HOT 2
- Synchronous calls to wax.http.request
- rake framework fail
- no dealloc in iphone SDK 5.1 HOT 1
- UIAlertView:initWithTitle_message_delegate("title", "message", nil) error HOT 1
- selector question
- Missing git semantic version tag
- how to load my byte code files when using wax.framework HOT 5
- I can't initialize NSDictionary or NSMutableDictionary in lua HOT 1
- How to using Objective-C Block HOT 8
- Wax is being maintained by Alibaba. send issue to https://github.com/alibaba/wax
- write Masonry in lua HOT 1
- HTTP with parameters (header) request how to achieve
- is it possible to patch for calling a c fucntion? HOT 1
- Wax not displaying lua errors on Swift
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wax.