CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 24, 2018, 01:08:55 am


Login with username, password and session length


Pages: [1] 2
  Print  
Author Topic: Failed to make context ...... current. Error 2004.  (Read 3440 times)
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« on: January 28, 2017, 06:53:04 am »

I'm trying CamBam v1.0r12 after using v0.9.8P for over one year.  When rotating the view CamBam will sometimes crash with a "Failed to make context [some large number here].  Error 2004."  This has occurred in both v0.9.8P and v1.0r12, and it seems to have no relation to the file/design that I'm working on.  However, in the interest of forum etiquette  Grin I have attached a sample .cb file which I have been working on when the crash occurred.  (The file uses the RelocateMOP plugin as a hack "backlash management" feature, but the CamBam crashes were occurring prior to installing that plugin.)

I'm running CamBam in Win7Enterprise 64-bit, within a VM with VirtualBox/OSX host.  It has crashed both prior to and after the 4G/64-bit patch.  I have 3D and 2D acceleration enabled in the VM settings.  CamBam DisplayMode is set to OpenGL.

I have a longer copy of the details in the crash log from v0.9.8P days if that is useful.  When the issue occurs again in v1.0r12 I can grab a copy of the full details if that is helpful to anyone.

I've probably been putting up with this issue for too long, but I figured it was time I mentioned it since v1.0 dev is clearly active.

Annuello.

* NEMA24.cb (18.29 KB - downloaded 38 times.)

* Error dialog.png (69.15 KB, 882x630 - viewed 82 times.)
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3290



View Profile
« Reply #1 on: January 28, 2017, 11:45:08 am »

I've been reading this thread that talks about a similar error. https://github.com/MonoGame/MonoGame/issues/3196
But then I saw in your attached picture, OpenTK_330, and wondered if this related to the item, 'GLSL Shader Version' in CamBam Tools->Option (Advanced) where one option is GLSL_330
So just in case it is related you could try setting 'GLSL Shader Version' to the other option that is, GLSL_110.

I can't reproduce that fault on Windows7 64bit

Also read this from Andy; http://www.cambam.co.uk/forum/index.php?topic=6338.msg50453#msg50453
I know it's Linux but there may be a connection.

« Last Edit: January 28, 2017, 11:49:01 am by EddyCurrent » Logged
pixelmaker
CNC Jedi
*****
Offline Offline

Posts: 1590


View Profile WWW
« Reply #2 on: January 28, 2017, 14:51:02 pm »

I work with CamBam since years in a virtual machine (Prallels Desktop) with win7 64bit (and the 4gb patch)
The VM emulates a grafic card. I use in the config the OpenGL and GLSL110.
GLSL330 donīt work!
My VM has 8 Gb (virtual) RAM.

Also good for performance of CB is to set the Worker-Threads to the number of cores your mac has. For my mac with 2x3Ghz Quad Core I set the Worker-Threads to 8.
I canīt remember that I had a crash with CB, only from plugins.
Since I work with the 4gb patch I donīt get CB to any error also not the buffer overflow.


ralf
« Last Edit: January 28, 2017, 14:54:25 pm by pixelmaker » Logged
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« Reply #3 on: January 29, 2017, 03:48:00 am »

It sounds like there are a few multithread quirks inside OpenGL, according to that MonoGame thread.

I'm allegedly using OpenGL with GLSL Shader Version GLSL_100.  Yes, it seems odd that the error message refers to OpenTK 330.  Just as a test I set CamBam to GLSL_300, saved the settings and restarted.  I get an Unhandled Exception error immediately after startup: "The given key was not present in the dictionary."  Okay, straight back to GLSL_100 then with another relaunch of CamBam.  I do wonder what version is actually being used though, given that v300 errors are appearing...

My setup is a Laptop - 2 core i5 2.6GHz 8Gb, with one core and 4Gb allowed for the VM.  My worker threads in CamBam are set to 2.  I suppose it is not an ideal arrangement, but it is what it is.  I'm not sure whether I'm better off reducing the worker threads to 1 to match the core count in the VM, or leave it as-is at 2 threads.

I'm happy to either switch over to GDI to hopefully avoid the crash, or to continue on OpenGL/GLSL_100 with the intent to capture a full thread trace when the next crash occurs.  If people think that the full thread trace would be of some use please say so and I'll add it to this thread when it next occurs.

Annuello.
Logged
jk
Storm Trooper
***
Offline Offline

Posts: 229


View Profile
« Reply #4 on: January 30, 2017, 14:26:32 pm »

I discovered CB saves text exception log in his settings folder.
On my windows system for CB 0.9.8 its a c:\Users\All Users\CamBam plus 0.9.8\cbdebug.log

May be it would be useful to get info right now not waiting for the next crash )
Logged
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« Reply #5 on: January 30, 2017, 23:12:50 pm »

I discovered CB saves text exception log in his settings folder.
On my windows system for CB 0.9.8 its a c:\Users\All Users\CamBam plus 0.9.8\cbdebug.log

May be it would be useful to get info right now not waiting for the next crash )

I had a look in the relevant v1.0 log file.  It looked like it only had entires from my previous testing with GLSL330 settings.  I've cleared/flushed those out (for clarity) and I'll have a look at the log next time it happens.  If there is nothing in the log entry I will at least copy the full description from the error dialog.  My line of thinking is that it is best for me to only concentrate on v1.x, since there has been a substantial amount of underlying code change between v0.9 and v1.0.  Watch this space....

Annuello.
Logged
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« Reply #6 on: January 31, 2017, 21:27:02 pm »

