Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Epixam · Oct 27, 2012 at 02:58 PM · androiderror

Android Segmentation Fault Issue (Signal 11)

Hey guys,

I'm having a new fun issue and im not really that sure what is the cause of it. Im beginning to think that it is a bug within the unity environment but perhaps it is an error on my part. It's a segmentation fault on some devies (but not all devices) when I load a seemingly simple level. The code to load the level is trivial

             if(GUI.Button(Rect(2*width/4-width/5,8.5*height/10,2*width/5,height/8.5),"Settings"))
                 Application.LoadLevel("settings");

At this point the settings level is loaded. This level quite literally has two objects, the camera and an empty game object called "SettingsBehavior". The game object holds the following script (Once again a very simple script)

 #pragma strict
 
 var width : int;
 var height : int;
 var selGridInt : int = 0;
 var selStrings : String[] = ["Easy", "Medium", "Hard", "Seriously?"];
 var skin : GUISkin;
 
 function Start () {
     width = Screen.width;
     height = Screen.height;
     selGridInt = PlayerPrefs.GetInt("difficulty");
 
 }
 
 function OnGUI(){
 
     GUI.skin = skin;
     GUI.Box(Rect (width/20, height/6, 18*width/20, height/5 + height/5-height/6 + 10), "Difficulty");
 
     selGridInt = GUI.SelectionGrid (Rect (width/20, height/5, 18*width/20, 1*height/5), selGridInt, selStrings, 2);
     
     if(GUI.Button(Rect(width/4 - width/4, 5*height/6, width/2, height/6), "Save"))
     {
         PlayerPrefs.SetInt("difficulty",selGridInt);
         Application.LoadLevel("TitleScreen");
     }
      if(GUI.Button(Rect(width/2, 5*height/6, width/2, height/6), "Cancel"))
              Application.LoadLevel("TitleScreen");//*/
 
     
 }

