Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[INVESTIGATING] new BitmapData(100, 100); crashes application

25 REPLIES 25
Reply
Message 1 of 26
Anonymous
1532 Views, 25 Replies

[INVESTIGATING] new BitmapData(100, 100); crashes application

Pretty much as the title says - I boiled my code down to a single line and it causes: Unity editor to crash; Android app to hang at Unity logo.

Here's all I'm doing to recreate this issue...

new BitmapData(100, 100);


Here are my details...

Scaleform 4.1 for Android (Licensed) - AS4UA_2013_Patch4
Mac OSX 10.7.5
Unity 3.5.5f3
Samsung Galaxy SII (GT-I9100)
Android 2.3.4

Thanks for your help - and keep up the good work! 😉
25 REPLIES 25
Message 2 of 26
MatthewDoyleArt
in reply to: Anonymous

Can you provide a simple test case that I can try out to determine if this is specifically a Scaleform bug or not? Also, I assume you're doing this in ActionScript 3?

Matthew Doyle
Technical Marketing Manager

-----------------------------

Area Blog: Game Dev Blog
Watch me on Youtube: Youtube.com/MatthewDoyleArt
Check out some of my work at: MatthewDoyle.com
Message 3 of 26
Anonymous
in reply to: Anonymous

I have the same problem.

Unity Crashes when using BitmapData.
I couldn't stop unity editor.

----------------------------------------------

What version of the Scaleform SDK are you using?
Autodesk_Scaleform_4.1_for_Unity3.5_2013_EJKSCTC_Win_32bit_Patch_4.exe

Do you have the latest patch installed?
yes

What is your development platform? Windows or Mac? OS version? 64 or 32 bit?
windows7 64bit

What version of Unity are you on? (Note: Scaleform only support Unity Pro)
unity4.0(Pro) and unity 3.5.6(Pro)

What platform are you developing for? PC? Android? iOS?
PC

What hardware are you using and testing on?
core i7-2600K
16GB RAM
Radeon HD6800 Series

Can you provide sample files that illustrate your bug/issue?
sample files included.

sample_5.zip

Message 4 of 26
Anonymous
in reply to: Anonymous

I have similar concerns about the Unity implementation of bitmapData. Is it actually working in Scaleform for Unity, now? What's the status? Thanks!

M
Message 5 of 26
Anonymous
in reply to: Anonymous

I'm seeing the same thing as others who have posted.

We had hoped to bring our flash game over to Unity but our game uses bitmapdata all over the place.

Initially Unity would hang on the call to "new BitmapData(width, height, true, 0x000000);" but on a later tests, it did not hang. However, it still always hangs on the line "bitmapData.copyPixels(bitMapData, sourceRect, destPoint);" whereas the game runs fine (albeit without graphics) if that line is commented out.

The same game code actually runs (with bitmapdata and visible graphics) in the PC GFxPlayer, but our goal here is to run inside Unity.

As a simple test, I used the sample test code someone put up in these forums to draw a 100x100 blue rectangle on the screen in actionscript. Unity hangs on that test.swf file as well (and all it does is fill a rect with a color). When I comment out the bitmapdata code, Unity runs fine (but of course no blue rectangle is seen).

We tested the Scaleform 4.1 Unity 3.5 integration in both Unity 4.0 and Unity 3.5 (Pro Trial versions) and got the same results -- always hangs if this line is active, always runs if this line is commented out.

Bug report info:
SDK: Scaleform 1.4 for Unity 3.5 integration
Patch: Patch? I'm not aware of any patch
OS: Windows 7 64-bit
Unity: Pro Trial (tried on both 3.5 and 4.0)
Testing platform: PC (tried in DirectX first, then after reading posts about it, switch dll to OpenGL version and forced Unity into openGL mode)
Crash log: Since this is a hang, there is no useful information in the editor.log (nothing is written out because it is not a real crash, just Unity forever stuck in a loop -- has to be terminated in Task Manager)

