SapphireSteel Forum

General => Amethyst => Topic started by: Luth on July 30, 2010, 02:12:57 PM



Title: RC1 Bugs/Issues thread
Post by: Luth on July 30, 2010, 02:12:57 PM
There's bound to be one eventually; guess I'm lucky enough to start it.

1) Actually noticed after the 933 build (I think), but hitting F12 on a function doesn't take me to the function definition.  Maybe it's not a bug and I just missed a post explaining how to get this to resume working; it's not the first time functionality has disappeared for me alone.  :)  I'm special like that.  Last time is was extraneous Registry entries; any thoughts this time?

2) With "Auto-complete on }" enabled, typing the following:
Code:
{return 5;}
it is formatted (based on my personal settings, which differ by user, of course) to:
Code:
{return 5; }
The only "mistaken" part is the lack of a space after the '{' character, and the inclusion of the space before the '}'.  They should be consistent, and if I'm allowed a vote, I would prefer a space, rather than none.


Title: Re: RC1 Bugs/Issues thread
Post by: Huw Collingbourne on July 30, 2010, 02:34:49 PM
F12 works for me (though until you mentioned it I hadn't realised that F12 was the keyboard shortcut as I have always used the context menu  ;) ). Is your code syntactically correct at this point? (Errors can cause problems for IntelliSense functionality). If so, does this problem always occur even in a simple one-file project or does it occur only in specific circumstances (maybe across many files and packages. for example?). Can you verify that it also fails to work if you right-click and select 'Go To Definition' from the menu?

As for the formatting thing, that's Dermot's responsibility so I'll pass that one over to him...


Title: Re: RC1 Bugs/Issues thread
Post by: Luth on July 30, 2010, 07:13:12 PM
I came to post that I have had F12 work for me only once, just now, in the past two weeks.  Maybe it's the age-old problem of where something doesn't work until you try to show somebody.  :)  But to answer your questions, Huw:

Quote
Is your code syntactically correct at this point?
Yes.  It fails even on my compiling, executing projects.
Quote
If so, does this problem always occur even in a simple one-file project or does it occur only in specific circumstances (maybe across many files and packages. for example?)
I haven't been paying specific attention to where it's _not_ working, as it hasn't worked at all in the past couple of weeks.  I had assumed (until now) that it just simply didn't work.  I have not tried any single-file projects, however I have tried in three of my small- to large-sized projects with it not working.  When trying to F12 to a function not in the solution, it always fails, but that's expected.  The instance that it is working right now is on static public function.  An instance that is not working right now is accessing a public function via a singleton.  (Maybe that's one level of indirection too far to follow?)  Another instance of not working is a standard public function.  I don't see any specific correlation that presents itself as the obvious answer.
Quote
Can you verify that it also fails to work if you right-click and select 'Go To Definition' from the menu?
Yes, it fails there as well.


Title: Re: RC1 Bugs/Issues thread
Post by: Huw Collingbourne on July 31, 2010, 07:32:47 AM
We need some help locating this problem. We use Go To Definition all the time, across fairly big projects (e.g. the Amethyst Designer) and we've never seen this problem. I am inclined to think there may be something about your projects(s) which is causing this and we need to try to track it down. I'd be grateful if you could do a couple of tests:

1) Create a very simple project from scratch with just a variable or two and a function or two. Does Go To definition work?

2) In a project where it doesn't work, can you monitor the Errors pane (View/Error List). Are there any errors shown?

3) Does Find All References work?

Finally, if you could either tell us what we need to do to duplicate this problem or (best of all!) send us a small project in which the problem occurs that would help us a great deal.


Title: Re: RC1 Bugs/Issues thread
Post by: Autodev on August 01, 2010, 03:06:25 AM
Sorry I may have posted this in the wrong area

It is a Bug?
01-08-2010
Project FlexStub2 Beta Expired!
About
1.0.0.970
Release Candidate 1
Trial - you have 50 days left
Outstanding
Buy now is not supported, more importantly I have no hint of the price to come for Professional, which would help me choose my dev platform!
Issues
I have mountains of code which read
import mx.etc.etc
Assuming I can work around issue 1, 'expired' , how do I reference the mx libraries,  and how do I import my libraries as a lump!
(I would prefer not to have to import each file!)
Finally
great product exactly what I was looking for.

John Clark
Autodev


Title: Re: RC1 Bugs/Issues thread
Post by: Huw Collingbourne on August 01, 2010, 03:41:42 AM
Not sure about the beta expired message. Where did you see this? Are you sure this is an Amethyst message and is not coming from something else? As far as I know we don't produce a message like this...

