• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Shiraz · Sep 29, 2010 at 03:02 AM · exception

Upgraded to Unity3 - receiving VerificationException - Binary instruction applyed to ill formed stack - Help!

For the life of me, I can't figure out why I'm receiving this runtime exception. I've just upgraded to Unity3 Pro from 2.6 on the Mac and am porting over our game to Unity v3 and are receiving this runtime exception:

VerificationException: Error verifying GameScript:SetGameState (eGameState): Binary instruction applyed to ill formed stack (Complex x Complex)
GameScript.Start () (at Assets/Scripts/GameScript.js:100)

The problem is related to one of our game files.

We declare at the top of the file an enum called eGameState.

enum eGameState { Start=0, LevelComplete=1, LevelStart=2, Playing=3, GameOver=4, LoadMainMenu= 5, Restart = 6 };

var gGameState : eGameState = eGameState.Start;

We have a function called SetGameState defined as follows:

function SetGameState( theState:eGameState ) { var oldGameState:eGameState;

oldGameState= gGameState;

// update game state to new one gGameState= theState;

.. more code...

}

We call SetGameState() function from this file and other files as follows..

function Start() { // code...

SetGameState( eGameState.LevelStart );

}

Everything compiles fine.. when running receive this runtime exception What the heck are we doing wrong (or what has changed in Unity3 to cause this to be a problem?

VerificationException: Error verifying GameScript:SetGameState (eGameState): Binary instruction applyed to ill formed stack (Complex x Complex) GameScript.Start () (at Assets/Scripts/GameScript.js:100)

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Shiraz · Oct 02, 2010 at 06:35 PM

Turns out that references to some of my prefabs when imported into Unity3d v3 (from my 2.6 project) were set to null. When the code referenced/tried instantiating the objects at runtime - it threw the ambiguous exception above that was referencing the wrong section/line of code entirely -making it difficult to identify the real problem.

I have since put in checks to make sure my prefab's aren't NULL (should have done that in the beginning). Anyways' this was a difficult to figure out.. but well.. it's working again.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Lucas Meijer 1 · Oct 02, 2010 at 09:10 PM

Hey Shiraz,

This error is not related to your prefab problem (allthough fixing your prefab problem might make this bug go away). This looks like a legit bug in Unity3 that I would love to fix. Could you send the project that makes this happen in a bugreport, and mention the casenumber here? (UnityMenu->Help->Report a problem). Thanks a lot!, Lucas

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Matt 11 · Dec 14, 2010 at 08:16 PM 0
Share

hey, i'm also getting a similar exception, but my issue seems to be more related to this thread post: http://forum.unity3d.com/threads/60589-VerificationException is there any timeframe for a fix to this bug?

specifically i get this exception when switching between standalone player and webplayer builds.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

NullReferenceException help 1 Answer

IgnoreCollisions Exception 2 Answers

Missing Component Exception Error 3 Answers

NullReferenceException Object reference error 1 Answer

Unassigned Reference Exception error? 4 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges