Skip to content

Instantly share code, notes, and snippets.

@Hasufel
Hasufel / LoadingXml.hx
Created November 5, 2013 18:42
Simple Xml Loading using OpenFL - crashes on MAC OS X 10.6 with error: [0x0-0x24024].com.my.application[199] Terminal error type not string, File .//libs/std/Xml.cpp, line 386. Does not crash on Mac OS X 10.8. Architecture: - src/LoadingXml.hx - assets/english.xml - project.nmml
package;
import nme.Assets;
import nme.display.Sprite;
import nme.Lib;
import sys.io.File;
import sys.FileSystem;
class LoadingXml extends Sprite {
@Hasufel
Hasufel / gist:8405464
Created January 13, 2014 18:28
example for listener OnInputDeviceListener in mainview.java
package org.haxe.lime;
import android.app.Activity;
import android.content.Context;
import android.graphics.PixelFormat;
::if (ANDROID_TARGET_SDK_VERSION > 15)::import android.hardware.input.InputManager;::end:: //addition nils
::if (ANDROID_TARGET_SDK_VERSION > 15)::import android.hardware.input.InputManager.InputDeviceListener;::end:://addition nils
import android.opengl.GLSurfaceView;
import android.os.Build;
package;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.Lib;
import flash.display.Sprite;
import flash.display.StageScaleMode;
class TestActivate extends Sprite {
@Hasufel
Hasufel / gist:8899613
Last active August 29, 2015 13:56
Openfl Audio using Multitreading Crash on Android (Nvidia Shield, Android 4.3 Vanilla)
E/lime::System( 1190): GetEnv: not attached
D/dalvikvm( 1190): threadid=17: thread exiting, not yet detached (count=0)
D/dalvikvm( 1190): threadid=17: thread exiting, not yet detached (count=1)
E/dalvikvm( 1190): threadid=17: native thread exited without detaching
E/dalvikvm( 1190): VM aborting
F/libc ( 1190): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 5617 (Thread-751)
I/DEBUG ( 153): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 153): Build fingerprint: 'nvidia/thor/roth:4.3/JSS15J/01.00.14422_298.5067:user/release-keys'
I/DEBUG ( 153): Revision: '2'
I/DEBUG ( 153): pid: 1190, tid: 5617, name: Thread-751 >>> com.puzzl.yummycircus <<<
@Hasufel
Hasufel / gist:8899634
Created February 9, 2014 14:12
Openfl audio threading crash report Mac OSX
Process: YummyCircus [11032]
Path: /Users/USER/*/YummyCircus.app/Contents/MacOS/./YummyCircus
Identifier: com.puzzl.yummycircus
Version: 0.9.3 (1)
Code Type: X86-64 (Native)
Parent Process: neko [10046]
Responsible: Terminal [422]
User ID: 501
Date/Time: 2014-02-09 14:43:17.521 +0100
@Hasufel
Hasufel / gist:8900530
Created February 9, 2014 15:19
Openfl Android audio NO multithreading crash
E/lime::System( 7449): GetEnv: not attached
D/dalvikvm( 7449): threadid=17: thread exiting, not yet detached (count=0)
D/dalvikvm( 7449): threadid=17: thread exiting, not yet detached (count=1)
E/dalvikvm( 7449): threadid=17: native thread exited without detaching
E/dalvikvm( 7449): VM aborting
F/libc ( 7449): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 13498 (Thread-820)
I/DEBUG ( 153): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 153): Build fingerprint: 'nvidia/thor/roth:4.3/JSS15J/01.00.14422_298.5067:user/release-keys'
I/DEBUG ( 153): Revision: '2'
I/DEBUG ( 153): pid: 7449, tid: 13498, name: Thread-820 >>> com.puzzl.yummycircus <<<
@Hasufel
Hasufel / gist:8905008
Last active August 29, 2015 13:56
Openfl sound multithreading test crash report, Android 4.3 Vanilla (Nvidia Shield)
Simple testcase, crashed after 25 minutes.
Crash report from -debug:
E/lime::System(15213): GetEnv: not attached
E/lime::System(15213): GetEnv: not attached
E/dalvikvm(15213): threadid=17: native thread exited without detaching
E/dalvikvm(15213): VM aborting
F/libc (15213): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 23640 (Thread-928)
E/InputDispatcher( 497): channel '420cd330 com.puzzl.yummycircus/com.puzzl.yummycircus.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
@Hasufel
Hasufel / gist:8918386
Created February 10, 2014 15:57
Openfl multithreading sound crash on Android 4.3 (Nvidia Shield)
I/OpenAL_alSource.c( 1827): Skipping starting source 1604208888 due to lack of CPU time.
I/OpenAL_alSource.c( 1827): Skipping starting source 1604209304 due to lack of CPU time.
I/OpenAL_alSource.c( 1827): Skipping starting source 1604674736 due to lack of CPU time.
I/OpenAL_alSource.c( 1827): Skipping starting source 1604675152 due to lack of CPU time.
I/OpenAL_alSource.c( 1827): Skipping starting source 1606821360 due to lack of CPU time.
I/OpenAL_alSource.c( 1827): Skipping starting source 1606817744 due to lack of CPU time.
I/OpenAL_alSource.c( 1827): Skipping starting source 1606818264 due to lack of CPU time.
I/OpenAL_alSource.c( 1827): Skipping starting source 1606820096 due to lack of CPU time.
I/OpenAL_alSource.c( 1827): Skipping starting source 1636756072 due to lack of CPU time.
E/lime::System( 1827): GetEnv: not attached
@Hasufel
Hasufel / haxeside
Created April 27, 2014 00:30
getting controllers
private function getControllers():Void {
var a = JNI.createStaticMethod ("org.haxe.lime.MainView", "getControllersList", "()Ljava/lang/String;", true);
var b:String = a();
var c:Array<String> = b.split(';');
_controllers = new Array<Array<String>>();
var i:Int = 0;
while(i < c.length) {
if (Std.parseInt(c[i])!=null) {
_controllers.push([c[i], c[i+1]]);
}
@Hasufel
Hasufel / gist:1b0fb9ae83974fb0644e
Created June 11, 2015 12:54
Bouncing squares example
package;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.Event;
import flash.Lib;
class Main extends Sprite {