Re: [AD] Patch for fixing missing NSAutoreleasePools |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2012-05-27, at 2:06 AM, Evert Glebbeek wrote:
> 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.
I don't remember specifically. When I applied the patch I opened two terminals, one with the patch and one to look at each file that was patched. I looked at each patched function and made sure there were no errors (there were a couple.) As I was scrolling through the patched files I noticed other functions that the patch didn't touch that used Objective C stuff. It's entirely possible those are safe though. They could be called from one of the functions that did have Autorelease pools added, or something like that.
> 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.
A backtrack would be useful if you have the time. I'd be interested in fixing it if you can locate the problem.
Trent