rosjava / android_apps

Applications built on top of the rosjava android libraries.
133 stars 112 forks source link

Illegal call to VisualizationView.onCreate #46

Closed mistoll closed 9 years ago

mistoll commented 9 years ago

In map_nav's MainActivity (and propably in the other apps, too) the call to VisualizationView.onCreate is made in the Activity's init method and not in onCreate, as demanded by the documentation of VisualizationView. Furthermore VisualizationView.init isn't called at all.

This might work under some circumstances, but when running the current head of the indigo branch on an Android 4.0 device, the app crashed every time on startup throwing a NullPointerException in SurfaceView.updateWindow. The stack didn't include any custom/rosjava methods. Calling VisualzationView.onCreate and init in the designated methods fixed the problem.

I'd submit a pull request, but the fix needs some architectural changes in the layers, which you might want to do yourself.

stonier commented 9 years ago

@dwlee is in the middle of fixing this. Was a result of some changes in master from hydro to indigo. I'll link back to this when we get the pull request in. Thanks for the notification!

stonier commented 9 years ago

Android core change made in https://github.com/rosjava/android_core/pull/237

Update to these map related android apps coming shortly.

stonier commented 9 years ago

Android apps updated for the core api revert in https://github.com/rosjava/android_apps/pull/48

stonier commented 9 years ago

Please test and hopefully enjoy! :neckbeard:

dwlee commented 9 years ago

I finished test and you can enjoy!

stonier commented 9 years ago

Awesome.