Git Product home page Git Product logo

noodle's People

Contributors

nolia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

noodle's Issues

Out of Memory Exception

Hi im having an issue using the library... i can successfully save to a collection... a retrieve it.. but when i save more info to the collection and try and retrieve it.. i get the following logcat error java.lang.OutOfMemoryError: Failed to allocate a 1869443181 byte allocation with 4290660 free bytes and 249MB until OOM at com.noodle.storage.FileMappedBufferStorage.remapIndexes(FileMappedBufferStorage.java:60) at com.noodle.storage.FileMappedBufferStorage.<init>(FileMappedBufferStorage.java:43) at com.noodle.Noodle$Builder.build(Noodle.java:276)

Any Ideas?

is the README outdated?

There is no .now() in com.noodle.Call
from readme

noodle.put("Android7", "Nougat").now();

test on a small project

Noodle noodle = Noodle.with(this).build();
noodle.put("Android7", "Nougat");
String result = noodle.get("Android7", String.class).value(); // result is null

The current state of the lib

Hello!
I can see that the last release tag was in 2017 but then you had some commits with different fixes.
The question is about releases because I wouldn't want to be dependent on SNAPSHOT, but it looks like it doesn't make sense to copy the whole library as well because I can see that there is an active branch with "kotlin" name where you rewrite the lib.
Is it possible to return back to releases with bug fixes and so on or next release will be only with Kotlin stuff?
Thanks!

java.lang.OutOfMemoryError

I'm got the following error

E/AndroidRuntime: FATAL EXCEPTION: main
Process: it.nullpointer.pizza, PID: 16767
java.lang.OutOfMemoryError: Failed to allocate a 1768841606 byte allocation with 5764948 free bytes and 91MB until OOM
at com.noodle.storage.ByteBufferStorage.getRecordAt(ByteBufferStorage.java:197)
at com.noodle.storage.ByteBufferStorage.get(ByteBufferStorage.java:173)
at com.noodle.collection.StoredConvertedCollection.findItemsWith(StoredConvertedCollection.java:123)
at com.noodle.collection.StoredConvertedCollection.access$300(StoredConvertedCollection.java:17)
at com.noodle.collection.StoredConvertedCollection$5.call(StoredConvertedCollection.java:104)
at com.noodle.collection.StoredConvertedCollection$5.call(StoredConvertedCollection.java:101)
at com.noodle.Result.now(Result.java:36)
at it.nullpointer.pizza.manager.PizzeManager.getPizze(PizzeManager.java:31)
at it.nullpointer.pizza.utils.Utils.tipiDiPizze(Utils.java:49)
at it.nullpointer.pizza.ui.fragment.CreaOrdineFragment.onCreate(CreaOrdineFragment.java:65)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2177)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1244)
at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1080)
at android.support.v4.app.FragmentTransition.calculateFragments(FragmentTransition.java:971)
at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:95)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2143)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2098)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2008)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

executing noodle.collectionOf(TipoDiPizza.class).all().now();

Now every time I open the app have a crash

E/AndroidRuntime: FATAL EXCEPTION: main
Process: it.nullpointer.pizza, PID: 21756
java.lang.OutOfMemoryError: Failed to allocate a 1734895916 byte allocation with 4018592 free bytes and 94MB until OOM
at com.noodle.storage.FileMappedBufferStorage.remapIndexes(FileMappedBufferStorage.java:60)
at com.noodle.storage.FileMappedBufferStorage.(FileMappedBufferStorage.java:43)
at com.noodle.storage.FileMappedBufferStorage.(FileMappedBufferStorage.java:20)
at com.noodle.Noodle.(Noodle.java:66)
at it.nullpointer.pizza.manager.OrdiniManager.(OrdiniManager.java:24)
at it.nullpointer.pizza.PizzaApp.onCreate(PizzaApp.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4557)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

creating noodle instance with
noodle = new Noodle(context) .registerType(OrdineDinamico.class, Description.of(OrdineDinamico.class).withIdField("noodleId").build()) .registerType(OrdineDiUnTipo.class, Description.of(OrdineDiUnTipo.class).withIdField("noodleId").build());

I tried with both v0.5 and snapshot.

I have 2 different manager with each different model (2 model the first and 1 the second), is this a problem?

Attached you can find the noodle file, the only one I found in the device, hoping can help.

data.noodle.zip

android 7.0 crash on delete

I use latest noodle from this
'compile 'com.github.nolia:Noodle:5a59e9940175120b973f879a389a54d2df2706c7''

Here's the sample

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)
    val n = Noodle.with(this).build()
    n.put("test1", Test("test1")).now()
    n.put("test2", Test("test2")).now()
    n.put("test3", Test("test3")).now()
    n.delete("test2").now()
}

class Test(val str: String)

}

Throws the following exception. Happens only on android 7.0(both emulator and real device).

Caused by: java.lang.RuntimeException: java.lang.NullPointerException: src == null at com.noodle.Result.now(Result.java:38) at com.example.khusainovd.luatest.MainActivity.onCreate(MainActivity.kt:16) at android.app.Activity.performCreate(Activity.java:6679) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6119)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)  Caused by: java.lang.NullPointerException: src == null at java.lang.System.arraycopy(System.java:504) at java.nio.DirectByteBuffer.compact(DirectByteBuffer.java:282) at com.noodle.storage.RandomAccessFileStorage.remove(RandomAccessFileStorage.java:95) at com.noodle.Noodle$3.call(Noodle.java:177) at com.noodle.Noodle$3.call(Noodle.java:174) at com.noodle.Result.now(Result.java:36) at com.example.khusainovd.luatest.MainActivity.onCreate(MainActivity.kt:16)  at android.app.Activity.performCreate(Activity.java:6679)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6119)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 

OutOfMemoryError when initializing Noodle after several usage

 java.lang.OutOfMemoryError: Failed to allocate a 808674370 byte allocation with 6077136 free bytes and 183MB until OOM
                                                                             at com.noodle.storage.FileMappedBufferStorage.remapIndexes(FileMappedBufferStorage.java:60)
                                                                             at com.noodle.storage.FileMappedBufferStorage.<init>(FileMappedBufferStorage.java:43)
                                                                             at com.noodle.Noodle$Builder.build(Noodle.java:275)

using the Noodle builder like this on Activity, onCreate:

this.noodle = Noodle
                .with(this)
                .addType(Description
                        .of(Model.class)
                        .withGetIdOperator(new Description.GetIdOperator<Model>() {
                            @Override
                            public long getId(Model model) {
                                return model.id;
                            }
                        })
                        .withSetIdOperator(new Description.SetIdOperator<Model>() {
                            @Override
                            public void setId(Model model, long id) {
                                model.id = id;
                            }
                        })
                        .build()
                )
                .build();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.