Giter Site home page Giter Site logo

Comments (14)

enricogior avatar enricogior commented on August 21, 2024

On what platform is it happening?

from jxcore.

enricogior avatar enricogior commented on August 21, 2024

Is step 4 correct?

from jxcore.

enricogior avatar enricogior commented on August 21, 2024

What jxcore version has been installed?

from jxcore.

andrew-aladev avatar andrew-aladev commented on August 21, 2024

This bug works in osx.

from jxcore.

enricogior avatar enricogior commented on August 21, 2024

@andrew-aladev thanks.

from jxcore.

andrew-aladev avatar andrew-aladev commented on August 21, 2024

When you are in test/www/jxcore you can reproduce this by jx runTests.js bv_tests/testPouchDBGenerator.js

from jxcore.

enricogior avatar enricogior commented on August 21, 2024

Just to make sure: jx is using V8?

from jxcore.

andrew-aladev avatar andrew-aladev commented on August 21, 2024

My jx was installed using new gist.

jx -jxv
> v0.3.1.2
jx -jsv
> Google V8 v3.14.5.9

from jxcore.

enricogior avatar enricogior commented on August 21, 2024

OK, thanks.

from jxcore.

enricogior avatar enricogior commented on August 21, 2024

I started the investigation, I can repro the bug on macOS, while on Linux the bug is not present.

from jxcore.

enricogior avatar enricogior commented on August 21, 2024
* thread #6: tid = 0x8acaa, 0x00007fff93a21f2e libsystem_malloc.dylib`malloc_error_break, stop reason = breakpoint 1.1
  * frame #0: 0x00007fff93a21f2e libsystem_malloc.dylib`malloc_error_break
    frame #1: 0x00007fff93a12fd2 libsystem_malloc.dylib`free + 314
    frame #2: 0x00000001001ea351 jx`leveldown::AsyncWorker::SetStatus(leveldb::Status) [inlined] leveldb::Status::operator=(s=0x0000700000541e78) + 28 at status.h:99
    frame #3: 0x00000001001ea335 jx`leveldown::AsyncWorker::SetStatus(this=0x00000001018005b0, status=(state_ = 0x0000000000000000)) + 17 at async.h:34
    frame #4: 0x00000001057063cd leveldown.node`leveldown::OpenWorker::Execute(this=0x00000001018005b0) + 51 at database_async.cc:54
    frame #5: 0x00000001002085bf jx`worker(arg=<unavailable>) + 90 at threadpool.c:68
    frame #6: 0x00000001001fe9ac jx`uv__thread_start(ctx_v=<unavailable>) + 25 at uv-common.c:282
    frame #7: 0x00007fff88ad799d libsystem_pthread.dylib`_pthread_body + 131
    frame #8: 0x00007fff88ad791a libsystem_pthread.dylib`_pthread_start + 168
    frame #9: 0x00007fff88ad5351 libsystem_pthread.dylib`thread_start + 13
inline void Status::operator=(const Status& s) {
  // The following condition catches both aliasing (when this == &s),
  // and the common case where both s and *this are ok.
  if (state_ != s.state_) {
    delete[] state_;
    state_ = (s.state_ == NULL) ? NULL : CopyState(s.state_);
  }
}

from jxcore.

enricogior avatar enricogior commented on August 21, 2024

@andrew-aladev
the test requires leveldown-mobile, but when running on macOS, it's using leveldown, as you can see from the stack trace.
If I remove node_modules/leveldown, the test passes. I'm a little bit lost here.

$ jx runTests.js bv_tests/testPouchDBGenerator.js
Test runner loading file: /Users/cicoriasmbp13/build/Thali_CordovaPlugin/test/www/jxcore/bv_tests/testPouchDBGenerator.js
TAP version 13
# setup
# test defaultDirectory
ok 1 should be equal
ok 2 should be equal
ok 3 should be equal
# teardown
# setup
# test defaultAdapter
ok 4 should be equal
ok 5 should be equal
ok 6 should be equal
ok 7 should be equal
ok 8 should be equal
ok 9 should be equal
ok 10 should be equal
ok 11 should be equal
# teardown

1..11
# tests 11
# pass  11

# ok

P.S. On Linux it uses leveldown-mobile.

from jxcore.

yaronyg avatar yaronyg commented on August 21, 2024

This is a bug and we do need to fix it but we are kicking down the priority. We need to make sure we don't call the wrong leveldown.

from jxcore.

yaronyg avatar yaronyg commented on August 21, 2024

So what is almost certainly happening here is that at some point we installed PouchDB or Express-PouchDB using node which would cause us to bring in leveldown. Then we used JX to run some tests in the same directory. But Pouch still prefers leveldown to leveldown-mobile and so boom. I think we now avoid this because we hard coded our dependency on leveldown-mobile when we call PouchDB. But in any case we have a work around (delete node_modules/leveldown) so I'm kicking this to Icebox for now.

from jxcore.

Related Issues (20)

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.