0
\$\begingroup\$

I'm creating a game for Android using libgdx and Google Firebase for storage. In my Loading screen I download a file from Google Firebase Storage and store it in a temp file. After the dowload ends with success, back in the main thread (Loading Screen) I load the downloaded file with my Asset Manager and then I call finishLoading(). When I do this I get the following error ( I get the error when executing finishLoading() ):

A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 26492 (AssetManager), pid 26430 (MY.GAME.PACKAGE)

Code for loading and calling finishLoading in Loadings creen:

myAssetManager.manager.load("/data/user/0/MY.GAME.PACKAGE/cache/FILE_NAME.ogg", Sound.class);
myAssetManager.manager.finishLoading();

Any ideas of how can I solve this. Is it possible to use the Asset Manager for loading a temp file ?

Thank you !

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I solved it. The problem was the FileHandleResolver asociated with the Asset Manager. The default is internal. What I did is create two Asset Managers inside my MyAssetManager class. One for absolute paths (downloaded temp resources) and other for internal. and it worked.

public class MyAssetManager {

public final AssetManager manager = new AssetManager();
public final AssetManager manager_storage = new AssetManager(new AbsoluteFileHandleResolver());
...
}

I used the absolute one for loading the downloaded asset.

myAssetManager.manager_storage.load("/data/user/0/MY.GAME.PACKAGE/cache/FILE_NAME.ogg", Sound.class);
myAssetManager.manager_storage.finishLoading();
```
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .