nbcloud / fluorescence

Automatically exported from code.google.com/p/fluorescence
GNU General Public License v3.0
0 stars 0 forks source link

Client crash on start, no idea why (debug output included) #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. starting the client

What is the expected output? What do you see instead?
The initial screen, but before that I get only the square of the client, then 
it crashes all of a sudden

What version of the product are you using? On what operating system? 
I'm using fluorescence downloaded via GIT, compiled with debug symbols and 
deployed manually with all the needed libs, in other environments I get the 
initial screen, on the computer I'm writing now I can't seem to initialize 
initial screen.
I'm currently on Windows 7, 32bit machine

Please provide any additional information below.
Visual studio ouputs this information in the debug output:
First-chance exception at 0x0119255d in fluorescence_win32-d.exe: 0xC0000005: 
Access violation reading location 0x0000003c.
Unhandled exception at 0x0119255d in fluorescence_win32-d.exe: 0xC0000005: 
Access violation reading location 0x0000003c.
the code it refers is this:
in Client.cpp
timeval Client::getElapsedTime() const {
    timeval cur;
    gettimeofday(&cur, NULL);

    timeval t;
->    t.tv_sec = cur.tv_sec - startTime_.tv_sec;

    if (cur.tv_usec >= startTime_.tv_usec) {
        t.tv_usec = cur.tv_usec - startTime_.tv_usec;
    } else {
        t.tv_sec -= 1;
        t.tv_usec = (cur.tv_usec + 1000000) - startTime_.tv_usec;
    }

    return t;
}

Please attach your fluorescence.log file.

Original issue reported on code.google.com by fwiff...@gmail.com on 5 Jul 2012 at 7:39

Attachments:

GoogleCodeExporter commented 9 years ago
Do you also get this crash when you compile in Release mode? 
I'm not sure if all settings are correct for the Debug build, never actually 
tried that myself... 

Original comment by spin@fluorescence-client.org on 5 Jul 2012 at 7:41

GoogleCodeExporter commented 9 years ago
Yes, I get this even with release you made in the home, but since I could not 
find the code it refers (in fact in the fluorescence.log I couldn't see 
anything and the debugger only says me of memory addresses).

I have modified the files needed for compilation, of course, because without 
debugging symbols you cannot obtain such a precise spot. Anyway, debug mode or 
release mode doesn't change a thing, It doesn't start in my side. I should try 
with a non win7 environment, but I have to get my hands on a similiar machine 
now :P

Original comment by fwiff...@gmail.com on 5 Jul 2012 at 9:34

GoogleCodeExporter commented 9 years ago
I am a bit clueless here. I tested fluorescence (the downloadable preview 
version) on my Win7 32bit Notebook, and it worked just fine.

I find the location of the crash particularly confusing. Could you please 
verify that it is really crashing exactly there with some log output directly 
before and afterwards?
For example:
LOG_DEBUG << "foo" << std::endl;

Original comment by spin@fluorescence-client.org on 5 Jul 2012 at 5:10

GoogleCodeExporter commented 9 years ago

Original comment by spin@fluorescence-client.org on 5 Jul 2012 at 5:11

GoogleCodeExporter commented 9 years ago
nope, I just can't seem to get a working copy of the client, so the latter is 
my fault, but the bug still remains, even with your last update I just can't 
get the release client to work, maybe is a driver problem, opengl problem or 
directx problem I really don't have a clue. In the debug output I still don't 
have anything valuable to understand what's the matter.

Any help or advice, at this point, would be good.

Original comment by fwiff...@gmail.com on 8 Jul 2012 at 10:33

GoogleCodeExporter commented 9 years ago
Debug output:

0.001000  [INFO ]: Client::main
0.002000  [INFO ]: Updating patcher files...
0.007000  [DEBUG]: Copying patcher update file updater_win32.exe
0.007000  [INFO ]: 1 patcher update files copied
0.007000  [INFO ]: Parsing command line
0.008000  [INFO ]: Initializing ui
3.305000  [ERROR]: Unable to load font, only ttf fonts supported: fonts/.svn
3.305000  [DEBUG]: Registering system font Devinne Swash from path 
fonts/Devinne Swash.ttf
3.306000  [DEBUG]: OpenGL extensions: GL_AMD_performance_monitor 
GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program 
GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object 
GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_map_buffer_range 
GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query 
GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite 
GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow 
GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression 
GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine 
GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float 
GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two 
GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_array_object 
GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader 
GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_envmap_bumpmap 
GL_ATI_fragment_shader GL_ATI_meminfo GL_ATI_separate_stencil 
GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_abgr GL_EXT_bgra 
GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate 
GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array 
GL_EXT_copy_texture GL_EXT_draw_range_elements GL_EXT_fog_coord 
GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample 
GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters 
GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels 
GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color 
GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap 
GL_EXT_subtexture GL_EXT_texgen_reflection GL_EXT_texture3D 
GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map 
GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine 
GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic 
GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object 
GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_swizzle 
GL_EXT_vertex_array GL_KTX_buffer_region GL_NV_blend_square 
GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp 
GL_SGIS_texture_lod GL_WIN_swap_hint WGL_EXT_swap_control
3.307000  [DEBUG]: Parsing xml gump file: gumps/shardselection.xml

Original comment by fwiff...@gmail.com on 8 Jul 2012 at 10:33

GoogleCodeExporter commented 9 years ago
I assume you did not change anything in the gumps folder, right?

The problem seems to occur while fluorescence tries to create the shard 
selection gump. It is able to collect the directories in your shards folder, 
but the actual creation of the gump seems to go wrong.
I think a driver or OpenGL problem is unlikely, due to the last output message. 
Before the main loop tries to draw the window there should be an output
[INFO ]: Selecting shard through user interface
And it can detect your OpenGL extensions just fine, although it takes unusually 
long to initialize the user interface. But there seems to be no error there.

Do you have non-ASCII characters in your fluorescence path? They _should_ be 
handled correctly, but you can never be sure with file systems.
What file system type is your fluorescence folder on? NTFS, or maybe a 
"non-normal" partition, e.g. an ext shared with Linux or something like that?

I have a few ideas what you could try:

You can try to create a folder (name does not matter) in your shards directory. 
Then, create a file config.xml in that new folder and put the following text 
there:

<?xml version="1.0"?>
<fluo>
    <files>
        <mul-directory path="full path to your Ultima Online directory" />
    </files>
</fluo>

Fill in the path, and then start fluorescence with the name of the newly 
created shard as a parameter. So if you created the folder shards/barfoo, start 
fluorescence as "fluorescence_win32.exe barfoo". 

This jumps over the shard selection window. If the client starts like this, the 
problem is only the shard selection gump. If that does not help, something else 
is wrong. 

Another option is to watch the gump creation process more closely. The error 
must occur in src/fluorescence/ui/xmlparser.cpp, somewhere after line 119 
(which is the last debug message you get).
Maybe the XML parser can't handle some specific thing on your platform. You can 
try to single step the XML parser code, and see if it does something unusual. 
Alternatively, you can also just insert a few LOG statements, e.g. after lines 
122 and 125.

If you don't get anything from that, try to "reduce" the shard selection gump 
by throwing out some elements just for testing. Just to see if a special UI 
component is a problem. Just edit gumps/shardselection.xml, and try to comment 
out everything except for a single element, e.g. the tbackground. 

Original comment by spin@fluorescence-client.org on 9 Jul 2012 at 8:13

GoogleCodeExporter commented 9 years ago
ok, with "shardselection.xml" all commented out it does not start also, but 
here are some of the questions you made answered, just to clarify:

q- I assume you did not change anything in the gumps folder, right?
a- I did not change anything, it's a fresh install, no mods at all

q- Do you have non-ASCII characters in your fluorescence path?
a- the path is "D:\DEVEL per UOI\fluorescence" and does not contains any 
unusual chars

q- What file system type is your fluorescence folder on?
a- Pure NTFS

q- starting with config.xml and fluorescence.exe nameoffolderwithconfig.xml
a- With the config.xml and the client forced to start that way I get far, but 
the client does not start, in my first case is because in my shard we don't use 
map3 etc, so I have to better understand anything and disable that map loading, 
to just test it I tried with both a HS fresh install and I don't get even there 
really far, I tried even with a 5.x install, nope, It does not start, logfiles 
included with infos, anyway.

with the latter method to reduce shardselection, even if I haven't created any, 
I don't get far, it just takes less time before throwing the exception.

Later I will try to recompile in release mod with debug writing on logfile, I 
think it would be better and at least it will work this way :P

Original comment by fwiff...@gmail.com on 9 Jul 2012 at 7:37

Attachments:

GoogleCodeExporter commented 9 years ago
Check out http://code.google.com/p/fluorescence/source/browse/defaultConfig.xml 
to see all supported config values. Disabling maps is e.g.
<map3 enabled="0"> in the fluo/files section

I find some of the timing behavior on your system really strange. For example, 
in the 7.0.23 log file it takes approx 1 second to load the cliloc file. This 
should only take a fraction of that time. 
Maybe you can try to disable your virus scanner. I remember some other games 
having trouble with security software. 

Other than that, I'm sorry to say that I'm really clueless here. Maybe there is 
some memory error that has different effects on different systems, but so far, 
I have not heard of anyone having the same issues. 
The only things I can think of is to try and single step through the critical 
parts, or to surgically remove some parts to find the error. But as the problem 
occurs only on your PC, I can't really offer you more help than some advice 
here. Sorry!

Original comment by spin@fluorescence-client.org on 10 Jul 2012 at 6:51

GoogleCodeExporter commented 9 years ago
then I guess it can be closed, maybe is my development environment that is a 
bit messed up, I used delphi, c#, now c++ compilers and maybe some libraries 
got changed on the way (maybe even the xml one), even if I wonder, since it CAN 
happen on the way, why don't just compile/run statically linked?

Ah, for your question, I don't have an antivirus software, and on various 
computers, I got only one running the fluorescence client (one lacks opengl 
2.0, one lacks rendering graphic card, this one I reported).

I guess that for using the client you have to use recent hw.

Original comment by fwiff...@gmail.com on 11 Jul 2012 at 5:52

GoogleCodeExporter commented 9 years ago
Fixed. 
The bug was caused by some fuck-up in the config initialization, trying to 
write a log message before the client singleton was fully initialized, thus 
failing to fetch the elapsed time.

Note to self: Don't do extensive stuff in the ctor... 

Original comment by spin@fluorescence-client.org on 16 Aug 2012 at 11:19