• Register

Beret is a 2D puzzle-platformer game about a scientist, astonishingly named Beret, who has gained telekinetic abilities through his research at the Evil Corporation. He decides that the Evil Corporation is a tad too evil for his liking, and begins his solitary quest to overthrow the corporation and punish the evil deeds of his employers. Beret has 21 puzzle-filled levels, 120 collectable Medallions, over 20 hours of gameplay, and an unlockable level editor.

Forum Thread
  Posts  
Bug with Gravity Switches (Games : Beret : Forum : Bug Reports : Bug with Gravity Switches) Locked
Thread Options
Nov 1 2011 Anchor

So while messing around with the level editor I've noticed that Gravity Switches will cause the game to immediately crash if they come in contact with a solid tile, but only if the Gravity Switch has momentum when it hits!

For example, if you place a Gravity Switch in an accelerator tile and it hits a solid tile, the game will crash. The same thing happens if you link one with a pink or blue link block and attempt to hit it against a wall or if one of those sticky wheel things carries it into a wall.

I notice that the game will NOT crash if it hits an object while moving or if the Gravity Switch is stationary and only hits a wall tile due to being hit by an object first.

It's... Kind of hard to explain, but I'm sure it'll be pretty easy to replicate if you try it out!

Here's a map that shows some examples of this glitch (assuming it ever gets authorized):

Indiedb.com

Nov 1 2011 Anchor

In my experience, authorization for Beret maps usually only takes a couple of days, so the add-on should show up soon enough.

It's interesting that this bug actually crashes Beret, though. Maybe Kiwisauce can tell us whether this is violating an assertion in the gravity switch block code.

Edited by: Leylite

Nov 1 2011 Anchor

Alright the thing was authorized so go nuts and download a room that pretty much constantly crashes the game!

Indiedb.com

Nov 1 2011 Anchor

I loaded up Isocitration's room, then sent the gravity switch next to the left-pointing accelerators through the accelerators and into the wall. As expected, the game crashed.

Here's what I got from the Mac OS X "Beret quit unexpectedly" Problem Report (slightly abridged):

====

Process: beret [9951]
Path: /Users/george/Desktop/Games/Beret_1.1.99999/Beret.app/Contents/MacOS/beret
Identifier: com.kiwisauce.beret
Version: 1.0 (1.0)
Code Type: X86-64 (Native)
Parent Process: launchd [105]

Date/Time: 2011-11-01 23:08:41.974 -0400

Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 1 Dispatch queue: com.apple.libdispatch-manager

Thread 0: Dispatch queue: com.apple.main-thread
0 com.kiwisauce.beret 0x00000001000245fe check_crash + 1207
1 com.kiwisauce.beret 0x0000000100027eb0 apply_collisions + 999
2 com.kiwisauce.beret 0x0000000100024ba2 update_thing + 501
3 com.kiwisauce.beret 0x0000000100016810 SDL_main + 2286
4 com.kiwisauce.beret 0x0000000100001923 -[SDLMain applicationDidFinishLaunching:] + 71
5 com.apple.Foundation 0x00007fff8675aad5 _nsnote_callback + 167
6 com.apple.CoreFoundation 0x00007fff8005bfd0 __CFXNotificationPost + 1008
7 com.apple.CoreFoundation 0x00007fff80048548 _CFXNotificationPostNotification + 200
8 com.apple.Foundation 0x00007fff86751a36 -[NSNotificationCenter postNotificationName:object:userInfo:] + 101
9 com.apple.AppKit 0x00007fff8745844a -[NSApplication _postDidFinishNotification] + 100
10 com.apple.AppKit 0x00007fff8745837f -[NSApplication _sendFinishLaunchingNotification] + 66
11 com.apple.AppKit 0x00007fff8752335d -[NSApplication(NSAppleEventHandling) _handleAEOpen:] + 219
12 com.apple.AppKit 0x00007fff87522fd9 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 77
13 com.apple.Foundation 0x00007fff867890d6 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 360
14 com.apple.Foundation 0x00007fff86788f06 _NSAppleEventManagerGenericHandler + 114
15 com.apple.AE 0x00007fff8a01432b aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 162
16 com.apple.AE 0x00007fff8a014224 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 32
17 com.apple.AE 0x00007fff8a01412b aeProcessAppleEvent + 210
18 com.apple.HIToolbox 0x00007fff8647f619 AEProcessAppleEvent + 48
19 com.apple.AppKit 0x00007fff87428095 _DPSNextEvent + 1191
20 com.apple.AppKit 0x00007fff87427801 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155
21 com.apple.AppKit 0x00007fff873ed68f -[NSApplication run] + 395
22 com.kiwisauce.beret 0x000000010000177c CustomApplicationMain + 349
23 com.kiwisauce.beret 0x0000000100001b84 main + 240
24 com.kiwisauce.beret 0x0000000100001084 start + 52

Thread 1 Crashed: Dispatch queue: com.apple.libdispatch-manager
0 libSystem.B.dylib 0x00007fff885e0c0a kevent + 10
1 libSystem.B.dylib 0x00007fff885e2add _dispatch_mgr_invoke + 154
2 libSystem.B.dylib 0x00007fff885e27b4 _dispatch_queue_invoke + 185
3 libSystem.B.dylib 0x00007fff885e22de _dispatch_worker_thread2 + 252
4 libSystem.B.dylib 0x00007fff885e1c08 _pthread_wqthread + 353
5 libSystem.B.dylib 0x00007fff885e1aa5 start_wqthread + 13

Thread 1 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000004 rbx: 0x0000000100b80e50 rcx: 0x0000000100b80ce8 rdx: 0x0000000000000000
rdi: 0x0000000000000004 rsi: 0x0000000000000000 rbp: 0x0000000100b80e90 rsp: 0x0000000100b80ce8
r8: 0x0000000000000001 r9: 0x0000000100b80e50 r10: 0x0000000100b80e20 r11: 0x0000000000000246
r12: 0x00007fff71012998 r13: 0x00007fff71012d68 r14: 0xffffffffffffffff r15: 0x00007fff71012da8
rip: 0x00007fff885e0c0a rfl: 0x0000000000000247 cr2: 0x0000000100013da9

====

update_thing has got to be the least descriptive method name I have ever seen :(

Edited by: Leylite

Nov 2 2011 Anchor

Wow, you guys are great. :) (And Leylite, I have a whole thing.c file... update_thing is what happens when a 'thing' needs to be updated, obviously!)

Anyway, thanks to you two doing all the debugging for me, this is now fixed. Expect a new version of Beret with this and a lot of other bugfixes/changes soon.

... if you're interested, it was a null pointer deference in trying to get the other 'thing' that the gravity switch crashed into. Walls don't count as 'things', and since there's a delay after a switch is hit before it can register the next hit, slamming one into a wall by hitting it with another object only registers the hit with the object.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.