When trying to set up hand tracking following the hand tracking-documentation unity just shuts down when pressing play without any crashlog/warning. Here are the steps that I have done up until the crash to reproduce my problem:
Creating completely new scene.
Importing the Oculus Integration from asset store.
Switching platform to Android.
Add OVRCameraRig to hierachy.
Change OVRCameraRig's Hand tracking support to "Controllers & Hands" on OVR Manager-script.
Up to step 5 I can press play whenever and it starts as usual. But when doing the next step it crashes everytime.
Add "OVRHandPrefab" to OVRCameraRig > TrackingSpace > LeftHandAnchor/RightHandAnchor.
Has anyone experienced a similar problem to this?
Thanks in advance!
EDIT: Unity does not crash when removing Link cable from laptop. So has certainly something to do with link.
Have you tried enabling hand tracking in your Quest Headset (while unplugged)?
Its in Settings -> Experiments -> Enable Hand Tracking
I also have 'Auto detect hands or controllers' enabled. To see your hands, the new OVRCustomHandPrefab does the trick.
[Edit]
Also the headset seems to cause crashes after its been sitting on the desk connected to Link for more than a few minutes. Unplugging and reconnecting will refresh it.
I don't know if you were able to solve this issue or not, but for any other person who is facing a similar issue, here is how I solved it:
When you add OVRHandPrefab to LeftHandAnchor and RightHandAnchor, set the gameobject to false in the inspector.
Then in your script, check if handtracking is enabled by running this code in Update() OVRPlugin.GetHandTrackingEnabled()
Set both the OVRHandPrefab to true only when OVRPlugin.GetHandTrackingEnabled() returns true, something like this:
if (OVRPlugin.GetHandTrackingEnabled())
{
ovrHandPrefabLeft.SetActive(true);
ovrHandPrefabRight.SetActive(true);
}
else
{
ovrHandPrefabLeft.SetActive(false);
ovrHandPrefabRight.SetActive(false);
}
This should avoid Unity from crashing.
Related
Everything works in Debug Mode but Crashes in Release Mode. What required permissions are available in Debug Mode that are not turned on in Release mode?
EDIT
When I set Linking to None, I get past the first screen to my Login screen. However, when I added the Release permission Internet, the first time it tries to read a remote Entity Framework Core Table it crashes.
EDIT 2
In Release Mode, if I check Use Shared Runtime, the app runs fine.
EDIT 3
I have turned on Debugging while in Release mode Temporarily. The Following line throws a System.TypeInitializationException only in Release Mode:
if (_context.bma_users.Any(p => p.username == _name.Text) && _name.Text != string.Empty)
IF YOU JUST WANT TO SEE THE CRASH LOG:
Assuming you have Android Studio and no crash report service implemented (Firebase, Crashlytics, etc...)
You might want to see the crash log print first:
Open the Logcat in Android Studio.
Change Log Level to Error.
Make sure USB debugging is enabled on your device.
Connect your device to the computer.
Make the app crash and see what it prints.
If you can't reproduce:
Next time it crashes, connect the device and do the same as above. Usually the log history will be available to view, scroll until you find the crash :)
Look for FATAL EXCEPTION
Keep in mind - using the Logcat search bar can clear the log history, in most cases you can reconnect your device to view it again.
You already assume "permission", not sure why...
The first thing I disable when I have something crashing only in release mode is minify (aka ProGuard). So disable the obfuscation, build again and try to see if you still get crashes. If not, reenable proguard one line at a time to pinpoint the cause.
The answer was to set Additional supported encodings to West in the Android Options screen under Project Properties. It doesn't seem related but I was trying every possible combination and this finally worked.
You can just set debuggable: true for your release build type.
Don't forget to remove this property once you're done with debugging.
Go to the properties of the android section and then into the Android options tab.
Make sure that the "Use Shared Runtime" and "Use Fast Deployment" boxes are unticked in your release configuration
You can use any of the crashlytics tools like Firebase Analytics, Fabric, Splunk Mint to get the exact crash log
Please check crashlytics they mention exact line number where your app was crashing. You can see what error is showing, then you can fix.
I'm trying to debug an application that I'm writing using Android Studio but I can't seem to get any useful debugging information out of Android Studio's "Debug" view. I'm launching my application with the bug-looking "Debug" icon but the "Debug" view doesn't have anything useful (no stack frames from my application, for example):
Even if my application crashes I don't get any useful information. As I recall, the ADT plugin would automatically drop you on the line that caused the crash.
Do I need to do anything else to make my application "debuggable" in Android Studio? I've also tried forcing android:debuggable="true" in my AndroidManifest.xml but to no avail. Android Studio does seem to be attaching to the running process (the app shows the "attaching to debugger" message for a few seconds when it first launches).
There are some things to check:
If your app-debugger is working and stopping on normal breakpoints, maybe you have to set an exception-breakpoint:
Open Debugger
Press "View breakpoints"
Usually, there should be a breakpoint called "Any exception" with checkboxes on "Caught exception" and "Unchaught exception". If not, add an exception breakpoint yourself and specify the type(s) of exceptions you want the debugger to stop on (you can use wildcards in the exception-classnames, e.g. *Exception).
If your app-debugger is not working, check the following options:
Check if you have enabled USB-Debugging in the developer options of your device
Check if you have authorized the computer as a development machine in the developer options of the device (if unsure, clear the authorization-list from the developer options page and reconnect the device)
Check if your development machine has only one adb-server-process running in the background (if more, kill all of them with a process mananger and restart with "adb start-server")
Add "debuggable true" to your debug-buildType in build.gradle:
buildTypes {
debug {
debuggable true
}
...
}
If your app-debugger is still not working, restart your computer and re-install adb-drivers for your device. Make sure there are no conflicting drivers active with more than one connected device (maybe connecting only one at a time).
Note: even if you got exception breakpoints working, they might not be useful at all, depending on the type of the crash. Most of the times, you will get the debugger stopping in the Zygote-exception handler where you don't get much useful information or stacktrace.
In such cases, it is the easiest to just let the debugger resume or reproduce the crash without a debugger, and check the logcat-output for a stacktrace in the ERROR-loglevel of your app's logcat-output. Those stacktraces should have clickable line-infos thus enabling you to set a normal breakpoint on a relevant line of code in your app's source code to analyze the problem.
After updating Android studio this problem went away. Not sure what the issue was.
I have an SBH50 from Sony this one, http://www.sonymobile.com/global-en/products/accessories/stereo-bluetooth-headset-sbh50/, (not the MW1).
I've been wasting time trying to make work the sample control app which sony provides in the Add On SDK.
I was able to run the notification API example, it creates a new item in the 'Events list'. But I cant do the same with the Control API.
Btw, I cant either debug the app. I mean, I put a breakpoint in the same point a log is made, and the log IS made, but the debug does not stops there.
I just want to capture a key event.
The Control API isn't supported on the SBH50, only the Notification API as you have noted above.
In order to debug try running your extension in debug mode, then in DDMS select the running task and press the debug button. Then it should stop at your breakpoints.
It seems Sony has just released new add-on API to control the SBH50 as well. Please refer to link below:
http://developer.sonymobile.com/2013/11/12/sony-add-on-sdk-updated-adds-support-for-stereo-bluetooth-headset-sbh50-and-smart-bluetooth-handset-sbh52/
I'm trying to get the Sample Media Player App working, and have run into a problem. I have whitelisted my two URLs, and have gotten the app to run on my Android device without any issues.
My problem starts when actually attempting to cast the sample media. My Chromecast correctly displays as an option, however choosing it from the list does not yield any results on the Chromecast, itself (although it appears that my Android device connects without any issues). Could this be caused by my whitelisted URL not ending in ".html"? Here (link removed) is my page, for what it's worth.
Any help would be greatly appreciated.
Please check if the answer in this question (Chrome-cast Sample App doesn't work) can solve your problem.
Basically you need to set AppID in your receiver.html as well.
I think the problem is in MediaRouteHelper.registerMinimalMediaRouteProvider(mCastContext, this);
try to cheak its value, wheter it is returning true or false
if its returning false then it will not run properly
I'm new to Java and more than I'm new to Android. After reading and trying some tutorials I was thinking to make an mp3 player application, but I'm stuck already. I assume that my runtime error is in the following method and more specifically the if condition.
public void pausePlay(){
if(player.isPlaying()){
demoPause();
} else {
demoPlay();
}
}
Maybe I'll be able to solve my problem, but my debugger doesn't work. Or I don't know how to use the debugger. The following links are a printscreen of my debugger, DDMS and LogCat. Also on github I posted my repository.
In eclipse try the following steps to debug your code:
1.Put a break point in your code where you think the problem is(the app will pause in device when it reaches that code later you can continue to look code flow by pressing F6)
2.Click ddms->device-> If the device is attached it will show you the list of processes, select your process and click green debug icon at top of device.
3.Run your app, when the code flow reaches break point app will pause a dialog appears in eclipse click yes to continue. Next you can continue debugging in eclipse.