My GLBasic Game crashes on my laptop die to play music when not in debug mode

Previous topic - Next topic

nabz32

Hi, I  recently compiled my game on a new laptop and the game crashes after compile
and won´t close unless I kill it using the task manager.

Tried to run it in debug mode and it crashes if no break points are set,
however if I set some breakpoints during the initialisation process the game starts up correctly,
however I get a random c0000005 crash somewhere during gameplay all the time.

I used a lenovo think pad T430 with an intel HD 4000 graphic chip for testing.
Could this be hardware related?

Kitty Hello

Try to narrow down the bug and post code, please.

Gesendet von meinem GT-N7100


dreamerman

hm.. I have laptop with Intel HD (2500) + Win 8.1, all 2d projects (PolyVector, sprites, UseScreen), and small 3d test are working properly without problems.
Also Your Zombie Manor is working ok here, or it's some other project?
Are you using any c++ inline for extra OpenGL stuff or basic GLB functions, what OS version, any anti-virus software that could block app? (popup about that should be visible but you know how it is)
Check my source code editor for GLBasic - link Update: 20.04.2020

nabz32

Yes i have some inline code for light attenuation in my code:

Code (glbasic) Select
INLINE
    }; //namespace zumachen
        // Funktion definieren
    extern "C"{
    void __stdcall glLightf(int, int, float);
    void __stdcall glEnable( int );
    void __stdcall glDisable( int );
    }

        // Globale Konstanten
        #define GL_LIGHTING 0xB50
    #define GL_LIGHT0 0x4000
    #define GL_CONSTANT_ATTENUATION 0x1207
    #define GL_LINEAR_ATTENUATION 0x1208
    #define GL_QUADRATIC_ATTENUATION 0x1209
        // Namespace aufmachen
    namespace __GLBASIC__ {

ENDINLINE

FUNCTION glLightAttenuation: iLight%, konstant# , linear#, quadratic#
INLINE
    glLightf(GL_LIGHT0+iLight , GL_CONSTANT_ATTENUATION,  konstant );
    glLightf(GL_LIGHT0+iLight , GL_LINEAR_ATTENUATION, linear);
    glLightf(GL_LIGHT0+iLight , GL_QUADRATIC_ATTENUATION, quadratic);
ENDINLINE
ENDFUNCTION

FUNCTION switchAllLights: on%
INLINE
    if( on == true ) glEnable(GL_LIGHTING) ;
    else glDisable(GL_LIGHTING);
ENDINLINE
ENDFUNCTION


The memory usage of my project is roughly only at 64 mB when using low resolution textures.
I still have the preinstalled lenovo modified win7 on my laptop.
I´ll turn off all the special lenovo software and try it again.

nabz32

#4
The project runs without problems in debug mode,
but when I compile it in normal mode there is only a black screen with nothing happening ( esc key won´t work for quitting anymore ).

After commenting out some lines, i found the reason for this behaviour is the PLAYMUSIC command.
In debug mode the music plays, but in normal compile mode the application hangs when calling PLAYMUSIC.
This is only happening when using my Lenovo Laptop. Very strange.
Are there some differences in how GLBasic will handle the PLAYMUSIC command when in debug mode compared to normal compile mode?

Edit: I used the playmusic command with mp3 files in this case.   

erico

I found better to use ogg music for pc, would that fix your problems?

spacefractal

im allways use mp3 here without issue, so its a qutie odd issue. have you tried to use full path?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

nabz32

I use Full path, the Problem does not exist when i am on my Main pc.
When in debug mode the music play fine, maybe my ram on this laptop is faulty.
I will try it with ogg again.