Skip to content

Crash: When Attempting to Download Offline Region #215

Closed

Description

@adavis

I receive this error when I attempt to download an Offline Region:

11-21 12:32:01.558 com.offgrid.electric.zola.sales.staging A/libc: /usr/local/google/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed
11-21 12:32:01.559 com.offgrid.electric.zola.sales.staging A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 12494 (DefaultFileSour)

I'm using the following version:

compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-beta.5@aar') {
        transitive = true
        exclude group: "com.google.guava"
    }

Here's the code:

public void createOfflineRegion (String styleUrl, LatLngBounds latLngBounds, float density)
    {
        offlineManager.createOfflineRegion(
                getDefinition( styleUrl, latLngBounds, density ),
                getMetaData(),
                new OfflineManager.CreateOfflineRegionCallback()
                {
                    @Override
                    public void onCreate (OfflineRegion offlineRegion)
                    {
                        offlineRegion.setDownloadState( OfflineRegion.STATE_ACTIVE );
                        offlineRegion.setObserver( new OfflineRegion.OfflineRegionObserver()
                        {
                            @Override
                            public void onStatusChanged (OfflineRegionStatus status)
                            {
                                if ( status.isComplete() )
                                {
                                    Timber.i( "Region downloaded successfully." );
                                }
                            }

                            @Override
                            public void onError (OfflineRegionError error)
                            {
                                Timber.e( "onError reason: " + error.getReason() );
                                Timber.e( "onError message: " + error.getMessage() );
                            }

                            @Override
                            public void mapboxTileCountLimitExceeded (long limit)
                            {
                                // Notify if offline region exceeds maximum tile count
                                Timber.e( "Mapbox tile count limit exceeded: " + limit );
                            }
                        } );
                    }

                    @Override
                    public void onError (String error)
                    {
                        Timber.e( "Error: " + error );
                    }
                } );
    }

Pretty much just copied from the Sample. Any ideas what could be causing this crash? Thanks

Activity

  1. zugaldia commented on Nov 21, 2016

    @zugaldia
    Member
  2. cammace commented on Nov 21, 2016

    @cammace

    Picking up this ticket in GL-native repo mapbox/mapbox-gl-native#7137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions