Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
41 user(s) are online (24 user(s) are browsing Forums)

Members: 0
Guests: 41

more...

Support us!

Headlines




« 1 (2)


Re: OpenAL-soft for AmigaOS
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7037
@Salas00
Tried with your new libopenall + new libalut which you upload a few days ago: still same crash. But with older libopenall and old or new libalut no crash.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1801
@kas1e

Have you tried disabling the three lines before alutExit?

alcMakeContextCurrent(nullptr);
if (
contextalcDestroyContext(context);
if (
devicealcCloseDevice(device);


These should be unnecessary and may cause problems as alutExit() does more or less the same when called later in the program.

   Report Go to top

Re: OpenAL-soft for AmigaOS
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7037
@Salas00
I back to the issues again (with a crash on exit), and that what I got so far:

If I compile code with the latest openal/freealut, then on exit I have 3 crashes at the same time: 2 crashes at in aluxMixData() and after that crash in __NewlibCall() and one crash in alc_cleanup(). None of which called directly from the game.

If i fully comment out all the code inside of that function:

OpenALAudioSystem::~OpenALAudioSystem() {
    
    
  
// Free sound instances before deleting sound manager, else
  // querying if sounds are streams when deleting instances will fail
  
FreeSoundInstances();

  
SafeDelete(m_SoundManager);

  
alcMakeContextCurrent(nullptr);

  if (
contextalcDestroyContext(context);
  if (
devicealcCloseDevice(device);
  
alutExit();
  
}


Then nothing changes at all. Like all the code called not from the game itself.

Then I tried an older version of openal (some 7-8 years old openal) with also fully commented out that block. And this time i have only one crash, which is come from ReleaseALC->alcDestroyContext->__NewlibCall. All of these calls are also not from the game itself.

The only way how I can get rid of this crash is to use an older version of SDL2 (yeah, strange) + that old version of openal. How SDL2 can have an impact here I don't know because openal/alut didn't use anything from SDL2, but maybe it just causes memory shifts, and so bug somehow autohides.

But then why on exit, when we remove the full part about freeing audio resources from the game's code?

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1335
@kas1e

It is probably relevant information that SDL2 opens (and closes) newlib.library. This is because otherwise I couldn't make libSDL2-2.0.so working when opened via elf.library. For example RebelSDL opens SDL2 this way if I understand correctly.

   Report Go to top

Re: OpenAL-soft for AmigaOS
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7037
@Capehill

Good idea!

As I compile everything statically, I just remove open/close of Newlib in the latest SDL2 and compile it like this. And everything works then with old OpenAL fine again! No crash on exit! Even if I put the game's code about cleaning alut/openal resources back.

What did it mean then? Wasn't the opening of newlib happens in older SDL2? If it something fresh (like from last year's addon), then it can explain something. Maybe OpenAL doing something with newlib too?

@Salas00
Through, even if I remove the opening of newlib from SDL2, it still crashes with new OpenAL on exit, and in console, I have "Al lib: (EE) alc_cleanup: 1 device not closed". But once I remove that block:

Quote:

alcMakeContextCurrent(nullptr);
if (context) alcDestroyContext(context);
if (device) alcCloseDevice(device);


I still have crashes, and in the console have words that 2 devices not closed.

In other words, old OpenAl seems ok there, just to fix the crash I need to remove open/closing of newlib in SDL2. New OpenAl still crashes: with original game code 1 device not closed, with commenting out cleaning of resources from game's code 2 devices no closed and crashes too.


Anyway, currently, I can just use old openal, with removing opening/closing of newlib in SDL2.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: OpenAL-soft for AmigaOS
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1335
@kas1e

SDL2-OT:

I *guess* SDL2 doesn't need to define IExec and INewlib when linked statically since these symbols should be provided by some of the startup files, right?

Dynamic linking I need to check. Things seem to change when migrating to newer compilers and sometimes they cause lots of headache.

So maybe IExec / INewlib can be only defined for libSDL2.so if they are still required (GCC10).


   Report Go to top

Re: OpenAL-soft for AmigaOS
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2959
@Capehill

IExec and IDos is already opened for normal programs, if writing real Amiga libraries you need to open the libs, as then the normal startup code is not called.

When you write SDL program you need to call init_sdl(), it can good place to check if the library was opened before or not. Then you call SQL_Quit(), if SDL needed to open libs, only then should it close the libraries.

.so files are linked when program starts, so it should be no different to .a file.

As programmer I do not wont to worry about what SDL has opened or not.

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top


« 1 (2)



[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project