iOS

Stimulsoft Reports.Flex discussion
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: iOS

Post by hugo »

Hello Vladimir,

I just tested with iOS TestFlight and unfortunately the same result.
As soon I run the report code and crash with the release build !

It's excused to log to a file from the current source code, because the source code version available is always based on the last final version.
I already did this before and it's where I already mentioned.
If you want, you can send me the last source code (from this report release build) to my e-mail and I can do another test putting log to file in every place to confirm if now crash some here else or is still using * or for some another reason !


Best regards,
Hugo.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: iOS

Post by Vladimir »

Hello Hugo,

We have sent you the latest source code for testing.

Thank you.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: iOS

Post by hugo »

Thank you,

I will do my log work debugging on my side and back to you when I get more results that can workaround this issue.
With Report.JS on my sights, hopefully in a near future can able to replace the Flex to Mobile!

Regards,
Hugo.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: iOS

Post by Vladimir »

Hello Hugo,

We will wait for an answer from you.

Thank you.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: iOS

Post by hugo »

Hello Vladimir,

Thank you for sharing the last version of the source code.
I did several tests and found the issue and a workaround!

The method clone invokes the method memberwiseClone (this one overrides the super class).
You already replaced * for Object, however still crash immediately on the same place (I put a log to file in surrounding every line of code !!!).

Then I just added a new method called thisMemberwiseClone with the same code of the method memberwiseClone and the clone invokes directly the new method thisMemberwiseClone instead of memberwiseClone.

After this change, I can successful export to all Report.Fx supported formats on iPad 3, however I could only see "demo" stamped but still the engine worked !

Conclusion: There is a very, very specific issue with AIR after publish to Apple Store (only on this scenario) and only with methods that override and are invoked by other methods (at least on the same class).

I also tried to use this.memberwiseClone but even this does not work. There is same mistake and probably AIR is using the super method from the stack !

This workaround is probably the only solution by now and is simple to implement.

Example for class StiService.as

Current version:

/** Creates a new object that is a copy of the current instance. */
public function clone(...args): Object
{
var o:Object = memberwiseClone();
return o;
}

/** Creates a shallow copy of the current Collection. */
public override function memberwiseClone(): Object
{
var object: Object = super.memberwiseClone();
object._properties = _properties;
return object;
}

Workaround (I also did this with many other files with exactly the same 2 methods):

/** Creates a new object that is a copy of the current instance. */
public function clone(...args): Object
{
var o:Object = thisMemberwiseClone();
return o;
}

public function thisMemberwiseClone(): Object
{
var object: Object = super.memberwiseClone();
object._properties = _properties;
return object;
}

/** Creates a shallow copy of the current Collection. */
public override function memberwiseClone(): Object
{
var object: Object = super.memberwiseClone();
object._properties = _properties;
return object;
}

Can you apply the workaround and send me a zip file for testing purpose before have to wait for the next build ?

Kind regards,
Hugo.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: iOS

Post by Vladimir »

Hello Hugo,

Please can you check the following solution?


/** Creates a new object that is a copy of the current instance. */
public function clone(...args): Object
{
var o:Object = this.memberwiseClone();
return o;
}

/** Creates a shallow copy of the current Collection. */
public override function memberwiseClone(): Object
{
var object: Object = super.memberwiseClone();
object._properties = _properties;
return object;
}

or, if this does not help, try the following:

Add the clone() and memberwiseClone() override methods to every child of StiService class.

Thank you.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: iOS

Post by hugo »

Hello Vladimir,

this.memberwiseClone(); was my first approach as soon I saw the issue because would be the best practice to apply a workaround but unfortunately didn't solved the issue, that's way I suggest a new method thisMemberwiseClone, avoiding overriding that seems that is the center of the issue with AIR iOS release mode.

"Add the clone() and memberwiseClone() override methods to every child of StiService class."
Do you mean search for every class that extends StiService and add a override for those two methods calling the super class methods like this ?

public class xxx extends StiService
{
...
public override function clone(...args): Object
{
return super.clone(args);
}

public override function memberwiseClone(): Object
{
return super.memberwiseClone();
}
...
}


Thank you,
Hugo.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: iOS

Post by Vladimir »

Hello Hugo,

We sent a reply to your email in the support ticket system.

Thank you.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: iOS

Post by hugo »

Thank you Vladimir.

I already replied there so we can continue the discussions there.
Andrew
Posts: 4107
Joined: Fri Jun 09, 2006 3:58 am

Re: iOS

Post by Andrew »

Ok, Hugo.
Locked