The software should unlock in Professional mode for 60 days after which it changes to the Personal Edition if no licence is bought. As this is a release candidate the Buy Now links are active even though you still can't buy it!  :( We plan to ship the final software before the end of August and will announce the price a week or two before it ships. If you need some indication of the price before that, please contact me privately.

To import libraries, add them as references. In the Solution Explorer, right-click the References node and select Add Reference. Browse to libraries. Mark off one or a selection. Click Add then OK.

We have a short video explaining some of the features of library support in Amethyst here: http://www.youtube.com/watch?v=Cu_Va49DECs&hd=1

best wishes

Huw


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 01, 2010, 03:56:42 AM
Importing libraries:

As Huw says, use the Add Reference dialog to do this. Note that you can select items then Add, then browse to a different location then Add some more and so on before you click OK. This lets you add a whole lot of libraries in one go.

There's also the standard Visual Studio templating system:

If you have a particular project type which you use over and over again, you can export the template and use that as a model (with all the libraries etc that you want) instead of the templates we provide as standard (Flex 3 project, Flex 4 library, etc).

For VS 2008 see http://msdn.microsoft.com/en-us/library/ms185319%28v=VS.80%29.aspx (http://msdn.microsoft.com/en-us/library/ms185319%28v=VS.80%29.aspx) and http://www.ozgrid.com/forum/showthread.php?t=95677 (http://www.ozgrid.com/forum/showthread.php?t=95677).

I think it's easier in VS2010 (see http://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx (http://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx)), but I've never done this.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: Autodev on August 01, 2010, 04:11:20 AM
background I looked at the product in late 2009(from memory) and installed the version / I uninstalled yesterday and re

installed the new version for appraisal.

Test

File New
Flex 4 Application

Name: FlexApplication2
All settings default

Build
From Error List
FlexApplication2 Unable to bind 's:Application'
FlexApplication2 Beta Expired
FlexApplication2 Compile failed. Exit code was 1

Properties
Selected sdk C:\Program Files\flex_sdk\
Contents of flex_sdk: flex_sdk_4.1.0.16076(renamed)
 
Test 2

File New
Flex 3 Application

Name: FlexApplication3
All settings default

Build
From Error List
FlexApplication3 Beta Expired
FlexApplication3 Compile failed. Exit code was 1

From your reply it hints that the problem may lie in a registry/cookie flag



Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 01, 2010, 05:14:30 AM
It sounds like the old one hasn't altogether gone ...

We did some substantial reworking of the project structure some months ago to allow for side by side (SxS) working for VS 2010 and VS2008. We renamed the products to 'Amethyst 2008' and 'Amethyst 2010' and I suspect that the touble is there somewhere.

The first thing to do is check in the Control panel for anything like 'Amethyst' and uninstall them all. Then rename the directory 'SapphireSteel Software' under program files to 'SapphireSteel Software old' (or something) and try the re-installation of Amethyst 2008 again.

If that doesn't work, we'll have to do some Registry surgery.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: Autodev on August 01, 2010, 08:29:13 AM
Uninstall, re install same issue!

And now to the registry!

Your advice would be welcomed


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 01, 2010, 11:11:56 AM
I'll contact you via e-mail. It's likely to be a bit longwinded.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 01, 2010, 01:59:44 PM
Luth ... on the '{return 5; }'

I dont get the extra space after the ';'  I get no spaces after the '{' and none before the '}' - but I suspect that there's a bug in there somewhere. However, the whole issue is bit more complicated. I've modelled the spacing after the C# options, but I've not implemented all the C# spacing options (there are 26 of them and there's just not enough time!). I've added a task to implement more spacing options in a future release. In particular, I'll add an option to add/remove spacing after '{' and several other parenthesis spacing options similar to C#.

UPDATE: reproduced this - I needed to have 'Leave statements on same line' set. I've made the spacing consistent (i.e. no space) until I can do the further spacing options.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: Luth on August 02, 2010, 01:19:49 PM
Luth ... on the '{return 5; }'

I dont get the extra space after the ';'  I get no spaces after the '{' and none before the '}' - but I suspect that there's a bug in there somewhere. However, the whole issue is bit more complicated. I've modelled the spacing after the C# options, but I've not implemented all the C# spacing options (there are 26 of them and there's just not enough time!). I've added a task to implement more spacing options in a future release. In particular, I'll add an option to add/remove spacing after '{' and several other parenthesis spacing options similar to C#.

