Georgy Dyuldin
c9b6348a2b
Fix traceback.print_exc call
...
`traceback.print_exc` expects `limit` as a first argument. Passing
excepiton instance (AssertionError in example below) raises TypeError
inside of traceback module:
```
TypeError: unorderable types: AssertionError() >= int()
```
2017-11-20 18:21:27 +03:00
madhawav
19b8a0bfcf
Fixed issue #279 which causes callbacks to fail in Windows 64 bit
2017-08-11 23:16:08 +05:30
Mathieu Virbel
f5b555d3d2
Add specific case for Android/libART: it crash if we check NativeInvocationHandler/InvocationHandler with isAssignableFrom. Plus, include some defaults methods implementation of java.lang.Object (hashCode, toString, equals), which is used by ART. Closes #92 . Closes #113 .
2014-07-31 13:49:25 +02:00
Mathieu Virbel
9a18e94aa9
proxy: add "except *" to correctly propagate the python exception in invoke0, and let traceback print it. (python exception doesn't go through java... ^^).
...
+ avoid double-referencing in proxy. Before, we was having weird issue without it, but i'm not able to trigger it right now. Do the clean way.
2013-09-10 11:03:55 +02:00
Mathieu Virbel
04c8ced2a7
Merge branch 'master' of github.com:kivy/pyjnius
2013-08-17 19:14:04 +02:00
Mathieu Virbel
8541c489ff
make sure that GetObjectArrayElement are freed.
2013-08-17 19:13:49 +02:00
Max Shabalihin
d226263174
fix NotImplemented not found
2013-08-12 17:26:44 +04:00
Mathieu Virbel
5ff62b146e
last fixes to make pyjnius Java-thread proof. If you call any jnius related from a C thread, it will leak and/or crash (this hasnt been tested).
2013-06-25 11:49:42 +02:00
Mathieu Virbel
21d365df24
XXX avoid to switch between thread when invoke0 is called / new push_jnienv/pop_jnienv. Without it, if another thread use pyjnius = crash. (i have explored TLS storage for storing j_env, but it seems not available on Android.
2013-06-25 00:08:24 +02:00
Mathieu Virbel
8349037dd3
jnius: fix push/pop jnienv in order to avoid GIL going on using the previous thread env while we are still on the current thread
2013-06-24 18:36:58 +02:00
Mathieu Virbel
5bf97da477
jnius: refactor to not save jni env, and use the current pushed/pop env. This resolve few issues when pyjnius is called from a proxy (error such as E/dalvikvm( 6036): JNI ERROR: env->self != thread-self (0x68415860 vs. 0x400bb010); auto-correcting)
2013-06-24 17:58:20 +02:00
Mathieu Virbel
ded2378679
Add __javacontext__ for proxy class, which can be either "system" or "app". Default goes to system if non existent.
...
Also check the exception before trying to convert the returned value, as i've experienced, sometimes the value returned is not NULL, but is not valid at all, cause an exception happen.
2013-04-28 19:15:25 +02:00
Mathieu Virbel
1844de341e
add a better repr for LocalRef class (ie, indicate the source reference we came from.)
2013-04-28 19:14:14 +02:00
Mathieu Virbel
4cf0b865b9
cython 0.19 fixes, jlong was interpreted as a number, not as a pointer value anymore.
2013-04-28 19:13:23 +02:00
Mathieu Virbel
242245a6f4
proxy: force GIL on invoke0, and add a special case for $Proxy name (android failed to FindClass)
2013-03-24 18:45:33 -05:00
Mathieu Virbel
2a95adc674
cleanup proxy code
2013-03-13 21:38:10 +01:00