Now this runs fine on my device, which is a G2X, but on a Raxr Maxx, and on an LG Marquee it crashes. The debug output of logcat for the marquee crash is as follows

 I/Omap3ALSA( 1285): Initialized ALSA PLAYBACK device default
 I/DEBUG   ( 1281): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 I/DEBUG   ( 1281): Build fingerprint: 'lge/lge_bproj/LG855:2.3.4/GRJ22/ZV4.47a8c0ae:user/release-keys'
 I/DEBUG   ( 1281): pid: 7980, tid: 7989  >>> com.test.test <<<
 I/DEBUG   ( 1281): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 008336a0
 I/DEBUG   ( 1281):  r0 ffffffff  r1 0000004e  r2 00000000  r3 008336a0
 I/DEBUG   ( 1281):  r4 00000000  r5 00000004  r6 00001403  r7 0000004e
 I/DEBUG   ( 1281):  r8 00519700  r9 497df9d4  10 00000000  fp 00000000
 I/DEBUG   ( 1281):  ip 00000001  sp 497df688  lr 8120df64  pc 8120ac54  cpsr 80000010
 I/DEBUG   ( 1281):  d0  809082dd90000000  d1  81800006e0002480
 I/DEBUG   ( 1281):  d2  0000000000000000  d3  0001060a00000000
 I/DEBUG   ( 1281):  d4  0001060a00000000  d5  0000000000030006
 I/DEBUG   ( 1281):  d6  0000000000000000  d7  0000000000000000
 I/DEBUG   ( 1281):  d8  000000003f800000  d9  0000000040900000
 I/DEBUG   ( 1281):  d10 0000000000000000  d11 0000000000000000
 I/DEBUG   ( 1281):  d12 0000000000000000  d13 0000000000000000
 I/DEBUG   ( 1281):  d14 0000000000000000  d15 0000000000000000
 I/DEBUG   ( 1281):  d16 000000003b888889  d17 0000000000000000
 I/DEBUG   ( 1281):  d18 3b23d70a00000000  d19 0000000000000000
 I/DEBUG   ( 1281):  d20 0000000000000000  d21 00000000bca237c3
 I/DEBUG   ( 1281):  d22 bf800000bf800000  d23 3f800000bf7aee42
 I/DEBUG   ( 1281):  d24 000000003b888889  d25 0000000000000000
 I/DEBUG   ( 1281):  d26 3b23d70a00000000  d27 0000000000000000
 I/DEBUG   ( 1281):  d28 0000000000000000  d29 00000000bca237c3
 I/DEBUG   ( 1281):  d30 3dccccd0bf755555  d31 3f800000bf7aee42
 I/DEBUG   ( 1281):  scr 20000012
 I/DEBUG   ( 1281): 
 I/DEBUG   ( 1281):          #00  pc 0000ac54  /system/lib/egl/libGLESv2_POWERVR_SGX530_125.so
 I/DEBUG   ( 1281):          #01  lr 8120df64  /system/lib/egl/libGLESv2_POWERVR_SGX530_125.so
 I/DEBUG   ( 1281): 
 I/DEBUG   ( 1281): code around pc:
 I/DEBUG   ( 1281): 8120ac34 e28cc001 e1520004 31a02004 e1500004 
 I/DEBUG   ( 1281): 8120ac44 21a00004 e15c0001 3afffff7 ea000011 
 I/DEBUG   ( 1281): 8120ac54 e19340b4 e1520004 31a02004 e1500004 
 I/DEBUG   ( 1281): 8120ac64 21a00004 e15c0001 e1a0408c e28cc001 
 I/DEBUG   ( 1281): 8120ac74 3afffff6 ea000007 e793410c e28cc001 
 I/DEBUG   ( 1281): 
 I/DEBUG   ( 1281): code around lr:
 I/DEBUG   ( 1281): 8120df44 e59d3020 e1a00004 e1a01007 e28dc044 
 I/DEBUG   ( 1281): 8120df54 e58dc000 e28dc040 e58dc004 ebfff315 
 I/DEBUG   ( 1281): 8120df64 e59d8040 e59d9044 e3012401 e5943590 
 I/DEBUG   ( 1281): 8120df74 e2888001 e0698008 e1560002 13530000 
 I/DEBUG   ( 1281): 8120df84 10888009 11a0900a ea000001 e3a08000 
 I/DEBUG   ( 1281): 
 I/DEBUG   ( 1281): stack:
 I/DEBUG   ( 1281):     497df648  00001100  
 I/DEBUG   ( 1281):     497df64c  005672c4  
 I/DEBUG   ( 1281):     497df650  002cdf50  
 I/DEBUG   ( 1281):     497df654  002dfc40  
 I/DEBUG   ( 1281):     497df658  002dfc58  
 I/DEBUG   ( 1281):     497df65c  00672898  
 I/DEBUG   ( 1281):     497df660  002cdf50  
 I/DEBUG   ( 1281):     497df664  002dfc40  
 I/DEBUG   ( 1281):     497df668  002dfc58  
 I/DEBUG   ( 1281):     497df66c  8120512c  /system/lib/egl/libGLESv2_POWERVR_SGX530_125.so
 I/DEBUG   ( 1281):     497df670  002ccd08  
 I/DEBUG   ( 1281):     497df674  00000004  
 I/DEBUG   ( 1281):     497df678  00001403  
 I/DEBUG   ( 1281):     497df67c  0000004e  
 I/DEBUG   ( 1281):     497df680  e3a070ad  
 I/DEBUG   ( 1281):     497df684  ef9000ad  
 I/DEBUG   ( 1281): #00 497df688  002ccd08  
 I/DEBUG   ( 1281):     497df68c  8120df64  /system/lib/egl/libGLESv2_POWERVR_SGX530_125.so
 I/DEBUG   ( 1281):     497df690  497df6d4  
 I/DEBUG   ( 1281):     497df694  497df6d0  
 I/DEBUG   ( 1281):     497df698  00000cbc  
 I/DEBUG   ( 1281):     497df69c  002b3c04  
 I/DEBUG   ( 1281):     497df6a0  3f800000  
 I/DEBUG   ( 1281):     497df6a4  3f800000  
 I/DEBUG   ( 1281):     497df6a8  00000022  
 I/DEBUG   ( 1281):     497df6ac  00519700  
 I/DEBUG   ( 1281):     497df6b0  00519700  
 I/DEBUG   ( 1281):     497df6b4  8124e4cc  
 I/DEBUG   ( 1281):     497df6b8  0000004e  
 I/DEBUG   ( 1281):     497df6bc  00000900  
 I/DEBUG   ( 1281):     497df6c0  00000022  
 I/DEBUG   ( 1281):     497df6c4  491d94cc  
 I/DEBUG   ( 1281):     497df6c8  00000014  
 I/DEBUG   ( 1281):     497df6cc  00000000  
 I/BootReceiver( 1359): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)
 E/InputDispatcher( 1359): channel '40a7bd58 com.test.test/com.unity3d.player.UnityPlayerNativeActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
 E/InputDispatcher( 1359): channel '40a7bd58 com.test.test/com.unity3d.player.UnityPlayerNativeActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
 E/SensorService( 1359): dropping 2 events on the floor (Broken pipe)