UPDATE: reproduced this - I needed to have 'Leave statements on same line' set. I've made the spacing consistent (i.e. no space) until I can do the further spacing options.

Dermot

TA mate.

Huw: I'll try to run those tests for you, but I'm on vacation (yeah, I check here even on holiday...) so they may have to wait until I get back.  From memory, one instance that I remember never working was accessing a class via a singleton getter, eg:
Code:
public class Foo
{
  private static _instance:Foo;

  public static function get instance():Foo { return _instance; }
  public function Foo() { _instance = this; }
  public function bar():void {}
}

Code:
Foo.instance.bar();

F12 on "bar" above would do nothing.  I have to assume, since I can't test, that this will work for a small two-file project as well.


Title: Re: RC1 Bugs/Issues thread
Post by: Luth on August 02, 2010, 01:38:00 PM
Tabs still break code

Here is a replicated section of code from one of my projects:
Code:
if( paramObj )
{
CONFIG::final
{
if( paramObj.hasOwnProperty( "defaultLanguage" ) )
lang = paramObj["defaultLanguage"];

var settings:Array;
if( paramObj.hasOwnProperty( "arcade_new" ) )
I had just typed CONFIG::FINAL and wanted to indent if( paramObj ... defaultLanguage"]; so I selected (and this is pretty critical; though it not need to be exactly this, there are selections that do not cause the bug to occur) the portion of text between the two tildes (~) below:
Code:
i~f( paramObj.hasOwnProperty( "defaultLanguage" ) )
~ lang = paramObj["defaultLanguage"];
and pushed TAB.  It appears to have activated a macro, as the result is this:
Code:
if( paramObj )
{
CONFIG::FINAL
{
if (true){
( paramObj.hasOwnProperty( "defaultLanguage" ) )
;
} lang = paramObj["defaultLanguage"];

var settings:Array;
if( paramObj.hasOwnProperty( "arcade_new" ) )
The kicker is that if UNDO one step, then it returns to what it SHOULD have been, eg:
Code:
if( paramObj )
{
CONFIG::FINAL
{
if( paramObj.hasOwnProperty( "defaultLanguage" ) )
lang = paramObj["defaultLanguage"];

var settings:Array;
if( paramObj.hasOwnProperty( "arcade_new" ) )
and two UNDO steps return to the original code pasted above.  This is a long-running bug, having experienced it with the first version of Amethyst I tried, and hopefully this will help you track it down.


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 02, 2010, 03:21:31 PM
F12:

I've just tried this example and it works for me.

One test to try is to hover over 'bar'. If you get a tooltip then the IntelliSense system has resolved the token and goto should work. If no tooltip then the IntelliSense cant resolve it and F12 wont work.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: Luth on August 02, 2010, 03:36:18 PM
F12:

I've just tried this example and it works for me.

One test to try is to hover over 'bar'. If you get a tooltip then the IntelliSense system has resolved the token and goto should work. If no tooltip then the IntelliSense cant resolve it and F12 wont work.

Dermot

Hm.  Well, then I guess I'll have to do some thorough investigating on my own project and see if I can't find the causing factor.  That sounds like fun.  :)


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 02, 2010, 03:36:28 PM
Tabs:

I can see what's happening. Essentially, the tab is activating the 'if' snippet. I think that the completion system is being activated for some reason and it it interpreting 'i' + TAB as selecting the only available completion item - which in this case is the 'if' snippet. I dont know why this is occurring (I'll do some more investigating tomorrow) but you can stop it happening by selecting Tools |Options |Text Editor | ActionScript | IntelliSense and unchecking 'Expand snippets by tab character'.

Wierd!

UPDATE: fixed this. Like most bugs it's obvious once you see it.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 06, 2010, 06:43:11 AM
We've found a problem with Go To Definition on a property (getter/setter).

This failed (even though the hover test worked) - it's now been fixed.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: san83 on August 10, 2010, 02:37:30 PM
Sorry for bad translation.

Amethyst Release Candidate 1(1.0.0.970). Errors and omissions.
1. Increasing RAM to 500 - 600 MB.
2. With "clean" or "rebuild" the folder launch udolyaet all files *. swf, no matter they are from the project or not.
3. If you "rebuild" of related projects - every time udolyaet all files *. swf.
4. It is not possible to add already created a folder in the project.
5. There is no possibility to configure that package does not read from the current location as the project. SoursePath - changes nothing.
6. When debugging, sometimes situations may arise. When that project in debug mode no longer starts. Only helps
delete the file <project>. suo and restart the studio. It appears this situation is not exactly say.
Maybe when its normal exception and pressing F10 or F11. Ie try to continue the program.

Format:
1. When you create a class "iternal" and attempts to enter a new class not covered by the "import". Automatically connect dobovlyaetsya import this class but usually do not go there.
Code:
package pack.subpack {

public class A {
public function A() {
...
var test:Sprite = new Sprite(); // Auto insert "import flash.display.Sprite;"
var test2:B = new B(); // Auto insert "import pack.subpack.B;"
..
}
}
}

import flash.display.Sprite;
import pack.subpack.B;

internal class B {

public function B() {
}
}


Russian language:
1. Растёт оперативная память до 500 - 600 метров.
2. При "clean" или "rebuild" из папки запуска проекта удоляет все файлы *.swf , не важно относятся они к проекту или нет.
3. При "rebuild" связанных проектов - каждый раз удоляет все файлы *.swf.
4. Нет возможности добавить уже созданную папку в проект.
5. Нет возможности настроить, чтобы пакеты считывались не с текущего каталога, где находиться проект. SoursePath - ничего не меняет.
6. При отладки, иногда могут возникнуть ситуации. При которых проект в отладочном режиме перестаёт запускаться. Помогает только
удоление файла <project>.suo и перезапуск студии. Как появляется данная ситуация точно не могу сказать.
Может быть при сработанном эксепшене, и нажатии F10 или F11. Тоесть попытаться продолжить выполнение программы.

Форматирование:
1. При создании класса iternal и попытки вписать новый класс не прописанный в import. Автоматически добовляеться подключение import данного класса
но как правило не туда.


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 11, 2010, 11:46:26 AM
Thank you for the reports. I have answered each point. If I have not understood you, please tell me.

1) Memory. I think you are talking about the amount of memory used by Visual Studio and Amethyst. 600MB is not unusual. Visual Studio uses a lot of memory in normal use.
For example, Visual Studio 2008/C# uses about 900MB for me when I'm working on the Amethyst code. VS 2010/C# uses about 1200MB for a smaller C# project. I have measured Amethyst memory use when building the Flex 4 Framework (about 1500 files) in Amethyst and this uses about 800MB. But there may be a memory problem somewhere - I have not found it, though.

2) RC2 fixes this.

3) RC2 fixes this (if this is still a problem in RC2, please tell me).

4) Yes - this is a bug. I have fixed it in RC3 (which we will release soon)

5) You can include files as 'links' from outside the project tree. To do this, right click on a folder node in the Solution Explorer, select Add | Existing Item and when you have selected the items you want to add, select the small drop down arrow on the Add button and select 'Add As Link'. This will not copy the file into the project directory, but it will include the file in the project and you will be able to see it in the Solution Explorer. The file icon will have a small arrow indicating that it is a link. You can now use the SourcePath settings to tell the compiler to include that file.

