Problem with DRTLS Manager source code; node details

Hello,
I’ve been working with the dwm1001 development boards and the Android APK.
The supplied android APK is working fine, but when compiling from source I have encountered some problems.
Whenever I try to open the Node details menu to assign a tag as anchor for example, the application crashes.
I am now looking into what may be causing this, but I was wondering if anyone has encountered the same problem, and how to resolve it.

Hi Lori,

I cannot reproduce the same issue, did you have any chance in fixing it ?

Thanks
Yves

Hi Yves,
I haven’t found what causes this issue yet. I’ll try redownloading the code in case of a corrupt file. If the issue persists I will run the code in an emulator to debug. I will post the results here.
Kind regards, Lori

Hi,

Did you get anywhere with finding the cause of the crash? I get the same problem when I press on the pencil icon to edit the tag details.

Cheers,

Mark

I should mention in addition that I can download a pre-compiled version 14 of the APK from the Decaware website and that works OK. It’s when I use Android Studio to make an APK on my machine that it crashes when I try an edit the config of a discovered tag. Both my version and the downloaded version report as version 14.

The crash report from the debugger is as follows:

--------- beginning of crash

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.decawave.argomanager, PID: 6979
java.lang.IllegalStateException: must specify node ID in args!
at com.google.common.base.Preconditions.checkState(Preconditions.java:174)
at com.decawave.argomanager.ui.fragment.NodeDetailFragment.onCreate(NodeDetailFragment.java:351)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2236)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1285)
at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1085)
at android.support.v4.app.FragmentTransition.calculateFragments(FragmentTransition.java:976)
at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:95)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2198)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2155)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2064)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:718)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
I/Process: Sending signal. PID: 6979 SIG: 9
Disconnected from the target VM, address: ‘localhost:8600’, transport: ‘socket’

I’ve tried downloading the source code again and rebuilding, but no joy. Any help would be brilliant.

Thanks,

Mark

Hi, I’ve found the cause of the problem is the Long nodeId variable is fetching some number as -2134060293030481 instead of a regular id number. I am still debugging. If you know how to solve it, please let me know too.

Thanks

This may have been fairly obvious, but I found that this problem was fixed by changing build mode from debug to release. This has solved the problem for me at least.

1 Like

Make sense. Haven’t tried that until you have mentioned the build mode. Thanks

Further question: are you able to turn “debuggable” feature on when you are switching to release buildType? Once we try to turn that on, the app crashes.

public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // retrieve the original/to be modified node in each case
    Bundle args = getArguments();
    // ryan add
    if (args == null){
        //        Bundle args = getArgumentsForActiveNetworkNode();
        Log.d(String.valueOf(args.getLong(BK_NODE_ID)), "onCreate: ryan add");
    }

// if (Constants.DEBUG) {
//// Preconditions.checkNotNull(args, “must specify node details to show!”);
//// Preconditions.checkState(args.getLong(BK_NODE_ID, 0) == 0, “must specify node ID in args!”);
//// }

The same issue that I faced, just comment out the block of code contained in the if statement. It worked when I did so.

I have given the method to this error below.