Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory exception #4

Open
sayan-sen opened this issue May 26, 2020 · 0 comments
Open

Out of memory exception #4

sayan-sen opened this issue May 26, 2020 · 0 comments

Comments

@sayan-sen
Copy link

Am trying to use the lib in my android app but:
When i use
EDF edf=new EDF(filepath); edf.getLabels()[0] //or edf.getSamplingRate()
I get this exception:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.myapplication, PID: 29579
    java.lang.OutOfMemoryError: Failed to allocate a 512000016 byte allocation with 12582912 free bytes and 189MB until OOM, target footprint 14976648, growth limit 201326592
        at br.unb.biologiaanimal.edf.EDFReader.readRecords(EDFReader.java:106)
        at br.unb.biologiaanimal.edf.EDFReader.<init>(EDFReader.java:25)
        at br.unb.biologiaanimal.edf.EDF.<init>(EDF.java:24)
        at com.example.myapplication.MainActivity.runEDFfile(MainActivity.java:103)
        at com.example.myapplication.MainActivity.access$000(MainActivity.java:31)
        at com.example.myapplication.MainActivity$2.onMenuItemClick(MainActivity.java:89)
        at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:154)
        at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
        at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:981)
        at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
        at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
        at android.view.View.performClick(View.java:7140)
        at android.view.View.performClickInternal(View.java:7117)
        at android.view.View.access$3500(View.java:801)
        at android.view.View$PerformClick.run(View.java:27355)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7410)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

Any suggested workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant