Forcing it to directly use OpenGL instead of trying to use the default
device seems to have resolved the crash:
For those interested, change the code above as follows:
void ChVisualSystemIrrlicht::Initialize() {
if (m_device)
return;
// Create Irrlicht device using current parameter values.
m_device_params.DriverType = irr::video::EDT_OPENGL;
m_device = irr::createDeviceEx(m_device_params);
if (!m_device) {
std::cerr << "Failed to create the video driver - giving up" << std::endl;
return;
}
On Thursday, January 12, 2023 at 11:10:38 PM UTC+9 Henkie wrote:
> Hi all,
>
> I've been struggling to run reliably with Irrlicht and OpenGL on a Mac M1,
> does anyone face a similar issue? Sometimes it launches fine, but often I
> get a segfault or bus error in the following part:
>
> m_device_params.DriverType = irr::video::EDT_OPENGL;
> m_device = irr::createDeviceEx(m_device_params);
>
> In ChVisualSystemIrrlicht.cpp
>
> """
> void ChVisualSystemIrrlicht::Initialize() {
> if (m_device)
> return;
>
> // Create Irrlicht device using current parameter values.
> m_device = irr::createDeviceEx(m_device_params);
> if (!m_device) {
> std::cerr << "Cannot use default video driver - fall back to OpenGL" <<
> std::endl;
> m_device_params.DriverType = irr::video::EDT_OPENGL;
>
> m_device = irr::createDeviceEx(m_device_params);
> if (!m_device) {
> std::cerr << "Failed to create the video driver - giving up" << std::endl;
> return;
> }
> }
> """
>
> Thank you in advance for any suggestions!
>
--
You received this message because you are subscribed to the Google Groups
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/09ae4fef-e383-4aa3-9f52-22481c93b7e6n%40googlegroups.com.