Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-19 08:15:36



Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next
Cool VL Viewer 1.30.2.4 crashes on startup on Mac. 
Author Message

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
I'm sorry to report that Cool VL Viewer 1.30.2.4 crashes on startup on Mac. It seems to happen just after the viewer finishes loading the world. Logs attached.


Attachments:
CoolVLViewer1.30.2.4-crash.zip [34.84 KiB]
Downloaded 33 times
2023-03-11 13:55:33
Profile

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
This looks like a bug in macOS' OpenGL driver, perhaps triggered by a backported change from viewer PBR, where vertex buffers are not systematically unmapped after creation.

Try inserting a flush() in LLVertexBuffer::allocateBuffer() (from line 1072 in linden/indra/llrender/llvertexbuffer.cpp), like so:
Code:
bool LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices)
{
   if (nverts < 0 || nindices < 0 || nverts > 65536)
   {
      llerrs << "Bad vertex buffer allocation: " << nverts << " : "
            << nindices << llendl;
   }

   bool success = updateNumVerts(nverts);
   success &= updateNumIndices(nindices);

   if (success)
   {
      flush();
   }

   return success;
}

And let me know what happens...


2023-03-11 14:54:07
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
Hopefully fixed in v1.30.2.5.


2023-03-11 18:30:21
Profile WWW

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
I regret to say that Cool VL Viewer 1.30.2.5 crashes on startup for me at about the same point as 1.30.2.4. The logs are attached to this note. Should I apply the patch above to 1.30.2.4 and test that, or is that covered by the fix you applied to 1.30.2.5?


Attachments:
CoolVLViewer1.30.2.5-crash.zip [36.68 KiB]
Downloaded 34 times
2023-03-12 01:33:04
Profile

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
linyifei wrote:
Should I apply the patch above to 1.30.2.4 and test that, or is that covered by the fix you applied to 1.30.2.5?
No, that patch/revert has been applied to v1.30.2.5 already...
I regret to say that I have no clue why macOS driver crash at this point then... :?


2023-03-12 08:20:31
Profile WWW

Joined: 2011-09-17 11:12:19
Posts: 361
Reply with quote
Yea, it's the same for me in 1.30.2.5, was about to do a build on it for here.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 GLEngine 0x7ffa22b02c2d gleRunVertexSubmitImmediate + 3357
1 GLEngine 0x7ffa22a997a1 glDrawRangeElements_ACC_Exec + 1247
2 libGL.dylib 0x7ffa229c0625 glDrawRangeElements + 45
3 Cool VL Viewer 0x102d2f53d LLDrawPoolAlpha::renderAlpha(unsigned int, bool, bool) + 2381 (lldrawpoolalpha.cpp:827)
4 Cool VL Viewer 0x102d2eb5c LLDrawPoolAlpha::forwardRender(bool) + 204 (lldrawpoolalpha.cpp:289)
5 Cool VL Viewer 0x1032ce4f3 LLPipeline::renderGeom(LLCamera&) + 2115 (llpipeline.cpp:5008)
6 Cool VL Viewer 0x1034a0455 display(bool, float, int, bool) + 7269 (llviewerdisplay.cpp:839)
7 Cool VL Viewer 0x102cd164d LLAppViewer::frame(LLEventPump&) + 3213 (llappviewer.cpp:1477)
8 Cool VL Viewer 0x102cd6c33 LLAppViewer::mainLoop() + 563 (llappviewer.cpp:1711)
9 Cool VL Viewer 0x102ca1f4f -[LLAppDelegate oneFrame] + 15 (llappdelegate-objc.mm:132)
10 Foundation 0x7ff80e00c597 __NSFireTimer + 67
11 CoreFoundation 0x7ff80d18b946 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
12 CoreFoundation 0x7ff80d18b4ae __CFRunLoopDoTimer + 820
13 CoreFoundation 0x7ff80d18b0c4 __CFRunLoopDoTimers + 285
14 CoreFoundation 0x7ff80d171a0c __CFRunLoopRun + 2098
15 CoreFoundation 0x7ff80d170b60 CFRunLoopRunSpecific + 560
16 HIToolbox 0x7ff816abe766 RunCurrentEventLoopInMode + 292
17 HIToolbox 0x7ff816abe576 ReceiveNextEventCommon + 679
18 HIToolbox 0x7ff816abe2b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
19 AppKit 0x7ff8102c1293 _DPSNextEvent + 909
20 AppKit 0x7ff8102c0114 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
21 AppKit 0x7ff8102b2757 -[NSApplication run] + 586
22 AppKit 0x7ff810286797 NSApplicationMain + 817
23 Cool VL Viewer 0x102cf4af6 main + 22 (llappviewermacosx.cpp:142)
24 dyld 0x7ff80cd64310 start + 2432


2023-03-12 09:17:07
Profile

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
Well, yes, this is exactly the same bug, the question being "why does it happen at all ?"...

I'm starting to suspect that macOS' shitty OpenGL driver just cannot use vertex buffers everywhere like other OpenGL v2+ drivers; there were still cases where the vertex buffers were disabled (using allocated memory buffers instead) in v1.30.2.3 and older, such as for Linden trees, which use alphas and could be the cause in the alpha pool VBs crash (but then "Animated trees", which do use VBs, should crash as well in v1.30.2.3), or for the deferred VB in the pipeline...
I'm trying to find out what LL did with the PBR viewer to make it render with VBs everywhere: maybe because they now initialize OpenGL into v3 core GL profile on macOS ?...


2023-03-12 10:01:27
Profile WWW

Joined: 2011-09-17 11:12:19
Posts: 361
Reply with quote
I'm afraid I'm not much help with these things. It is infuriating how they just abandon a technology like this. Same reason I'm holding back buying apple silicon. Who knows how long they will keep intel ( and SL ) support.


2023-03-12 11:49:42
Profile

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
Well, let's first see if we can convince macOS to use OpenGL v3.2, and whether it would fix the issue or not.

Please, recompile v1.30.2.5 with linden/indra/llwindow/llopenglview-objc.mm changed to read, from lines 232 to 246:
Code:
   NSOpenGLPixelFormatAttribute attrs[] = {
      NSOpenGLPFANoRecovery,
      NSOpenGLPFADoubleBuffer,
      NSOpenGLPFAClosestPolicy,
      NSOpenGLPFAAccelerated,
      NSOpenGLPFASampleBuffers, static_cast<NSOpenGLPixelFormatAttribute>(samples > 0 ? 1 : 0),
      NSOpenGLPFASamples, static_cast<NSOpenGLPixelFormatAttribute>(samples),
      NSOpenGLPFAStencilSize, 8,
      NSOpenGLPFADepthSize, 24,
      NSOpenGLPFAAlphaSize, 8,
      NSOpenGLPFAColorSize, 24,
      NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
      0
   };
That is, adding the "NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core," line to the existing code.

Then do a first try without core GL profile, and then with core GL profile enabled (check box in "Preferences" -> "Graphics" -> "GPU/GL features": a viewer restart is mandatory after change).


2023-03-12 13:46:06
Profile WWW

Joined: 2011-09-17 11:12:19
Posts: 361
Reply with quote
For some reason I just get a black screen at start up. It doesn't crash, when I try and close the window I can see in the log that the confirmation window appears and if I press enter the window closes, however I can't see a thing. All is just black.

https://ibb.co/ZKB5NzN

That also mean I can't access preferences to try and toggle


Attachments:
CoolVLViewer.log.zip [9.12 KiB]
Downloaded 33 times
2023-03-12 20:49:18
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 29 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 48 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.