Skip to content

App goes into exception when exiting. #275

Description

@abdelali221

Bug Report

What's the issue you encountered?

Like the title says, an exception occurs when returning from main or calling exit().
Afaik this issue started when I updated to the latest libogc.

How can the issue be reproduced?

int main() { 
    VIDEO_Init();
	rmode = VIDEO_GetPreferredMode(NULL);
	xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
	console_init(xfb,20,20,rmode->fbWidth-20,rmode->xfbHeight-20,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
	VIDEO_Configure(rmode);
	VIDEO_SetNextFramebuffer(xfb);
	VIDEO_ClearFrameBuffer(rmode, xfb, COLOR_BLACK);
	VIDEO_SetBlack(false);
	VIDEO_Flush();

	VIDEO_WaitVSync();
	if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
    
    PAD_Init();
    WPAD_Init();
    
    printf("Test");
    
    while (1)
    {
        WPAD_ScanPads();

        if(WPAD_ButtonsDown(0)) break;
    }

    return 0; // Crashes here
}


Environment?

  • What host OS are you using?
    Archlinux (not a flex).
  • Official release or unofficial/self-compiled build:
    Self-compiled build (do note that the code was untouched).

Additional context?

  • Additional info about your environment:
    My build environment has nothing special.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions