Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Container bug - crashes upon creating a new one after removeSelf()-ing.
Started by rakoonic2 Sep 10 2013 01:15 PM

19 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

I've got a scene (am using storyboard) that sets up a container (for a scrolling list of stuff).

On didExitScene() I purge the scene and head off.

Then when I come back into that scene, it crashes the simulator.

 

I tried removeSelf()-ing the container after creating it, and again, upon re-entering the scene it crashes the simulator.

 

The container has several groups, text objects etc nested in it (imagine a table view inside, although it is my own code not widgets). Indeed I just tried it without adding anything to the container, and it still locks up the simulator upon second attempt to create a container and then crashes.

 

Not sure if this is known or not.



[TOPIC: post.html]
#2

walter

[GLOBAL: userInfoPane.html]
walter
  • Moderator

  • 726 posts
  • Alumni

Yea, seems like a bug. I've logged it. Thanks for all the reports!



[TOPIC: post.html]
#3

walter

[GLOBAL: userInfoPane.html]
walter
  • Moderator

  • 726 posts
  • Alumni

I've got a simple test case (below) that doesn't crash, so I'm not understanding what you are doing.

 

Do you have some test code you can share that demonstrates the issue?

 

local g = display.newContainer( 300, 380 )
g:removeSelf()
local g = display.newContainer( 300, 380 )



[TOPIC: post.html]
#4

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

I'll have to try narrowing down what I'm doing as it is part of a big project I was attempting to port to G2.

The containers do contain a fair amount of stuff, so it may be something to do with that (maybe some stuff doesn't get removeSelf()-ed properly?), but the crash doesn't happen until I next try to create a container.

 

Will do what I can to get you a simple project.



[TOPIC: post.html]
#5

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

Instead of that, I spent the evening redoing the drawing on my dungeon test.

2 things happened.

 

1) I made it a looooot quicker. Custom culling code worked wonders!

2) I moved the view into a snapshot.

 

Witness the mad result!

 

http://imgur.com/a/0RRhj

 

Anyway, the end result is - the container crash happens in this project too - I can go into the game, go back to the menu, but the next time I try to go into the game it crashes (both simulator and on iPad).

 

I will definitely try to come up with a simple test case for this.



[TOPIC: post.html]
#6

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

The error message from the console when it happens is this:

 

/Applications/CoronaSDK - graphics 2/Corona Terminal: line 9:   724 Segmentation fault: 11  "$path/Corona Simulator.app/Contents/MacOS/Corona Simulator" $*
logout


[TOPIC: post.html]
#7

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

I should point out that while tweaking my game, I realised that as snapshots already clip their contents, I could (for now) swap the container that was the parent group for a normal display group.

 

The crash bugs are gone, so the game runs properly for now.

The only downside is that I have the same simulator problem as before - snapshots require me to restart the simulator a ton of times to get it to 'work' - yet it works 100% of the time on the iPad.



[TOPIC: post.html]
#8

walter

[GLOBAL: userInfoPane.html]
walter
  • Moderator

  • 726 posts
  • Alumni

Are snapshots still giving you issues? I think they are more stable now.



[TOPIC: post.html]
#9

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

I downloaded the sample today, and retro racer (in the simulator) still causes issues not initialising properly (IE you have to restart it numerous times hoping it randomly works). I've not looked into it more regarding the quiting to menu and going back in in retro racer. Dungeoneer still crashes on that, but I am 99% certain I removed all the snapshots from that for now.

 

I'll have a look tomorrow at the outstanding issues and report back to you - will mail you retro racer source if there are still issues (I did disable the filters on the snapshot feature in it as for some reason the rect went wrong and the snapshot image was flipped vertically!), as that is significantly simpler than dungeoneer source.



[TOPIC: post.html]
#10

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

@rakoonic

 

We made multiple changes today that may fix the issue you noted in the Mac Simulator above. The changes should be available in the next available daily build after 2013.2001.



[TOPIC: post.html]
#11

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

Will give it a try. I should note that I seem to have no bugs now with containers themselves. Snapshots though seem to be worse than before, to the point where I removed them from both my demos as they were unusable. I'll try tomorrow and if there are still issues, will send you the code so you can at least check if only I see it.



[TOPIC: post.html]
#12

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

Sounds good! I believe a few snapshot issues were resolved.  



[TOPIC: post.html]
#13

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

2002 - it appears that the snapshot initialisation problem is now gone (IE it works every time I start up the simulator rather than having to hammer control+R constantly until I get lucky).

Is zoomblur filter still AWOL though? It is when I apply it that I only get 1/4 of thescreen but flipped?

Let me know if you need my code to see it happening.



[TOPIC: post.html]
#14

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

Good to hear, yes please send me some sample code to try the zoomBlur effect with.



[TOPIC: post.html]
#15

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

Ignore me, I got your message. I really need to pay more attention to the forum icons :)

Also - mail and code sent.



[TOPIC: post.html]
#16

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

We pushed a change to the zoomBlur shader that will be available in the daily builds after build 2002.  Please give the change a try.



[TOPIC: post.html]
#17

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

Can I tag this thread as fixed, or are there still issues using containers for you?



[TOPIC: post.html]
#18

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

I have one last container bug to check out from another project - will get back to you on it in an hour or so.

[TOPIC: post.html]
#19

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

I'm still getting a simulator crash (v2002, downloading 2004 now), I'll try to narrow it down tonight.



[TOPIC: post.html]
#20

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

Bryan, about to mail you a simplified project along with some comments so you know where to look in my code.

I tried it out and it fails with and without compatibility mode 1 (for what it is worth).




[topic_controls]
[/topic_controls]