New user-Tiled 1.2.3 Crashes at Startup

#1

I installed the Win64 version of Tiled 1.2.3 and haven’t been able to get it running properly. When launched from the icon it shows the dialog for enabling auto-updates, then an empty frame shows up and the application immediately crashes. By setting my path to only include the directory where I installed Tiled I was able to launch it from the command line and this mostly works but still gives me the following error:

Error: Cannot load library D:\dev\tiled\plugins\tiled\python.dll: The specified module could not be
found.

I have never installed tiled before and I have confirmed that the dll does exist at the specified location. I do have a full conda python 3.7 installation (which also includes the qt/pyqt dll’s so this may be part of the problem but it doesn’t explain why the python.dll couldn’t be found after modifying the path.

(Thorbjørn Lindeijer) #2

Hey @Rakhir, welcome to the Tiled forums!

Is the error that happens while loading the Python plugin preventing Tiled from starting? Because that shouldn’t happen. If Tiled start up fine then you can ignore this error, at least if you don’t need the Python plugin. The error message is a little confusing: it means it couldn’t find some module that the python.dll depends on.

What does happen, and what of course shouldn’t happen either, is that the Python plugin can apparently crash on load when certain incompatible Python versions are in the path. I’m not sure how this can be solved. At the very least I should probably disable the Python plugin by default.

#3

Bjørn, thanks for the incredibly fast reply! I created a simple batch file to run it from the command line with a (local) path that removes just the anaconda/python directories and everything seems to work other than finding the plugin dll, so the problem is clearly related to python or the qt* dll’s. I see that Tiled creates a .dmp file in ~\appdata\local\CrashDumps so I can take a look at them if you think it will help.

update: removing python.dll does appear to fix the problem. Maybe an explicit call to SetDLLDirectory() is needed?

1 Like
(Thorbjørn Lindeijer) #4

With what argument, and how do you think that will solve the problem?

#5

First, I’m really just guessing here based on my dated knowledge of Windows systems programming and the symptoms.As for the argument, I would suggest to a user-specified path to a link-compatible python implementation if one exists and skipping the python plugin entirely if no such path is specified. The steps I took were as follows:

  1. It is possible to run Tiled without renaming the python.dll with the following batch file:

setlocal
path=d:\dev\tiled;d:\dev\tiled\plugins;d:\dev\tiled\platforms;d:\dev\tiled\imageformats;
.\tiled.exe
endlocal

  1. Running dumpbin /dependents plugins\tiled\python.dll shows the following dependencies:

Dump of file plugins\tiled\python.dll

File Type: DLL

Image has the following dependencies:

tiled.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll
python3.dll
python37.dll
MSVCP120.dll
MSVCR120.dll
KERNEL32.dll

Given that the tiled.dll, the three Qt5 dll’s and the two MSVC dll’s are in the .\tiled directory and KERNEL32.dll is a windows system dll, I did a “which python3.dll” and a “which python37.dll” from the tiled subdirectory and both resolved to my anaconda python 3.7 / 64-bit installation (no surprises). Forcing a specific path (if one exists) should address the problem.