Code Monkey home page Code Monkey logo

adobe-scout's People

Contributors

ajwfrost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

adobe-scout's Issues

Sending ByteArray from Worker cause Adobe Scout show incorrect memory consumption

Problem Description

Sending ByteArray from Worker to main thread cause Adobe Scout show incorrect memory consumption.
Adobe Scout shows enormous memory allocations but actually it fake - Task Manager and other tools show that all fine, memory didn't increase.
This issue cause that we cannot profile and debug properly our applications that uses Workers.

It has been tested with multiple AIR versions (even with latest AIR 33.1.1.190), with different Windows, Android, iOS and macOS devices with different OS versions and latest Scout 1.1.3.354121.
Same problem in all cases.

AIR tracker issue: airsdk/Adobe-Runtime-Support#402
Related issue (not the same): airsdk/Adobe-Runtime-Support#347

Steps to Reproduce

Launch code below. It just start Worker that send to main thread big (just to see it clearly) ByteArray every second.
You should use Adobe Scout with enabled "Start sessions for ActionScript Workers" to see what happening:
image

Application example with sources and Scout .flm files attached.
scout_memory_bug.zip

package {
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.system.MessageChannel;
	import flash.system.Worker;
	import flash.system.WorkerDomain;
	import flash.utils.ByteArray;
	import flash.utils.setInterval;
	
	public class ScoutMemoryBug extends Sprite {
		private var toWorkerChannel:MessageChannel;
		private var fromWorkerChannel:MessageChannel;
		
		public function ScoutMemoryBug() {
			if (Worker.current.isPrimordial) {
				trace("start main");
				addEventListener(Event.ADDED_TO_STAGE, addedToStage);
			} else {
				startTimer();
			}
		}
		
		private function startTimer():void {
			trace("start worker");
			const worker:Worker = Worker.current;
			
			toWorkerChannel = worker.getSharedProperty("from");
			fromWorkerChannel = worker.getSharedProperty("to");
			
			setInterval(function():void {
				trace("send message");
				const byteArray:ByteArray = new ByteArray();
				for (var i:uint = 0; i < 10000000; i++){
					byteArray.writeFloat(100);
				}
				
				toWorkerChannel.send(byteArray);
				byteArray.clear();
				byteArray.length = 0;
			}, 1000);
		}
		
		private function addedToStage(e:Event):void {
			removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
			
			const worker:Worker = WorkerDomain.current.createWorker(loaderInfo.bytes, true);
			
			toWorkerChannel = Worker.current.createMessageChannel(worker);
			fromWorkerChannel = worker.createMessageChannel(Worker.current);
			
			worker.setSharedProperty("to", toWorkerChannel);
			worker.setSharedProperty("from", fromWorkerChannel);
			
			fromWorkerChannel.addEventListener(Event.CHANNEL_MESSAGE, fromWorkerChannel_channelMessage);
			
			if (worker != Worker.current) {
				worker.start();
			} else {
				startTimer();
			}
		}
		
		private function fromWorkerChannel_channelMessage(e:Event):void {
			trace("receive message");
			
			const messageChannel:MessageChannel = e.currentTarget as MessageChannel;
			const byteArray:ByteArray = messageChannel.receive() as ByteArray;
			
			trace("bytes:", byteArray.length);
			
			byteArray.clear();
			byteArray.length = 0;
		}
	}
}

Actual Result:
In Adobe Scout (for both: main thread and Worker) you will see enormous memory consumption by "ByteArrays" and "Other". About 7-8 GB RAM after 1 minute. But via Task Manager (or any other similar tools) you can see that there is no any memory leaks - application consumes stable ~130 MB RAM (for Windows device).
image

Expected Result:
Adobe Scout show non memory leaks because all ByteArrays cleared after sending/receiving.

Known Workarounds

none

[Feature Request] Scout Linux support

Feature Description

With AIR Linux support return also Scout should be available for Linux too.
Its hard to test AIR applications for Linux without Scout in many cases.

Known Workarounds

Use .telemetry.cfg file in Linux home directory and "redirect" logs output to another Windows/macOS machine with Scout.

Scout real-time trace support

As a wish for the future, I would love to be able to use Scout to read real-time trace actions: ATM the only way is by selecting the entire timeline, but each new trace entry, makes trace content scroll back to the top so it is basically useless.

I am resorting to a hidden WebView that routes trace messages to https://console.re/, at least I can see live in browser all debug messages also on client debug releases.

(from airsdk/Adobe-Runtime-Support#2001 (comment))

Scout is no longer available for download on macOS.

An Adobe agent told me that the app is no longer supported and is not available for download.

As you know, this is an essential app for Air development, so I'd appreciate it if you could provide a link to download it or create a new one.

Thanks.

[iOS][tvOS] Scout shows incorrect device screen size

Problem Description

Adobe Scout shows incorrect device screen size when launch AIR application for telemetry collection with iOS and tvOS devices.
Don't know if this Scout or AIR problem.

It has been tested with Scout 1.1.3 with multiple AIR versions, even with latest 33.1.1.889 with many different iOS devices with different OS versions. Also tested with Apple TV 4K A1842 with tvOS 13.3.
Same problem in all cases.

AIR tracker issue: airsdk/Adobe-Runtime-Support#264

Steps to Reproduce

Launch desktop Scout with Windows devices and launch any AIR application with iOS (with configured Scout on iOS device) or tvOS device (with embedded .telemetry.cfg file).

Actual Result:
Scout shows 0x0 device Screen size.
image

Expected Result:
Scout shows real device screen size.

Known Workarounds

Use trace to output to Scout real screen resolution of device (using Stage, Screen or Capabilities properties).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.