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

Expose resolvePath to JavaScript #426

Closed
wants to merge 1 commit into from

Conversation

KristinaKoeva
Copy link

Bundling and snapshotting android application requires a way to resolve a relative module path to an absolute one so expose runtime resolvePath method.

Bundling and snapshotting android application requires a way to resolve a relative module path to an absolute one so expose runtime resolvePath method.
@KristinaKoeva KristinaKoeva added this to the 2.0.0 milestone Apr 19, 2016
@jasssonpet
Copy link
Contributor

jasssonpet commented Apr 19, 2016

I have a question 😄 It looks to me that resolvePath() looks for existing files in the app folder. Does this mean that module files should be present in the final package, even when reading them from the snapshot?

@ns-bot
Copy link

ns-bot commented Apr 19, 2016

💚

@KristinaKoeva
Copy link
Author

If we want this to work the modules should be present in the package. If we don't want to include them in the package we should then include the package.json files in the bundle and create another runtime method that doesn't rely on File in order to retrieve the path.

@KristinaKoeva
Copy link
Author

The better approach would be to retrieve the absolute path of a module during bundling, so I am closing this one

@Plamen5kov Plamen5kov removed this from the 2.0.0 milestone Apr 19, 2016
@jasssonpet jasssonpet deleted the KristinaKoeva/ResolveModulePath branch April 21, 2016 15:17
@jasssonpet
Copy link
Contributor

I'm receiving the following error (#149) with this PR:

JNI ERROR (app bug): local reference table overflow (max=512)
local reference table dump:
  Last 10 entries (of 512):
      511: 0x12e46c40 java.lang.String "/data/data/org.n... (79 chars)
      510: 0x12e35220 java.lang.String "../../observable... (34 chars)
      509: 0x12e42530 java.lang.String "/data/data/org.n... (96 chars)
      508: 0x12e46980 java.lang.String "/data/data/org.n... (79 chars)
      507: 0x12e351c0 java.lang.String "../../observable... (34 chars)
      506: 0x12e46350 java.lang.String "/data/data/org.n... (78 chars)
      505: 0x12e45e80 java.lang.String "/data/data/org.n... (79 chars)
      504: 0x12e2eee0 java.lang.String "../../Observable"
      503: 0x12e0b940 java.lang.String "/data/data/org.n... (84 chars)
      502: 0x12e45640 java.lang.String "/data/data/org.n... (75 chars)
  Summary:
        2 of java.lang.Class (2 unique instances)
        1 of java.lang.String[] (3 elements)
      509 of java.lang.String (509 unique instances)
Check failed: count_ == 0 (count_=-1, 0=0) Attempted to destroy barrier with non zero count
Runtime aborting --- recursively, so no thread-specific detail!

@Plamen5kov
Copy link
Contributor

This happens when a JNI local ref is not deleted after it's used.

 509 of java.lang.String (509 unique instances)

You generate strings as a JNI local ref, without releasing them, so I might suggest either releasing them with env->DeleteLocalRef(jniStrObj), or making them global, with env.newGlobalRef(jniStrObj), if you need them for the whole duration of the program.

@blagoev
Copy link
Contributor

blagoev commented May 9, 2016

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

Successfully merging this pull request may close these issues.

5 participants