Re: [AD] Patch for fixing missing NSAutoreleasePools

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 27 May 2012, at 9:37 , Trent Gamblin wrote:
> I think there may be others. I spotted some functions using Objective C stuff with no pools. Maybe they're just not leaking. Or maybe we just don't use them in the examples.

Which functions? I can do a more specific test if I know where to look; it's possible I just didn't test those while runnign random examples.

> They do work for me.

Hmm...

The backtrace (from ex_shader) is

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
[Switching to process 36056]
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x000000010009e976 in ogl_flush_vertex_cache (disp=0x100614a00) at /Users/eglebbk/Program/Allegro5/5.1/src/opengl/ogl_draw.c:355
#2  0x000000010009d35b in ogl_draw_bitmap_region (bitmap=<value temporarily unavailable, due to optimizations>, tint={r = 1, g = 1, b = 1, a = 1}, sx=0, sy=0, sw=320, sh=200, flags=0) at /Users/eglebbk/Program/Allegro5/5.1/src/opengl/ogl_bitmap.c:281
#3  0x00000001000231f4 in _draw_tinted_rotated_scaled_bitmap_region (bitmap=<value temporarily unavailable, due to optimizations>, tint={r = 1, g = 1, b = 1, a = 1}, cx=-0, cy=-0, angle=0, xscale=1, yscale=1, sx=0, sy=0, sw=320, sh=200, dx=0, dy=0, flags=0) at /Users/eglebbk/Program/Allegro5/5.1/src/bitmap.c:314
#4  0x000000010002364b in al_draw_tinted_bitmap_region (bitmap=<value temporarily unavailable, due to optimizations>, tint={r = 1, g = 1, b = 1, a = 1}, sx=<value temporarily unavailable, due to optimizations>, sy=<value temporarily unavailable, due to optimizations>, sw=<value temporarily unavailable, due to optimizations>, sh=<value temporarily unavailable, due to optimizations>, dx=<value temporarily unavailable, due to optimizations>, dy=<value temporarily unavailable, due to optimizations>, flags=<value temporarily unavailable, due to optimizations>) at /Users/eglebbk/Program/Allegro5/5.1/src/bitmap.c:388
#5  0x00000001000058f1 in _al_mangled_main (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>) at /Users/eglebbk/Program/Allegro5/5.1/examples/ex_shader.cpp:234
#6  0x000000010008c6ca in call_user_main [inlined] () at /Users/eglebbk/Program/Allegro5/5.1/src/macosx/osx_app_delegate.m:214
#7  0x000000010008c6ca in +[AllegroAppDelegate app_main:] (self=<value temporarily unavailable, due to optimizations>, _cmd=<value temporarily unavailable, due to optimizations>, arg=<value temporarily unavailable, due to optimizations>) at /Users/eglebbk/Program/Allegro5/5.1/src/macosx/osx_app_delegate.m:226
#8  0x00007fff83d68204 in __NSThread__main__ ()
#9  0x00007fff8381cfd6 in _pthread_start ()
#10 0x00007fff8381ce89 in thread_start ()
(gdb) 

I apparently didn't build with debug support, I'll recompile and post the corresponding log file (will be later in the day though). If I have time I can try to backtrack to when it worked.

Evert



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/