You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//effekseer stuff
lateinit var assetManager:AssetManager
lateinit var myFileHandleResolver: FileHandleResolver
lateinit var manager:EffekseerManager
lateinit var myParticle:EffekseerParticle
init {
EffekseerGdx.init()
initEffekseer()
initializeBullet()
createAxes()
createFloor(50f, 1f, 50f)
}
private fun initEffekseer() {
myFileHandleResolver=MyFileHandleResolver()
assetManager= AssetManager(myFileHandleResolver)
assetManager.setLoader(EffekseerParticleSubAssetLoader.Result::class.java,
null,EffekseerParticleSubAssetLoader(myFileHandleResolver))
assetManager.setLoader(
EffekseerParticleAssetLoader.Result::class.java, null, EffekseerParticleAssetLoader(myFileHandleResolver)
)
manager= EffekseerManager(camera, EffekseerCore.TypeOpenGL.OPEN_GL2,1000,modelBatch.renderContext)
myParticle= EffekseerParticle(manager)
myParticle.setMagnification(20f)
myParticle.syncLoad(assetManager, "random colors.efk")
myParticle.play()
}
override fun render(delta: Float) {
super.render(delta)
manager.draw(delta)
manager.drawAfterUpdate()
dynamicsWorld?.stepSimulation(delta)
debugDrawer?.begin(camera)
dynamicsWorld?.debugDrawWorld()
debugDrawer?.end()
}
class MyFileHandleResolver:FileHandleResolver{
override fun resolve(fileName: String?): FileHandle {
return Gdx.files.internal(fileName)
}
}
override fun dispose() {
super.dispose()
myParticle.dispose()
manager.dispose()
}
}
The super.render method is:
fun render(delta:Float){
cameraController.update()
ScreenUtils.clear(Color.BLACK, true)
shadowLight!!.begin(Vector3.Zero, camera.direction)
shadowBatch.begin(shadowLight!!.camera)
shadowBatch.render(renderInstances)
shadowBatch.end()
shadowLight!!.end()
modelBatch.begin(camera)
modelBatch.render(renderInstances, environment)
modelBatch.end()
//setting up the debug renderer
stage.act()
stage.draw()
}
I'm using version 2.2.3 of effekseer for libgdx, I tried to load the .efk file asyncronously via myParticle.asyncload but the onEffectLoaded method wouldn't execute (I set it to println "particle loaded" when finished loading, but it just doesn't do it), in the log it says:
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j io.github.srjohnathan.gdx.effekseer.core.GDXJNI.EffekseerEffectCore_GetTextureCount(JLio/github/srjohnathan/gdx/effekseer/core/EffekseerEffectCore;I)I+0
j io.github.srjohnathan.gdx.effekseer.core.EffekseerEffectCore.GetTextureCount(Lio/github/srjohnathan/gdx/effekseer/core/EffekseerTextureType;)I+9
j io.github.srjohnathan.gdx.effekseer.loader.EffekseerParticleAssetLoader.loadAsync(Lcom/badlogic/gdx/assets/AssetManager;Ljava/lang/String;Lcom/badlogic/gdx/files/FileHandle;Lio/github/srjohnathan/gdx/effekseer/loader/EffekseerParticleAssetLoader$Parameters;)V+123
j io.github.srjohnathan.gdx.effekseer.loader.EffekseerParticleAssetLoader.loadAsync(Lcom/badlogic/gdx/assets/AssetManager;Ljava/lang/String;Lcom/badlogic/gdx/files/FileHandle;Lcom/badlogic/gdx/assets/AssetLoaderParameters;)V+9
j com.badlogic.gdx.assets.AssetLoadingTask.call()Ljava/lang/Void;+167
j com.badlogic.gdx.assets.AssetLoadingTask.call()Ljava/lang/Object;+1
j com.badlogic.gdx.utils.async.AsyncExecutor$2.call()Ljava/lang/Object;+4
j java.util.concurrent.FutureTask.run()V+39 [email protected]
j java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+92 [email protected]
j java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5 [email protected]
j java.lang.Thread.run()V+11 [email protected]
v ~StubRoutines::call_stub
siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0x0000000000000000
Register to memory mapping:
RIP=0x00007ffafddfd6f7 src.dll
RAX=0x00007ffafdda68e0 src.dll
RBX={method} {0x00000133b29ba900} 'EffekseerEffectCore_GetTextureCount' '(JLio/github/srjohnathan/gdx/effekseer/core/EffekseerEffectCore;I)I' in 'io/github/srjohnathan/gdx/effekseer/core/GDXJNI'
RCX=0x0 is NULL
RDX=0x0 is NULL
RSP=0x0000001b65cfecf8 is pointing into the stack for thread: 0x00000133b1fbcbd0
RBP=0x0000001b65cfed90 is pointing into the stack for thread: 0x00000133b1fbcbd0
RSI=0x0000000712c9c450 is an oop: [Ljava.lang.Object;
{0x0000000712c9c450} - klass: 'java/lang/Object'[]
- length: 64
RDI=0x00000133947f9612 is at code_begin+1394 in an Interpreter codelet
return entry points [0x00000133947f90a0, 0x00000133947f9ba0] 2816 bytes
R8 =0x00000133b1c8cd60 points into unknown readable memory: 0x0000000000000000 | 00 00 00 00 00 00 00 00
R9 =0x0000001b65cfedb8 is pointing into the stack for thread: 0x00000133b1fbcbd0
R10=0x00000133947fd5f2 is at code_begin+946 in an Interpreter codelet
method entry point (kind = native) [0x00000133947fd240, 0x00000133947fdbc0] 2432 bytes
R11=0x0000000712ffba38 is an oop: java.lang.Class
{0x0000000712ffba38} - klass: 'java/lang/Class'
- ---- fields (total size 14 words):
- private volatile transient 'classRedefinedCount' 'I' @12 0
- private volatile transient 'cachedConstructor' 'Ljava/lang/reflect/Constructor;' @40 NULL (0)
- private transient 'name' 'Ljava/lang/String;' @44 "io.github.srjohnathan.gdx.effekseer.core.GDXJNI"{0x0000000712ffbab8} (e25ff757)
- private transient 'module' 'Ljava/lang/Module;' @48 a 'java/lang/Module'{0x0000000711c21868} (e238430d)
- private final 'classLoader' 'Ljava/lang/ClassLoader;' @52 a 'jdk/internal/loader/ClassLoaders$AppClassLoader'{0x0000000711c20158} (e238402b)
- private transient 'classData' 'Ljava/lang/Object;' @56 NULL (0)
- private transient 'packageName' 'Ljava/lang/String;' @60 "io.github.srjohnathan.gdx.effekseer.core"{0x0000000712e7dca8} (e25cfb95)
- private final 'componentType' 'Ljava/lang/Class;' @64 NULL (0)
- private volatile transient 'reflectionData' 'Ljava/lang/ref/SoftReference;' @68 NULL (0)
- private volatile transient 'genericInfo' 'Lsun/reflect/generics/repository/ClassRepository;' @72 NULL (0)
- private volatile transient 'enumConstants' '[Ljava/lang/Object;' @76 NULL (0)
- private volatile transient 'enumConstantDirectory' 'Ljava/util/Map;' @80 NULL (0)
- private volatile transient 'annotationData' 'Ljava/lang/Class$AnnotationData;' @84 NULL (0)
- private volatile transient 'annotationType' 'Lsun/reflect/annotation/AnnotationType;' @88 NULL (0)
- transient 'classValueMap' 'Ljava/lang/ClassValue$ClassValueMap;' @92 NULL (0)
- signature: Lio/github/srjohnathan/gdx/effekseer/core/GDXJNI;
- fake entry for mirror: 'io/github/srjohnathan/gdx/effekseer/core/GDXJNI'
- fake entry for array: NULL
- fake entry for oop_size: 14
- fake entry for static_oop_field_count: 0
R12=0x0 is NULL
R13={method} {0x00000133b29ba900} 'EffekseerEffectCore_GetTextureCount' '(JLio/github/srjohnathan/gdx/effekseer/core/EffekseerEffectCore;I)I' in 'io/github/srjohnathan/gdx/effekseer/core/GDXJNI'
R14=0x0000001b65cfedc8 is pointing into the stack for thread: 0x00000133b1fbcbd0
R15=0x00000133b1fbcbd0 is a thread
Also If you could link a project that uses effekseer-gdx as an exaple it would be really useful, thanks.
The text was updated successfully, but these errors were encountered:
I'm trying to load a .efk file like this:
The super.render method is:
I'm using version 2.2.3 of effekseer for libgdx, I tried to load the .efk file asyncronously via myParticle.asyncload but the onEffectLoaded method wouldn't execute (I set it to println "particle loaded" when finished loading, but it just doesn't do it), in the log it says:
Also If you could link a project that uses effekseer-gdx as an exaple it would be really useful, thanks.
The text was updated successfully, but these errors were encountered: