114 Commits

Author SHA1 Message Date
Ghostkeeper
bbb704ff24
Remove working directory from sys.path
This prevents accidentally loading packages from the working directory that are not in Cura's build.

Contributes to issue CURA-7081.
2020-02-26 17:02:40 +01:00
Ghostkeeper
d84bc5c682
Also check if streams are not closed
SmartAvionics found that this was a safer way to be able to write to these streams.

See comments on commit 2eab2c0f3dbe3153cc704ca9e396cd78b0ebbf9d.
2020-02-26 13:48:27 +01:00
Ghostkeeper
a1438e91d0
Merge branch '4.5'
Conflicts:
	cura_app.py -> Due to moving some imports around.
2020-02-25 12:07:47 +01:00
Jaime van Kessel
1b65e47bea
Move imports of Arcus & Savitar up
This was needed due to the crashhandler being imported

CURA-7245
2020-02-24 17:08:19 +01:00
Jaime van Kessel
9c0e6f9338
Apply suggestions from code review
Codestyle!
2020-02-24 16:57:37 +01:00
Nino van Hooff
62dfadecdf Prune all sensitive data before sending it to Sentry
CURA-7245
2020-02-24 15:27:17 +01:00
Ghostkeeper
2eab2c0f3d
Merge branch 'master' of https://github.com/zxc8027/Cura into zxc8027-master 2020-02-18 11:13:30 +01:00
Jaime van Kessel
238dd733ea
Merge branch '4.5' of github.com:Ultimaker/Cura 2020-02-17 17:01:38 +01:00
Zachary Cook
1b72577f88
Added check for stdout being defined. 2020-02-14 13:02:56 -05:00
Jaime van Kessel
70f22d04e4
Fix setting the environment for Sentry 2020-02-11 11:51:33 +01:00
Lipu Fei
b03f666bf5 WIP: Make it work with Python 3.7 packaing 2020-02-07 23:14:47 +01:00
Jaime van Kessel
c97ce6fafb
Make the sentry_env a bit smarter 2020-01-24 14:12:03 +01:00
Thomas Karl Pietrowski
ba5a0b0085 SentrySDK: Turn on deep integration on demand
Only whenever the sentry_sdk module is there functions of this module will be used.
The only changes, which were needed to be made, are done on cura_app.py and cura.CrashHandler.
Whenever the module is not available, it's functions will be omitted.

The if-clauses could happen earlier, but this at least the bare minimum, and, to be honest, on Ultimaker's distribution it won't speed up anything.
I expect the if-clause to take the same amount of runtime sooner or later. The check is the same and it should be on Ultimaker's distribution always be "True".

Signed-off-by: Thomas Karl Pietrowski <thopiekar@gmail.com> (github: thopiekar)
2020-01-02 22:22:44 +01:00
Jaime van Kessel
0295113b31
Add user (identified by MAC) & ensure that no personal info is in server_name 2019-12-19 11:23:39 +01:00
Nino van Hooff
8dc6e7a386 Add encvironment variable to Sentry crash logging
CURA-7050
2019-12-19 09:45:35 +01:00
Jaime van Kessel
028a60318c
Add extra tag if crash was during startup or not 2019-11-22 15:43:45 +01:00
Jaime van Kessel
23057f786f
Add initial stubs for sentry logging 2019-11-22 12:59:05 +01:00
Ghostkeeper
0168a1d5e0
Don't output to stderr if there is no stderr
This can happen on Windows where the default command line doesn't have a stderr channel. Put it in stdout then.

Fixes #6579.
2019-10-25 14:12:55 +02:00
Lipu Fei
1e1ae95c60 Only use DYLD_FALLBACK_LIBRARY_PATH once for trimesh.load
CURA-6739
2019-09-04 19:22:02 +02:00
Lipu Fei
b309680fb7 Fix CTM loading on Linux
CURA-6739

Note that this doesn't work with Python 3.5.7, but with 3.6 and 3.7. To
make Python 3.5.7 work, a fix needs to be backported from 3.6 for
ctypes.util.find_library() for Linux.
2019-09-04 19:20:59 +02:00
Lipu Fei
f2ef363c01 Fix GLTF workaround for OSX
CURA-6739
2019-09-04 16:39:06 +02:00
Lipu Fei
7e97bc4e17 Add workaround for GLTF loading on OSX
CURA-6739
2019-09-04 16:23:57 +02:00
Lipu Fei
4762711c33 chdir to ~ on Linux if frozen 2019-08-20 11:18:54 +02:00
Lipu Fei
d0f1b74bd7 Fix mistake in CLI check
CURA-6549
2019-06-06 12:16:54 +02:00
Lipu Fei
280ddea1ae Do not redirect stdout and stderr for CLI
CURA-6549
2019-06-06 11:43:14 +02:00
Ghostkeeper
a4924d2695
Fix for weird home directories on Windows
The expanduser function will expand to a combination of HOMEDRIVE and HOMEPATH which might not be the same as APPDATA if your configuration is very weird (e.g. you've changed your APPDATA location).

Contributes to CURA-6418.
2019-03-26 12:04:46 +01:00
fieldOfView
9d02086585 Get app name from ApplicationMetaData 2019-01-18 12:22:07 +01:00
fieldOfView
056655e584 Merge branch 'master' into feature_curaversion_appname
# Conflicts:
#	cura/CuraApplication.py
2019-01-18 12:12:36 +01:00
Aleksei S
84c85439ff The trigger_early_crash did not trigger early crash for testing purposes
CURA-5939
2018-12-06 12:00:26 +01:00
fieldOfView
e66875865f Make Cura app name configurable in CuraVersion 2018-11-13 16:08:29 +01:00
Ghostkeeper
e509078943
Fix bug with libSavitar not loading due to SIP
The same crash as libArcus actually.
2018-07-26 20:12:42 +02:00
Ghostkeeper
afd3ce205a
Use double quotes
As per our code style.
2018-07-05 20:19:40 +02:00
Ghostkeeper
2b83af2497
Move initialization into Uranium's run() function
This makes it possible to start a Uranium-based application without needing to know the magic incantation of starting the application.
2018-06-28 21:41:16 +02:00
Ghostkeeper
4b581d09e7
Merge branch '3.4' 2018-06-06 10:59:14 +02:00
Ghostkeeper
e152fd641b
Remove trailing slash in Windows configuration path
It shouldn't matter, but we're getting crash reports from this path so let's try this.
2018-06-06 09:57:44 +02:00
Diego Prado Gesto
42ecb12614 CURA-5164 Fix typo in the method signature 2018-05-08 11:16:00 +02:00
Lipu Fei
051dd7a6e9 WIP: Make application initialization and start up more clear
- Create SingleInstance class to handling single instance stuff.
 - Instead of calling getInstance() everywhere, initialize each object
   explicitly in order when application starts and getInstance()s do not
   create instances any more and they merely return the created
   instances.
 - Only set initial values in construtor functions __init__(). Move the
   initialization of context-aware (i.e. things that depend on other
   things) to separate functions.
 - Split application creation and initialziation into several steps and
   them should be called explicitly in the correct order.
2018-05-04 09:57:02 +02:00
Lipu Fei
f836cdf3f4 Fix indent
CURA-5289
2018-05-02 10:18:52 +02:00
Jörg Walter
7f5fb5813b make Linux+NVidia fix fail gracefully 2018-03-29 21:06:49 +02:00
Diego Prado Gesto
a85a720184 CURA-4895 Close the splash screen when the early crash dialog appears. Increase the size of 'show detailed crash report button' 2018-02-05 17:17:46 +01:00
Ian Paschal
e64fb9c762 Splash closed on early crash 2018-02-05 14:47:11 +01:00
Lipu Fei
b59eadce1c Fix AutoSave crashing the early crash dialog
CURA-4895
2018-02-05 11:28:16 +01:00
Lipu Fei
30b1e74881 Fixes for early crash dialog
CURA-4895
2018-02-05 11:26:38 +01:00
Lipu Fei
aefe24222f Add a CLI flag to test early crash
CURA-4895
2018-02-05 11:26:38 +01:00
Lipu Fei
6bbc18d51e Make an extra early crash dialog
CURA-4895

An early crash dialog showing options to backup the current user data
and reset the configuration files.
2018-02-05 11:26:37 +01:00
Lipu Fei
1d946085d3 Make crash dialog available before Application starts
CURA-4895
2018-02-05 11:26:34 +01:00
Lipu Fei
7dfc1a4aa7 Add encoding='utf-8' for text file reading
CURA-4875

When encoding is not provided, the behaviour is system dependent and it
can break on OS X.
2018-01-29 12:29:20 +01:00
Anton Midyukov
3708c37b60 Activation workaround Linux+NVidia proprietary drivers for all distributions 2018-01-07 17:33:27 +07:00
Thomas Karl Pietrowski
b4aed1da22 Simplify getting known args 2017-12-09 22:27:15 +01:00
Thomas Karl Pietrowski
bcc31fb19b Tell early parser not to add help 2017-12-09 22:26:52 +01:00