I dont think anything Im doing can cause a segmentation fault in a precompiled system binary...

EDIT: It's also worth noting that if I remove all of the scenes in the "build settings" except for the settings scene, it loads as expected with no fault

In addition, the culprit is GUI. The scene that is loaded will only crash if there are calls to GUI (i.e GUI.Button)

Comment
Add comment · Show 3
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 phodges · Oct 27, 2012 at 03:32 PM 0
Share

This doesn't look good. Have you tried to narrow it down further? Will any one of these GUI calls by itself lead to the seg fault? Does it run for any number of frames when the level is loaded or does it instantly crash?

The biggest stand out difference between your G2X and the device that is seg faulting that seems relevant is graphics subsystem; you're Tegra2 and the other device is PVR. It might be worth you checking over the textures you are using in your skin definition. As a quick test, you might even try setting your 'skin' instance variable to none, commenting out the GUI.skin assignment and then redeploying.

avatar image Epixam · Oct 27, 2012 at 05:42 PM 0
Share

Thanks for the ideas. It appears that any call from the script to GUI will crash the app (skin,box, and button all crash the scene) In addition It instantly crashes. The only output that I know how to get is logcat. There must be a unity dump that i can look into for more verbose information about the crash?

I tried changing the textures to RGBA16 GLES2.0 compatible and it doesn't help. Its worth noting that the skin being used in the settings is the same skin that is used in the main splash screen, and the main splash works fine.

avatar image phodges · Oct 27, 2012 at 06:07 PM 0
Share

If the skin is being used without problems in your other scene, then it seems like this settings scene of yours is in a bad way. As a last, desperate stab at a workaround you could try building a fresh scene from scratch and see if that will deploy.

Log info can be found here:

http://docs.unity3d.com/Documentation/$$anonymous$$anual/LogFiles.html

Looks like it all goes to logcat though. I'd say you've likely got a bug report to file. At least you've got a nice simple scene to share that you know breaks on a few devices.

2 Replies

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

Answer by Epixam · Nov 27, 2012 at 01:02 AM

This is a KNOWN issue. Anyone running into this problem can circumvent it by publishing a development build from the build settings menu.

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 Xaon · Apr 01, 2014 at 07:04 AM 0
Share

Actually this doesn't always solve the problem with signal 11 (SIGSEGV). It looks like internal error because when we reverted changes to point before error first time occurred, we still got segmentation fault (Signal 11) error. We use Unity 4.3.0f4.

avatar image
0

Answer by Xaon · Apr 01, 2014 at 10:20 AM

We have managed to found source of segmentation fault (Signal 11) in our project. It turned out that we had class (normal class, not Monobehaviour) that has [System.Serializable] attribute and one of our programmers implemented default constructor in that class.

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 anywherenotes · Feb 14, 2015 at 03:00 AM 0
Share

Is this not supported? I just got such error reported with SIGSEGV, I've had this code in for a couple of months (granted not a lot of users). Should I have no constructors at all? (if you have a link where this is described, it would be great)

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.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Error build android app 1 Answer

Problem in android plugin creation.? 0 Answers

Google.IOSResolver.dll' will not be loaded 2 Answers

New Export Error Android 0 Answers

Android SDK Root Folder 3 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