0ctane Report post Posted October 1, 2007 Okay, I got everything built. Just so that everyone knows, my attempts at using the cal3d SVN failed with segfaults on login (similar to a problem Pardu had a while ago). I was able to grab the official 0.11.0 codebase and build it. Now, to figure out the audio stuff for OS X. =) Share this post Link to post Share on other sites
Grum Report post Posted October 2, 2007 Is no one else seeing this error: /Users/jeff/programs/el_osx/elc/font.c:1036: error: 'zoom_level' undeclared (first use in this function) Everyone's building with SKY_FPV_CURSOR, apparently Shouldn't draw_scene.h be included in font.c since it has the extern call? Also, I had to add #include "global.h" to reflection.c in order for it to find cur_time. Both fixed. Share this post Link to post Share on other sites
Grum Report post Posted October 2, 2007 I got #0 0x000000000047a90f in build_path_map () at map.c:189 #1 0x000000000047a829 in el_load_map ( file_name=0x7fff4c8bb170 "./maps/cont2map21_maze5.elm") at map.c:214 #2 0x000000000047a9c3 in change_map ( mapname=0x7fff4c8bb170 "./maps/cont2map21_maze5.elm") at map.c:243 #3 0x000000000047f891 in process_message_from_server ( in_data=0x2aaab00009a0 "\a\035", data_length=31) at multiplayer.c:793 #4 0x0000000000478631 in start_rendering () at main.c:155 #5 0x0000000000478a60 in main (argc=1, argv=0x7fff4c8bd728) at main.c:290 upon entering (or rather trying to enter) said map, my CVS client is up to date (just checked), I'm building with default options, plus new_sound, new_actor_scale, minimap, notepad, new_file_io. Okay, so I didn't wait until tonight. What threw me off was the fact that it was trying to initialize the path finder map. I assumed that it wouldn't do so if loading the map had failed. That'll teach me not to make assumptions So, in the end, I think this issue is exactly the same as this one, i.e. loading the map failed due to a broken check on particle system size. The original issue should already be fixed, and I've now also added a check on the return value of load_map(). Can you confirm that it's fixed? Share this post Link to post Share on other sites
Florian Report post Posted October 2, 2007 Is no one else seeing this error: /Users/jeff/programs/el_osx/elc/font.c:1036: error: 'zoom_level' undeclared (first use in this function) Everyone's building with SKY_FPV_CURSOR, apparently Ah, that explains why your reflections are broken. Try w/o SKY_FPV_CURSOR 0ctane and you'll hopefully get all the new shader eye candy. Share this post Link to post Share on other sites
0ctane Report post Posted October 2, 2007 Ah, that explains why your reflections are broken. Try w/o SKY_FPV_CURSOR 0ctane and you'll hopefully get all the new shader eye candy. I have not been using SKY_FPV_CURSOR, but I have shaders working. The problem on my Mac (x386) is a bit complicated, as the following screenshots will hopefully illustrate. With reflections turned on, but water shader quality at 0: Hopefully you see that the terrain not affecting the reflection calculation is gone, poof. Now, if I turn water shader quality to 1 or 2, reflections and the terrain appear just fine. Here is at 2: Woohoo! So, I just need to make sure that water shader quality != 0 (or someone needs to fix the underlying problem). Now with shadows turned on (w/o shadow mapping), I get random textures appearing in the water: However, if I turn on shadow mapping: Unfortunately, even though the shadows seem to work, they do not blend properly with the water environment. They are very harsh, and look very peculiar when it is raining. Still, it is progress... Share this post Link to post Share on other sites
Torg Report post Posted October 2, 2007 Now with shadows turned on (w/o shadow mapping), I get random textures appearing in the water: This is similar to someone else running under Windows. They had face textures appearing with shadows. I'm wondering if someone has done something odd in the shadow code. Share this post Link to post Share on other sites
Grum Report post Posted October 2, 2007 Thread here. This sort of thing makes me very nervous. Weird textures appearing is one step removed from outright crashing. Share this post Link to post Share on other sites
0ctane Report post Posted October 2, 2007 Xaphier was telling me a while ago (right after the 1.4 release) that regular shadows were going to be no longer supported, and that everyone would need shadow mapping in order to do shadows. That thread is similar, although the weird textures are only showing up for water reflections in my case. It seems to rotate through various texture files. Sometimes I see faces, sometimes flag emblems, sometimes books, .... Share this post Link to post Share on other sites
Ermabwed Report post Posted October 2, 2007 I got #0 0x000000000047a90f in build_path_map () at map.c:189 #1 0x000000000047a829 in el_load_map ( file_name=0x7fff4c8bb170 "./maps/cont2map21_maze5.elm") at map.c:214 #2 0x000000000047a9c3 in change_map ( mapname=0x7fff4c8bb170 "./maps/cont2map21_maze5.elm") at map.c:243 #3 0x000000000047f891 in process_message_from_server ( in_data=0x2aaab00009a0 "\a\035", data_length=31) at multiplayer.c:793 #4 0x0000000000478631 in start_rendering () at main.c:155 #5 0x0000000000478a60 in main (argc=1, argv=0x7fff4c8bd728) at main.c:290 upon entering (or rather trying to enter) said map, my CVS client is up to date (just checked), I'm building with default options, plus new_sound, new_actor_scale, minimap, notepad, new_file_io. Okay, so I didn't wait until tonight. What threw me off was the fact that it was trying to initialize the path finder map. I assumed that it wouldn't do so if loading the map had failed. That'll teach me not to make assumptions So, in the end, I think this issue is exactly the same as this one, i.e. loading the map failed due to a broken check on particle system size. The original issue should already be fixed, and I've now also added a check on the return value of load_map(). Can you confirm that it's fixed? Yes, it's fixed Share this post Link to post Share on other sites
Florian Report post Posted October 3, 2007 I switched to 0ctane's cal3d 0.11 Framework yesterday. Now I get lots of those during "initializing actor definitions": el_osx(931,0xa000d000) malloc: *** Deallocation of a pointer not malloced: 0xad28aa94; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug So I set MallocBadFreeAbort=1 so that gdb aborts and prints a bt: (gdb) bt full #0 0x9003d66c in kill () No symbol table info available. #1 0x9010e8cf in raise () No symbol table info available. #2 0x9010d422 in abort () No symbol table info available. #3 0x9000558f in free () No symbol table info available. #4 0x04fc8c31 in operator delete (ptr=0xad28aa94) at ../../../../gcc-4.2.1/libstdc++-v3/libsupc++/del_op.cc:49 ptr = (void *) 0x0 #5 0x04f9ed9b in std::string::_Rep::_M_destroy (this=0xad28aa94, __a=@0xbfffdf5b) at /usr/src/gcc-4.2.1-build/i386-apple-darwin8.10.1/libstdc++-v3/include/ext/new_allocator.h:97 this = (basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep * const) 0x0 #6 0x04fa030e in std::string::assign (this=0xbfffe080, __str=@0xbfffdf90) at /usr/src/gcc-4.2.1-build/i386-apple-darwin8.10.1/libstdc++-v3/include/bits/basic_string.h:238 this = (basic_string<char,std::char_traits<char>,std::allocator<char> > * const) 0xbfffe080 __str = (const basic_string<char,std::char_traits<char>,std::allocator<char> > &) @0x0: Cannot access memory at address 0x0 Anyways, without MallocBadFreeAbort=1 EL loads just fine but spams STDERR ... Share this post Link to post Share on other sites
Grum Report post Posted October 3, 2007 This is not the full backtrace, is it? The deepest frame (#6) is still in the c++ library. Can you post a few more (or all, if it isn't 13 pages of backtrace) levels so that we can see where in EL this is triggered? Share this post Link to post Share on other sites
Florian Report post Posted October 3, 2007 (edited) This is the full backtrace ... I found the reason for this behaviour (and a crash when exiting the client): - I use gcc 4.2.1 in /usr/local/* - 0ctane uses Apple's gcc 4.0.x in /usr/* - I link to /usr/local/lib/* but 0ctane's Frameworks are linked to /usr/lib/* somewhere the stdc++ lib gets messed up. Now I recompiled with Apple's standard settings and the malloc issues are gone, also the client-exit-crash. Edited October 3, 2007 by Florian Share this post Link to post Share on other sites
0ctane Report post Posted October 3, 2007 I found the reason for this behaviour (and a crash when exiting the client):- I use gcc 4.2.1 in /usr/local/* - 0ctane uses Apple's gcc 4.0.x in /usr/* - I link to /usr/local/lib/* but 0ctane's Frameworks are linked to /usr/lib/* Yeah, I have to use all the standard Apple libraries since I cannot depend on people having installed additional software. This is one reason that I no longer use fink or opendarwin, since I cannot afford to have my libraries all messed up when deploying a product. Share this post Link to post Share on other sites
Florian Report post Posted October 3, 2007 I still get those crashes quite often: #0 0x03d1034a in CalAnimation::getCoreAnimation () No symbol table info available. #1 0x03d26fe9 in CalMixer::updateSkeleton () No symbol table info available. #2 0x03d2836e in CalModel::update () No symbol table info available. #3 0x00029df3 in cal_render_actor (act=0x16d9a200) at cal.c:345 pCalRenderer = (struct CalRenderer *) 0x92b23141 meshCount = -1073748464 meshId = -1073748408 submeshCount = -1833815653 points = {...} meshNormals = {...} meshTextureCoordinates = {...} meshFaces = {...} skel = (struct CalSkeleton *) 0x1a72a1b0 _mesh = (struct CalMesh *) 0x0 _coremesh = (struct CalCoreMesh *) 0x0 _weaponmesh = (struct CalCoreMesh *) 0x3f800000 _shieldmesh = (struct CalCoreMesh *) 0x0 reverse_scale = 115.75 #4 0x000adce2 in draw_actor_shadow (actor_id=0x16d9a200) at shadows.c:463 x_pos = 115.5 y_pos = 170 z_pos = 0 x_rot = 0 y_rot = 0 z_rot = 0 #5 0x000adde5 in display_actors_shadow () at shadows.c:486 act = (actor *) 0x16d9a200 i = 2 x = 114 y = 164 #6 0x000adf09 in display_shadows () at shadows.c:523 No locals. #7 0x000ae606 in render_light_view () at shadows.c:678 cur_intersect_type = 0 #8 0x0005919d in display_game_handler (win=0x5194400) at gamewin.c:954 main_count = 450341 times_FPS_below_3 = 0 fps = {39, 39, 39, 38, 40} shadows_were_disabled = 0 eye_candy_was_disabled = 0 str = "\000\000\000\000\000\000\000\000\000\000\200?\000\000\000\000È\220\233\021¹\204\233\021\001\000\000\000(èÿ¿I\205\233\021 ÀÚ\021\000\000\000\000\000\000\000\000\000\000\200?Dê\003\005Dèÿ¿\031\000\000\000\001\000\000\000 ÀÚ\021\004\000\000\000 ÀÚ\021Õ-²\222\210y\236\021\f ²¢Hèÿ¿jË\235\021 ÀÚ\021\000\000\000\000\001\000\000\000¦\211\236\021ÐéÚ\021Pèÿ¿xèÿ¿\032.²\222 ÀÚ\021á\r\000\000úøø=\000\000\000\000¾¾¾> >\230èÿ¿±T²\222 ÀÚ\021\000\000\200?\000\000\200?\000\000\200?" i = 0 any_reflection = 2 mouse_rate = 1 #9 0x00049292 in draw_window (win=0x5194400) at elwindows.c:1135 ret_val = 0 W = (widget_list *) 0x597aec0 #10 0x00049b4a in display_window (win_id=0) at elwindows.c:1302 No locals. #11 0x000461b8 in display_windows (level=1) at elwindows.c:72 id = -1 next_id = -9999 i = 0 #12 0x0003d0d9 in draw_scene () at draw_scene.c:116 No locals. #13 0x000819cf in start_rendering () at main.c:168 event = { type = 24 '\030', active = { type = 24 '\030', gain = 126 '~', state = 18 '\022' }, key = { type = 24 '\030', which = 126 '~', state = 18 '\022', keysym = { scancode = 2 '\002', sym = SDLK_UNKNOWN, mod = 1191414493, unicode = 13204 } }, motion = { type = 24 '\030', which = 126 '~', state = 18 '\022', x = 2, y = 0, xrel = 0, yrel = 0 }, button = { type = 24 '\030', which = 126 '~', button = 18 '\022', state = 176 '°', x = 2, y = 0 }, jaxis = { type = 24 '\030', which = 126 '~', axis = 18 '\022', value = 2 }, jball = { type = 24 '\030', which = 126 '~', ball = 18 '\022', xrel = 2, yrel = 0 }, jhat = { type = 24 '\030', which = 126 '~', hat = 18 '\022', value = 176 '°' }, jbutton = { type = 24 '\030', which = 126 '~', button = 18 '\022', state = 176 '°' }, resize = { type = 24 '\030', w = 2, h = 0 }, expose = { type = 24 '\030' }, quit = { type = 24 '\030' }, user = { type = 24 '\030', code = 2, data1 = 0x0, data2 = 0x47038add }, syswm = { type = 24 '\030', msg = 0x2 } } done = 0 network_thread_data = {0x13517290, 0x36c19c} network_thread = (SDL_Thread *) 0x169d4e00 message_queue = (queue_t *) 0x13517290 #14 0x00081d9c in SDL_main (argc=1, argv=0x5907050) at main.c:290 No locals. #15 0x0018b615 in -[SDLMain applicationDidFinishLaunching:] (self=0x591e230, _cmd=0x19e450, note=0x59115b0) at SDLmain.m:197 status = -1868196602 Share this post Link to post Share on other sites
0ctane Report post Posted October 3, 2007 (edited) Going along with my previous post about random textures in the water, I just compiled with SKY_FPV_CURSORS, and I notice the sky is rotating through textures also. It is nighttime in game, so I don't know exactly what is going on. Also, it seems like with SKY_FPV_CURSORS, I no longer get reflections in the water, which might be related. My bad: [11:44:26] File './textures/clouds.bmp' not found [11:44:26] File './textures/cloud_detail.bmp' not found [11:44:26] File './textures/cloud_detail_alpha.bmp' not found [11:44:26] File './textures/moonmap.bmp' not found [11:44:26] File './textures/BrightSun.bmp' not found Where can I get these? Found them. Edited October 3, 2007 by 0ctane Share this post Link to post Share on other sites
Beaverhunter Report post Posted October 3, 2007 Oki, been away abit but no errors except for the link errors are still present, that is: 1>Linking... 1>cal3d.lib(cal3d.dll) : error LNK2005: _CalSkeleton_GetBoneBoundingBox already defined in cal3d_wrapper.obj 1>cal3d.lib(cal3d.dll) : error LNK2005: _CalSkeleton_CalculateBoundingBoxes already defined in cal3d_wrapper.obj 1>C:\dev\Eternal Lands\EternalLands.exe : fatal error LNK1169: one or more multiply defined symbols found I can get elc to compile without errors if I comment these in cal3d_wrapper.cpp: extern "C" CAL3D_WRAPPER_API void CalSkeleton_GetBoneBoundingBox(CalSkeleton *self, float *min, float *max) { self->getBoneBoundingBox(min, max); } extern "C" CAL3D_WRAPPER_API void CalSkeleton_CalculateBoundingBoxes(struct CalSkeleton *self) { self->calculateBoundingBoxes(); } So are these functions even needed? With 0.11 rc2 they seem to be included inside cal3d.lib already. Do they differ in some way? If so, any suggestions to what I should do? Share this post Link to post Share on other sites
0ctane Report post Posted October 3, 2007 Since it seems like many people are using the SKY_FPV_CURSORS define, I gave it a try. It looks awesome (at first) but I also lose reflections. Compiled without FPV, reflections on: Scene and actors reflect fine with shaders. Compiled with FPV, reflections off: Obviously no reflections, but water is very bright. Compiled with FPV, reflections on: Still no reflections (although turned on), and water has become brown (reflecting early morning sky?). I still get the harsh shadowing from the environment, although actor shadows are soft. Share this post Link to post Share on other sites
Florian Report post Posted October 3, 2007 (edited) Linker warnings: /usr/bin/ld: warning multiple definitions of symbol _CalCoreAnimation_Scale cal3d_wrapper.o definition of _CalCoreAnimation_Scale in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalCoreAnimation_Scale /usr/bin/ld: warning multiple definitions of symbol _CalCoreMesh_Scale cal3d_wrapper.o definition of _CalCoreMesh_Scale in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalCoreMesh_Scale /usr/bin/ld: warning multiple definitions of symbol _CalCoreSkeleton_Scale cal3d_wrapper.o definition of _CalCoreSkeleton_Scale in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalCoreSkeleton_Scale /usr/bin/ld: warning multiple definitions of symbol _CalMixer_RemoveAction cal3d_wrapper.o definition of _CalMixer_RemoveAction in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalMixer_RemoveAction /usr/bin/ld: warning multiple definitions of symbol _CalSkeleton_CalculateBoundingBoxes cal3d_wrapper.o definition of _CalSkeleton_CalculateBoundingBoxes in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalSkeleton_CalculateBoundingBoxes /usr/bin/ld: warning multiple definitions of symbol _CalSkeleton_GetBoneBoundingBox cal3d_wrapper.o definition of _CalSkeleton_GetBoneBoundingBox in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalSkeleton_GetBoneBoundingBox cal3d 0.11, latest CVS patch to remove warnings: http://www.superfloh.dyndns.org/ELwiki/index.php/Cal3d Edited October 3, 2007 by Florian Share this post Link to post Share on other sites
Learner Report post Posted October 4, 2007 Linker warnings: /usr/bin/ld: warning multiple definitions of symbol _CalCoreAnimation_Scale cal3d_wrapper.o definition of _CalCoreAnimation_Scale in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalCoreAnimation_Scale /usr/bin/ld: warning multiple definitions of symbol _CalCoreMesh_Scale cal3d_wrapper.o definition of _CalCoreMesh_Scale in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalCoreMesh_Scale /usr/bin/ld: warning multiple definitions of symbol _CalCoreSkeleton_Scale cal3d_wrapper.o definition of _CalCoreSkeleton_Scale in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalCoreSkeleton_Scale /usr/bin/ld: warning multiple definitions of symbol _CalMixer_RemoveAction cal3d_wrapper.o definition of _CalMixer_RemoveAction in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalMixer_RemoveAction /usr/bin/ld: warning multiple definitions of symbol _CalSkeleton_CalculateBoundingBoxes cal3d_wrapper.o definition of _CalSkeleton_CalculateBoundingBoxes in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalSkeleton_CalculateBoundingBoxes /usr/bin/ld: warning multiple definitions of symbol _CalSkeleton_GetBoneBoundingBox cal3d_wrapper.o definition of _CalSkeleton_GetBoneBoundingBox in section (__TEXT,__text) /Library/Frameworks/cal3d.framework/cal3d(single module) definition of _CalSkeleton_GetBoneBoundingBox cal3d 0.11, latest CVS patch to remove warnings: http://www.superfloh.dyndns.org/ELwiki/index.php/Cal3d Since not everyone is running the same version of Cal3D yet, the extra functions should be #ifdef'd out, not deleted. Share this post Link to post Share on other sites
0ctane Report post Posted October 4, 2007 Linker warnings: ... cal3d 0.11, latest CVS patch to remove warnings: http://www.superfloh.dyndns.org/ELwiki/index.php/Cal3d Florian, Are you using my framework? I have it built against the stable 0.11.0 release. I noticed problems with the SVN, but 0.11.0 seems happy. I agree with Learner. Maybe we need (eek) a CAL3D_SVN define. Share this post Link to post Share on other sites
Grum Report post Posted October 4, 2007 (edited) I agree with Learner. Maybe we need (eek) a CAL3D_SVN define. And of course there's no easy way to detect the installed library version in C code, since it's only exported in a C++ header file. Which means we can't do this automatically, so we'd have to add a yet another define in the makefiles. I was just trying to get rid of a few of them... EDIT: and anyway, the version nr is not #defined, so we can't use it for conditional compilation anyway Edited October 4, 2007 by Grum Share this post Link to post Share on other sites
Sayre Report post Posted October 4, 2007 Not entirely certain where to put this, but it is a current CVS issue so... I am compiling with the new sound and effects etc. I can't uncheck the enable sound effects checkbox, hence the sound effects are always active. bug or feature? S. Share this post Link to post Share on other sites
Torg Report post Posted October 4, 2007 Not entirely certain where to put this, but it is a current CVS issue so...Heh. That's 2. Now I am kinda worried.Aisy chose the NEW_SOUND thread. Probably the best place because it isn't default yet. I am compiling with the new sound and effects etc. I can't uncheck the enable sound effects checkbox, hence the sound effects are always active.When did you update CVS?? I fixed the init code last night (or at least I thought I did). bug or feature? Hehehe, bug. Sometimes you do need to turn off the sounds. Share this post Link to post Share on other sites
Aislinn Report post Posted October 4, 2007 Not entirely certain where to put this, but it is a current CVS issue so...Heh. That's 2. Now I am kinda worried.Aisy chose the NEW_SOUND thread. Probably the best place because it isn't default yet. I am compiling with the new sound and effects etc. I can't uncheck the enable sound effects checkbox, hence the sound effects are always active.When did you update CVS?? I fixed the init code last night (or at least I thought I did). I did a fresh cvs a few minutes ago and my dims sound button was fixed. (I edited my post in the other thread, not sure if you saw that). Share this post Link to post Share on other sites
Florian Report post Posted October 4, 2007 Are you using my framework? I have it built against the stable 0.11.0 release. I noticed problems with the SVN, but 0.11.0 seems happy. Yes, definitely your Debug-Build of cal3d 0.11: #0 0x04809e53 in CalAnimation::getCoreAnimation (this=0x0) at /Users/jeff/Desktop/cal3d-0.11.0/macosx/../src/cal3d/animation.cpp:51 No locals. #1 0x0482c4c0 in CalMixer::updateSkeleton (this=0x1a6ae190) at /Users/jeff/Desktop/cal3d-0.11.0/macosx/../src/cal3d/mixer.cpp:463 pCoreAnimation = (CalCoreAnimation *) 0x17930fa0 listCoreTrack = (list<CalCoreTrack*,std::allocator<CalCoreTrack*> > &) @0x17930fb8: { <_List_base<CalCoreTrack*,std::allocator<CalCoreTrack*> >> = { _M_impl = { <allocator<std::_List_node<CalCoreTrack*> >> = { <new_allocator<std::_List_node<CalCoreTrack*> >> = {<No data fields>}, <No data fields>}, members of _List_base<CalCoreTrack*,std::allocator<CalCoreTrack*> >::_List_impl: _M_node = { _M_next = 0x17930ee0, _M_prev = 0x179345f0 } } }, <No data fields>} iteratorCoreTrack = { _M_node = 0x17930fb8 } pSkeleton = (CalSkeleton *) 0x19769e70 vectorBone = (vector<CalBone*,std::allocator<CalBone*> > &) @0x19769e74: { <_Vector_base<CalBone*,std::allocator<CalBone*> >> = { _M_impl = { <allocator<CalBone*>> = { <new_allocator<CalBone*>> = {<No data fields>}, <No data fields>}, members of _Vector_base<CalBone*,std::allocator<CalBone*> >::_Vector_impl: _M_start = 0x1a6ae3d0, _M_finish = 0x1a6ae45c, _M_end_of_storage = 0x1a6ae45c } }, <No data fields>} iteratorAnimationAction = { _M_node = 0x1a6ae1ac } iteratorAnimationCycle = { _M_node = 0x348 } ... Share this post Link to post Share on other sites