Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tilengine on Java
#61
Ah yeah then if you want to have to keep both versions of Java, you need to specify the absolute path to the 32-bits compiler or create a new variable environnement

Did you tried with my project?
Reply
#62
How are you doing progress? You can make a "pull request" so I can integrate your updates into main branch
Reply
#63
I'll do it when the crash issue is solved.

I still have the crash issue and the program closes with this message : Process finished with exit code -1073740940 (0xC0000374)

Normally, if the program finishes correctly, the compiler should say "Process finished with exit code 0" and that's not the case here.

When you tested in your side, did you tried with my project that contains my update?
Reply
#64
Hi,
I did the test with my original samples, but with the modifications you made to Tilengine.java and TilengineJNI.c. Here I attach the same sources I used for the binding.


Attached Files
.zip   TilengineJNI.zip (Size: 7.95 KB / Downloads: 2)
Reply
#65
did you linked with the latest version of Tilengine.dll?

I did and the Java compiler said that : 

Code:
Execution protection violation
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x005f0061, pid=128360, tid=0x0001d44c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_271-b09) (build 1.8.0_271-b09)
# Java VM: Java HotSpot(TM) Client VM (25.271-b09 mixed mode windows-x86 )
# Problematic frame:
# C  0x005f0061
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\[path to file]\hs_err_pid128360.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Tilengine v2.8.5 32-bit built Dec  6 2020 12:48:12

Process finished with exit code 1

and it outputs a beautiful crashlog


Attached Files
.txt   hs_err_pid115820.txt (Size: 17.75 KB / Downloads: 1)
Reply
#66
I use Tilengine v2.8.5 32-bit built Aug 7 2020, the seme binary you can download at itch.io.

Are you running your TestWindow or mine? I can see in the log dump you provided that the problem is caused in the call to SetRasterCallback().
Here I attach my TilengineJNI.dll, it includes your enhancements. Does it crash for you too?


Attached Files
.zip   TilengineJNI.zip (Size: 5.5 KB / Downloads: 2)
Reply
#67
It works! how did you do that? did you do some modifications in the files?
Reply
#68
Cool!
Basically the files I used are the same ones you pushed to your fork of the binding. Maybe the tricky part here is the building of native TilengineJNI.dll
Now that you have it working again, find when does it break: start by building your own dll and check it with the rest of the project. If doesn't crash, change other components -only one each time- until it crashes. Let's isolate the origin of the crash.
Reply
#69
Very very weird

I compiled with gcc, the program doesn't even start and the compiler say : Exception in thread "main" java.lang.UnsatisfiedLinkError: Tilengine.Init(IIIII)I

I compiled with tcc, everything works fine

Do you know why it works with tcc and not for gcc?
Reply
#70
I have the same issue: only dll generated by tcc works, the one with mingw32-gcc doesn't. It must be something about the calling convention (there are different standards). Under Windows I work with Visual Studio or tcc for command line. I only use gcc under Linux.
https://stackoverflow.com/questions/2079...th-stdcall

By the way, the component complaining is not the C compiler, it's the Java Virtual MAchine (JVM) responsible of executing the Java program.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)