6) Debugger: I haven't seen this before. It looks like the .suo file is getting corrupted. But I do not know where this is happening. I will look out for this situation.

7) I think that you are saying the addition of the 'import pack.subpack.B' is a) not required and b) in the wrong position. Is this what you meant?

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: san83 on August 12, 2010, 01:51:13 AM
Thank you for an answer.

1-7) Yes, you all got it right.


8. The debugger does not stop at a breakpoint. This applies to the loaded swf files.
Example. There is a file test.swf collected through CS4.
Publish Settings. Included options.
  •    Flash Player 10
  •    ActionScript 3.0
  •    Compress movie
  •    Include hidden layers
  •    Include XMP metadata
  •    Protect from import
  •    Permit debugging
In test.swf present symbol of "test_symbol" ClassTest related to the class.
Symbol Properties
  •    Name: test_symbol
  •    Type: MovieClip
  •    Export for ActionScript
  •    Export in frame 1
  •    Class: test_symbol
  •    Base class: pack1.ClassTest

In a project Amethyst load test.swf.
Code:
package pack1 {
...
public class ClassRun extends MovieClip {
protected var m_loader:Loader;
protected var m_applicationDom:ApplicationDomain;

public function ClassRun():void {
super();
m_applicationDom = ApplicationDomain.currentDomain;
m_loader = new Loader();
m_loader.contentLoaderInfo.addEventListener(Event.INIT, onOpen);
m_loader.load(new URLRequest("test.swf"), new LoaderContext(false, m_applicationDom, null));
}
protected function onOpen(e:Event):void {
var xclass:Class=null;
xclass = m_applicationDom.getDefinition("test_symbol") as Class;
var test:MovieClip = new xclass() as MovieClip;
addChild(test);
}
}
}

