I’ve recently got a mac and previews work fine… until I code some FuseJS logic and then the previewer crashes with and XliException? Any ideas?
Hi!
What version? Does it happen consistently? If so, can you provide a test case?
Hi, I’m running the latest El Capitan OS and up-to-date Fuse. I’ll send the crash report now.
Process: Fuse [2612]
Path: /Applications/Fuse.app/Contents/MacOS/Fuse
Identifier: com.fusetools.Fuse
Version: 0.9.4 (1)
Code Type: X86 (Native)
Parent Process: ??? [2611]
Responsible: Fuse [2612]
User ID: 501
Date/Time: 2015-12-26 10:43:28.201 +0000
OS Version: Mac OS X 10.11.2 (15C50)
Report Version: 11
Time Awake Since Boot: 2000 seconds
System Integrity Protection: enabled
Crashed Thread: 11 CVDisplayLink
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
terminating with uncaught exception of type Xli::Exception: Xli::Exception
abort() called
Does this happen with any project or just a specific project?
Can you please describe exact stepst to reproduce this problem?
This happens on all projects that include FuseJS, if the project has no js in it it previews fine.
I just launched Fuse, selected my project and previewed locally, it also does this from sublime text also. Previews are fine on the devices though so I know my code is fine.
I think it is because I am using the XMLHttpRequest library.
Can you post a minimal test case?
Well I thought it was my submit function to send off my form but I put this as a standalone and it works.
<App Theme="Basic">
<JavaScript>
var Observable = require("FuseJS/Observable");
var email = Observable("");
var password = Observable("");
// the submit function that sends details to server and check, and returns a value
function submit() {
//the httprequest object
var hr = new XMLHttpRequest();
//variables to pass to the object
var url = "http://jungleskull.xyz/login.php";
var params = "email="+email.value+"&password="+password.value;
hr.open("POST", url, true);
//set content type to tell server that parameters are in the url
hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
//use onreadystatechange event of the request object
hr.onreadystatechange = function() {
if(hr.readyState == 4 && hr.status == 200){
var return_data = hr.responseText;
email.value = return_data;
if(return_data == "Success"){
LoginVisibility.value = "Collapsed";
HomeVisibility.value = "Visible";
}
}
}
//send the data to the server and wait for the response
hr.send(params);
email.value = "Attempting login...";
}
module.exports = {
submit: submit,
email: email,
password: password
}
</JavaScript>
<StackPanel>
<TextInput Value="{email}" />
<TextInput Value="{password}" />
<Button Text="Submit" Clicked="{submit}" />
</StackPanel>
</App>
I think it might only happen now with that single project. I get this in the build log:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
/usr/local/bin/fuse: line 2: 568 Abort trap: 6 /Applications/Fuse.app/Contents/MacOS/Fuse "$@"
The only library I’m using is the XMLHttpRequest…
I tried your code and it worked fine. Could you try with latest version?
The latest version currently being 0.9.5. You can always download the latest version from https://www.fusetools.com/downloads
Yeah I have now 0.9.5 and still the same error. I can still preview on my device so must be to do with my mac?
Is there any update on this guys? I’ve actually wiped my mac and reinstalled OSX 10.11.3 again and I get exactly the same result. Starting to bug me that I can’t preview locally (pun intended).
Does this also happen if you do a non-preview build of your app?
fuse build --target=cmake --run
Also, if you’re not on the latest version (0.9.9) it could be a good idea to upgrade.
Hi Anders,
I just tried with CMake and it works completely fine!
Still quite annoying though as CMake cannot yet compile all the good features of fuse.