It seems clear to us that Scaleform 4.1 integration for Unity 3.5 does not support bitmapdata, which is unfortunate (for us). Still, we would be interested in the future if this support is ever provided. I will check back on the forum so please post if this feature is available (and I'm just doing something wrong) or if there is a plan for adding this feature with an estimate for release.
Message 6 of 26
jpratliff
in reply to: Anonymous

We've been able to reproduce the issue with notoya's sample file and are actively investigating a fix for this issue.

We'll post back once we have a solution.

Thanks,

-JP
Message 7 of 26
UgurIster
in reply to: Anonymous

Is there any update on an ETA for an update with a fix for this? Basically anything using BitmapData isn't working in scaleform unity right now for us and well, that means a lot of what we do in flash.
It would be great to know if/when there will be a fix for this and whether that would be for a unity 3.5.x version or 4.x or both.
Message 8 of 26
Anonymous
in reply to: Anonymous

Is there any update on an ETA for an update with a fix for this? Basically anything using BitmapData isn't working in scaleform unity right now for us and well, that means a lot of what we do in flash.
It would be great to know if/when there will be a fix for this and whether that would be for a unity 3.5.x version or 4.x or both.


Hi all, this issue is also affecting my team as well.
We are heavily relying on BitmapData on our code.

Is there any ETA for a fix or a workaround perhaps?

TIA.
Message 9 of 26
MatthewDoyleArt
in reply to: Anonymous

We are still investigating this issue, and do not have an ETA yet.

Matthew Doyle
Technical Marketing Manager

-----------------------------

Area Blog: Game Dev Blog
Watch me on Youtube: Youtube.com/MatthewDoyleArt
Check out some of my work at: MatthewDoyle.com
Message 10 of 26
Anonymous
in reply to: MatthewDoyleArt

Same problem here but now in Scaleform 4.2 Licensed. 😞
Runs fine in GFXMediaPlayer, but in Unity Editor I can enter Play mode only once. If I try to do it again - Unity crashes.
Seems like Scaleform runtime is never destroyed (can't finalize created BitmapData objects on destroy?).

And also, using var "bmp:BitmapData = someRefBitmapData.clone();" is causing Unity Editor to go into an infinite loop when I hit Play at the first time.

I know that you are working on this, guys, but... It's Scaleform 4.2 already. Will it be fixed anytime soon? Because it's a real show-stopper for me.

SDK: Autodesk_Scaleform_4.2_for_Unity_2014_EJKSCTC_Win_32bit.exe
OS: Windows 7 64-bit
Unity: Unity 4.1.5f1 Pro Licensed
Platform: PC (tried DX only)
Hardware: Intel Core i5 750 @ 2.67 GHz, 12 Gb RAM, NVidia GeForce GTX 470
Crash log: nothing useful here because it's a Unity Editor crash

 

Please let me know if you need any samples from me.

Thanks.

Message 11 of 26
Anonymous
in reply to: Anonymous

Update: Even provided ImageSlicer demo from samples doesn't work in Unity also because of this problems.

Message 12 of 26
Anonymous
in reply to: MatthewDoyleArt

MatthewDoyleArt, Any updates on that?

Currently I just can't develop anything that will work in Unity because of this problem. Smiley Sad

Will this be fixed in the upcoming update?

Message 13 of 26
AD_ADeCastro
in reply to: Anonymous

Hello,

 

Unfortunately Unity will not support BitmapData in the next update. This is an issue within the Unity core, and we are actively working with Unity engineers to fix this, but we can't really tell when this will be solved.

 

I'm sorry this is causing you trouble.

 

Kind regards,

Angela De Castro

Message 14 of 26
Anonymous
in reply to: AD_ADeCastro

Hello, Angela!

 

Thanks for the information!

Will be waiting for this.

Please keep us informed!

Message 15 of 26
AD_ADeCastro
in reply to: Anonymous

Hello,

 

Just to update everybody, we have a promising fix in the works for the BitmapData issue. We'll have an announcement once the update is available.

 

Thank you for your patience while we continue to work on resolving this issue.

 

Kind regards,

Angela

Message 16 of 26
Anonymous
in reply to: AD_ADeCastro

Thats a good news!

Unfortunately, we are near the release and we have big problems with images loading in flash/scaleform. Do you have any eta for the fix/update?

Kind regards
Message 17 of 26
slice3d
in reply to: AD_ADeCastro

Bump!

Message 18 of 26
Anonymous
in reply to: Anonymous

Bumb

 

I found that when running on windows i am able to draw a bitmap copy.

but the same code on mac crashes unity, when i run it the second time.

I am on win7, 64bit unity 4.2.0f4. 

 

var bmpData:BitmapData = new BitmapData(mc.width, mc.height, true, 0x00000000);
bmpData.draw (mc);
var bmp:Bitmap = new Bitmap(bmpData);

 

Message 19 of 26
Immudelki
in reply to: AD_ADeCastro

Hi, little up.

I was wondering, Is it still in works ? (and, is this update gonna be available more in the next months or will we have to wait more like half a year...?)

 

 As you know, bitmapdata are a huge part of AS3. And not being able to use it is pretty discouraging. 😕

 

Thanks.

Message 20 of 26
slice3d
in reply to: AD_ADeCastro

Hey, 

 

I've noticed that using BitmapData in recently released December SDK no longer crashes the Unity Editor (I can Start and Stop Play mode multiple times now). Big thanks for the fix! Smiley Happy

I think you should write a line about that in a release notes, because it was a huge problem for me and maybe others.

...And also, fixing this problem took more than a year! Wow!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report