If you set a breakpoint on a line
Code:
var test:MovieClip = new xclass() as MovieClip;
it will work. Next, if the press F11, then we'll go to the class constructor ClassTest. But if you put a breakpoint in the executable code of the class ClassTest and press F5, it will not work. Moreover, it does not matter whether I went to F11 in ClassTest or not.


Title: Re: RC1 Bugs/Issues thread
Post by: san83 on August 12, 2010, 04:47:12 AM
Breakpoint is triggered, as soon as I changed the line
Code:
var test:MovieClip = new xclass() as MovieClip;
in
Code:
var test:ClassTest = new xclass();



Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 12, 2010, 02:27:59 PM
I cannot reproduce this - it works for me.

my Flash CS4 code is:

Code:
package pack1 {

import flash.display.MovieClip;

public class ClassTest extends MovieClip{
public function ClassTest() {
var a:Number;

a = 1;
super();
trace("hello");
trace(' ');
trace("world");
trace("a = ")
trace(a.toString());
}
}
}

and my Amethyst code is (using your example):

Code:
package pack1 {

import flash.display.*;
import flash.events.Event;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;
import flash.system.LoaderContext;

public class ActionScriptApplication3 extends MovieClip {

protected var m_loader:Loader;
protected var m_applicationDom:ApplicationDomain;

public function ActionScriptApplication3() {
super();
m_applicationDom = ApplicationDomain.currentDomain;
m_loader = new Loader();
m_loader.contentLoaderInfo.addEventListener(Event.INIT, onOpen);
m_loader.load(new URLRequest("test.swf"), new LoaderContext(false, m_applicationDom, null));
}

protected function onOpen(e:Event):void {
var xclass:Class = null;
xclass = m_applicationDom.getDefinition("test_symbol") as Class;
var test:MovieClip = new xclass() as MovieClip;
addChild(test);
}
}
}


I set a breakpoint on
Code:
var test:MovieClip = new xclass() as MovieClip;
and step into the Flash code using F11. I can then see the ClassTest.as code. I then set a break point on
Code:
trace(a.toString());

and press F5. The breakpoint fires correctly.

Also, if I now Restart, the breakpoint fires when the class is loaded as the call stack shows:

Code:
pack1::ClassTest at line 15 in file F:\Data\Test\FlashAIRApplication\pack1\ClassTest.as
  test_symbol in file F:\Data\Test\FlashAIRApplication\pack1\ClassTest.as
  flash.display::Sprite/constructChildren
  flash.display::Sprite
  flash.display::MovieClip
  Test in file F:\Data\Test\FlashAIRApplication\pack1\ClassTest.as


I continue and the breakpoint

Code:
var test:MovieClip = new xclass() as MovieClip;

fires. I continue again and the breakpoint that I set in ClassTest.as fires again. So it all seems correct to me.

Are you sure that the Flash SWF file is up to date with the source code? The debugger sets breakpoints on file names and line numbers only - it does not look at classes or anything else. When you step into the ClassTest code, the debugger will load the latest source code - not the one that was used to compile the SWF. So if there is a mismatch between what was compiled and what currently exists, there might be a problem.

Also, there was a problem with loading SWF files in the version before RC1. I fixed this in RC1 so it should work.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 12, 2010, 02:45:08 PM
I've just had another idea ...

I think you may be using two different versions of the ClassTest code. I tested with the ClassTest built in a completely separate Flash CS4 project with no link to Amethyst at all, so that when I use your second example:

Code:
var test:ClassTest = new xclass() as ClassTest;

my application will not compile because it does not know about 'ClassTest'. As I said above, the debugger uses file names and line numbers to identify breakpoints and if these do not match, then the breakpoint will not fire.

Dermot


Title: Re: RC1 Bugs/Issues thread
Post by: san83 on August 13, 2010, 01:33:31 AM
Indeed, after the "clean" and "build" of all projects. Breakpoints were triggered.
I basically did publish test.swf. And in Amethyst project did only "build".
In addition ClassTest uses components ProgressBar, Button. That led to an error at run time, if I used a line of type:
var param:ClassTest = ...
It was decided to connect to Amethyst project ProgressBar.swc and Button.swc files.
In addition to this time I switched to RC2.
I had to carefully check everything. Sorry for your time.


Title: Re: RC1 Bugs/Issues thread
Post by: Dermot on August 14, 2010, 02:05:03 PM
I've fixed the incorrect add import now. The fixed version will be in RC3.

Dermot