Recently upgraded to the AIR 3.1 SDK and have run into a show stopping issue regarding InvokeEvent on mobile devices. The application is dispatching a new InvokeEvent each and every time you change orientation on the device. And it isn't clearing the "queuedEvents" array. Worst of all, the new event it dispatches each time is a clone of the last one recieved. In the case of our application, this would be parameters that tell the application to load certain data. So each time you change orientation, the application re-triggers that load sequence, causing lots of undersirable behavior.
The code is pretty simple to test out:
protected function preinitializeHandler(event:FlexEvent):void
{
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);
}
protected function onInvoke(event:InvokeEvent):void
{
trace(event.toString());
}
Now each time you change orientation you will see the trace statement and the event.target.queuedEvents collection continues to grow while never clearing any of the previously caught events out.
Rolling back to AIR 3.0 fixes this behavior. And I've been able to demonstrate that in two separate projects.
I'd love to hear of a fix or work around so we can release using 3.1, but either way, I thought I'd make others aware of this issue as I haven't been able to find anything about it through my searching.
For additional details on hardware: This doesn't occur in emulator or my LG Slate, but it does happen every time on both of our Xooms and our Samsung Galaxy Tab. It doesn't appear to be an issue with iOS.
UPDATE: Just updated to the 3.2 release candidate (3.2.0.2060) and the problem remains. Our software wont be able to update past 3.0 for the foreseeable future, which means we can't upgrade to Flex 4.6 SDK either, not without removing a significant feature of our application. This doesn't inspire us to the future of AIR in our company.
There are a few solutions and work around we might be able to employ to fix our specific feature, but there is still a concern over the effects of having an ever ballooning invoke queue that never clears. That could have additional issues over extended use of the application.
UPDATE 2: I put more details in the Adobe forum post. http://forums.adobe.com/message/4278518
Eric Jensen
Related
So this is a new type of issue I am currently facing, Recently I ran an APK of React Native Application I recently built on my system. After running that APK successfully. I started facing some issues regarding my phone's ** sound key **.
I tried restarting the device [Samsung], So it stopped showing the 1st issue. But after a few days a 2nd issue arrives.
1st issue => The volume up button stops working manually and starts increasing the volume automatically.
2n issue => Now whenever I write a new Text Message to someone it automatically starts increasing the font size of the text.
I gave a reboot to the device and even formated it, but nothing helped.
I want to know if it's a software side issue or hardware? So that before submitting the device to a Samsung store, If it's a software issue and if I can fix it. It will save me some bucks.
I actually solved this issue and that was due to the Hardware issue that has happened to my Android Samsung device and I researched it.
This type of issue was very common with users having that old version of smartphones and that is why new design keys for power and volume were introduced in most of the new smartphones which were launched in later 2016. This has actually reduced the key issues and if in case there is an issue, now it is easier to fix it since the keys are separated from the board as it was used to be earlier.
Also, some useful sources if someone is facing a similar issue in their old version android devices.
Volume Slider.
Volume button not working
While researching this I was writing an answer to IntelliJ IDEA: Breakpoint not being hit, and is shown without the tick, just a red dot until I realised it is a completely different question. I have had this issue twice in the past 4 weeks, but my use-case is IntelliJ is no longer ticking the red breakpoints. I just watched the ticks fall away before my eyes.
First time it occurred was after unceremoniously ripping out the USB cable in a hurry. I don't appreciate the need for ceremony here. That broken project remains so.
I tried everything to fix it, and gave up on that particular project; it was largely complete. I tried adb kill-server and the general family of off-then-on-again solutions to no avail.
Fast forward a couple of weeks I'd forgotten about it and was delighted (I tell a lie, I was taking it for granted) to be able to test my new protocol with breakpoints on an Android device. First symptom was my icons messing up (I thought I must have had a trapped thread somewhere in the IDE but find it hard to believe I wouldn't have noticed that with just the single process being debugged). Next the breakpoint's tick just dissappeared and I had a blue message in the IDE's console, something about GDX and taking too long with the graphics (similar message appended at bottom of post). Foolishly I restarted the apk.
What haven't I tried? I'm thinking something drastic like persevering with Desktop only development, or ditching Windows. I thought about upgrading (contracting) Gradle but my other project was brand spanking new and recently diagnosed with specific Gradle version dependencies.
I can start the app from my dev machine but even pausing isn't able to find what it is doing because it will pick a (random) thread out of context with my app.
I can also hit breakpoints from the Desktop app
I suppose I should try Android Studio with this project but know that won't be an easy fix. I'm using Win10 Pro and on brand laptop and phone (nothing fancy mind). I'm using Gradle 2.1 (IIRC, I get a daily nag to upgrade to 4.1) but my other similarly fated project has specific dependencies on Gradle versions so I want to leave well enough alone.
I don't know if it's the answer or not, but it seems to work fine with the emulator, which would seem a more universal solution than something as challenging as, you know, supporting a bunch of different hardware. I ran it again and trapped a certain line, observed the same screen artifacts as before, but killed it before I could lose my emulator too.
This is the last thing she printed:
W/zygote: Long monitor contention with owner GLThread 260 (8155) at boolean com.mygame.game.screens.Menu$4.keyDown(int)(Menu.java:128) waiters=0 in boolean com.badlogic.gdx.backends.android.AndroidInput.onKey(android.view.View, int, android.view.KeyEvent) for 9.799s
It was trapped in a different method but the gist of it is I've blocked the GLThread.
my first android game it's almost done, and I'm on the way to publish it on the play store.
Today I tested it on some friends phone and it worked on all except for a samung a5. On this phone the meshes flicker, apper and disapper and look deformed. This when playing game where I use a lot of frame buffer, in the main menu where there is a simpler animation everything look right.
The game is developed with libGdx and use some custom shader. I've tested it on 8 other different device without no issue (excepect for low frame rate on samsung galaxy tab s4).
I ask yours advise:
1) what should I start to check to find the problem with a5?
2) do you think I should delay the publication until the bug it's solved ora I should publish it excluding A5 ( or maybe all devices with similar GPU) from compatibility list?
My big problem is that at the moment I don't have the device with me (it's the personal phone of a friend of mine...) and probably I will have it for only a limited amount of time, so I want to be preparated to avoid to lock the device for too much time to my friend.
Thanks to all!
First, I'd make sure you don't have any OpenGL errors - add calls to glGetError and validate frame buffers and shader programs, you can do this without the device and adding extra asserts like this is always worthwhile (assuming you don't already have them). Next, try using the tools provided by the GPU manufacturer. In your case the snapdragon profiler. To minimize the time you'll be using your friends device, get the tools installed ahead of time and if you have access to another Qualcomm device, then use that to familiarize yourself with the software. With luck the cause of problem might become immediately obvious. If not, then it's just a binary search of disabling parts of your code until you narrow it down to a particular shader/draw call, then examine/tweak that to figure out what bit is going wrong.
That's a tough call. If it's a driver bug, then it might only occur on particular revisions. Some A5 devices might work if they're on different versions of Android from your friends device. That said, the A5 is relatively recent and Samsung/Qualcomm drivers tend to be pretty solid IME, so it's more likely an error in your code that happens to only be exposed on certain devices. Personally I would delay release unless your release strategy is timing sensitive, from the limited data you have, your game doesn't work on >10% of devices.
All was well until very recently when I noticed that debugging has become very slow. I do not recall any drastic changes that would cause this.
UI Navigation has a noticeable lag and network operations take forever. This is somewhat remedied if I reboot the phone and restart Android Studio/ADB.
App behaves fine when running in normal mode.
I'm using Dalvik runtime, on Android 4.4.2. I have not used ART.
Any advice on how to address this?
Check your breakpoints in Debug bookmark (button "View Breakpoints"), if there are many breakpoints which you forgot delete in the past this may slow you debugger. In my case deleting all breakpoints fix the problem.
I had such an experience before and it was due to a custom library that I had attached to my project, I still don't know how these two were related but after removing the library it worked like a charm.
See what has been added to your project recently, maybe it help you too.
Ever since updating to the latest ADT (version 18), I've noticed that there seems to be some sort of odd lag between what's happening on device emulators and what various tools are seeing. For instance, if I set a breakpoint in Eclipse and then attach the debugger to a running app, the debugger will miss the first time that the breakpoint is reached, breaking only on subsequent executions. Similarly, if I try to take a screen snapshot with the Devices view, the image is always from one or two screen changes back. Similar behavior happens if I run hierarchyviewer outside of Eclipse, so I don't think it's an Eclipse problem specifically.
I should mention that the part of the app that I've tested this with has static screens that change only on user input (that is, no animations or background threads); so it's not just a communication lag. I can change screens, wait five minutes, take a screen snapshot, and still get an image of what had previously been on the screen. Screen snapshots in perticular never seem to catch up. (Repeating the snapshot still generates the previous screen, not the one on display.)
Has anyone else seen this behavior? Does anyone know how to fix it?
UPDATE: This is on a Windows 7 machine running Java 1.6.0_26 and Eclipse 3.7 (Indigo).
The Google/Android team have been enhancing the emulator images with the ADT updates like GPU support and sensor injection. If you are using old emulator builds (AVDs) from when you first created your work environment (say months ago) you will want to recreate them fresh from the new tools and see if the problem resolves.