I'm still trying to get CamBam to crash again while rotating a design.  No "luck" yet, but it crashed in a new and different way this time.  I'll put the details here rather than spawning numerous forum threads, since the two issues may somehow be related to my environment.
1) Opened my NEMA24.cb file, as per my original post above.
2) Rotated the design around a bit
3) Generated toolpaths (Ctrl+T)
4) Reset the view to XY using the ViewToolbar plugin
5) Measured the distance (Keyboard M) from Circle (ID 11) to left edge.  CB showed the popup dialog with the distance.
6) Pressed ENTER to dismiss the dialog.  CB crashes immediately with an error dialog.

I've copied the dialog error into a text file (attached).  After choosing the Quit option on the dialog I checked C:\Users\All Users\CamBam plus 1.0\cbdebug.log but that was empty.

Annuello.

* CamBam 1.0 measure crash.txt (10.38 KB - downloaded 40 times.)
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3290



View Profile
« Reply #7 on: January 31, 2017, 21:52:52 pm »

Looking at the Measure dialogue box, it shows that pressing OK copies the value to Windows' Clipboard.

This link; http://stackoverflow.com/questions/12769264/openclipboard-failed-when-copy-pasting-data-from-wpf-datagrid
seems to imply it might be a .NET 4.0 issue and the first answer gives a method that Andy might like to try.



* measure.jpg (35.45 KB, 1000x257 - viewed 63 times.)
Logged
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« Reply #8 on: February 01, 2017, 03:02:16 am »

Looking at the Measure dialogue box, it shows that pressing OK copies the value to Windows' Clipboard.

This link; http://stackoverflow.com/questions/12769264/openclipboard-failed-when-copy-pasting-data-from-wpf-datagrid
seems to imply it might be a .NET 4.0 issue and the first answer gives a method that Andy might like to try.

FWIW, I've got the following .NET frameworks installed: 2.0, 3.0, 3.5, 4.0, 4.5.  No wonder my hard disc feels like it is shrinking...

Annuello.
Logged
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« Reply #9 on: February 03, 2017, 22:00:59 pm »

Okay, so the rotate crash occurred again.  I zoomed into the design and as soon as as I held down the Alt key to rotate, the crash occurred.  I'm sure that the zoom was still decelerating at the time, as per mouse wheel "inertia".  (It's actually a MacBook Pro trackpad, but in the VM it maps to mouse wheel, AFAIK.)

I've double checked my CB settings, and it definitely claims to be using OpenGL + GLSL_110.  The C:\Users\All Users\CamBam plus 1.0\cbdebug.log file is empty, so nothing was reported via that logging part.  Attached is the copy-n-paste from the error dialog.

Annuello.

* CamBam 1.0 zoomRotate crash.txt (11.13 KB - downloaded 35 times.)
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4827



View Profile WWW
« Reply #10 on: February 03, 2017, 23:38:03 pm »

Hello

I see in the log file that you are using plugins (other than built in), can you remove them, then test again ?

especially the SelectByObjectType plugin that is written in VB (and compiled for .net 3.5) ... VB plugins cause pb with mono and linux, maybe it can also disturb the VM ?

++
David
Logged
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« Reply #11 on: February 04, 2017, 00:28:58 am »

Hello

I see in the log file that you are using plugins (other than built in), can you remove them, then test again ?

especially the SelectByObjectType plugin that is written in VB (and compiled for .net 3.5) ... VB plugins cause pb with mono and linux, maybe it can also disturb the VM ?

++
David

Shall do.  FWIW I was experiencing the crash-on-rotate before I knew how to install plugins.  However in the interests of bug-zapping I'll see if I can get it to crash with no plugins.  I can't remember which ones are installed as part of the main CB installation, so I've removed all plugins.  If someone can remind me of the default plugins I'll restore them and continue trying to get more examples on this issue.

I'll should mention that the crash does not occur _every_ time I rotate, so it may take me a while to get the bug to reveal itself.  My day-job is programming control systems, so I find bugs that are easily reproducible more favourable that intermittent bugs.

Any thoughts why the error dialog is still referring to OpenTK 330 rather than 110?  That just doesn't sound like a normal situation to me.  Is there a file which the options are written to, which I could take a look in to check for oddities?

Annuello.
Logged
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« Reply #12 on: February 04, 2017, 00:44:38 am »

Well, that didn't take as long as I was expecting.  With the plugins directory completely empty (including default plugins) I still managed to get a crash while rotating the design.  Bug report attached.

Annuello.

* CamBam 1.0 rotate crash - no plugins.txt (7.98 KB - downloaded 39 times.)
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4827



View Profile WWW
« Reply #13 on: February 04, 2017, 02:16:34 am »

Hello,

Maybe another test with OpenGL_legacy instead OpenGL (it's the old way CB works with OpenGL)

++
David
Logged
annuello
CNC Ewok
*
Offline Offline

Posts: 44


View Profile
« Reply #14 on: February 04, 2017, 03:28:56 am »

Hello,

Maybe another test with OpenGL_legacy instead OpenGL (it's the old way CB works with OpenGL)

++
David

Thanks for the suggestion.  I've just tried that and it too crashed. Sad  I did a video screen capture of my VM this time, in case anyone can see anything out of the ordinary.  https://youtu.be/nP99Rx-H1co  I haven't been doing screen captures in the past (this is my first attempt at capturing VM video), so I'm sure that is not the cause the issue.  For those from the future who are using their time machine to read this, I'll probably delete the video at some point.

Same test process as before other than changing to OpenGL_Legacy, saving the settings, then restarting CB.  Error message attached once again.

Annuello.

Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.269 seconds with 18 queries.

Copyright ÂĐ 2008 HexRay Ltd. | Sitemap