..why o why..what im doing wrong here?..

BlitzMax Forums/MaxGUI Module/..why o why..what im doing wrong here?..

Naughty Alien(Posted 2010) [#1]
..ill keep it short..here is problematic piece of code..

before main loop
    Create_Omni_Light_Window = CreateWindow("Create Omni Light", 0, 0, 400, 170, Null, WINDOW_TITLEBAR | WINDOW_CENTER | WINDOW_HIDDEN)
    Create_Omni_Light_Panel = CreatePanel(5, 5, 145, 105, Create_Omni_Light_Window, PANEL_GROUP, "Light Color")
	
	'color pick area
	Omni_Light_Color_Panel = CreatePanel(5, 5, 75, 75, Create_Omni_Light_Window, PANEL_ACTIVE | PANEL_BORDER, "Color Pick")


update within loop

While PeekEvent()
WaitEvent()
Select EventID()

Case EVENT_WINDOWCLOSE
     Select EventSource()
            Case Create_Omni_Light_Window HideGadget(Create_Omni_Light_Window)
     End select

Case EVENT_MENUACTION
     Select EventSource()
            Case MENU_OMNI_LIGHT
                 ShowGadget(Create_Omni_Light_Window)
     End Select

End Select


why this causing EXCEPTION_ACCESS_VIOLATION, if i compile in Release mode, while in debug mode works just fine (Win7)...on win XP, no issues at all..what im doing wrong here?


jsp(Posted 2010) [#2]
Could you compile in threaded mode? It looks like there is maybe a problem with the GC and ShowGadget.
Just to use the other Garbage Collector without using any threads...
Would be interesting if that works.


Naughty Alien(Posted 2010) [#3]
Threaded compilation mode, crashes everything during compilation time so its no no..i did rebuild all modules in threaded mode, but result is same when i try to compile in threaded mode(crashing during compilation)...

EDIT:
Ok..setting garbage collector in to manual mode, seems to fix issue..its all working just fine now... ;)