![]() Registered Member ![]()
|
Hi felllow KDE developers,
I'm playing around with Kross and KJSEmbed to make a Scripting frontend for Bangarang(http://bangarangkde.wordpress.com). I'm getting crashes when I trigger() my Kross::Action more than once even though I reinitialize the Kross::Action object each time. As it looks to me this is some sort of a race condition happening below my notice. After triggering it also doesnt finalize correctly. I'm running Debian Squeeze(Testing) at the moment which is at KDE4.3 at the moment. KDE 4.4 is not yet in Debian squeeze. I will report back if needed when 4.4 is in Debian. I simply tried to run this code: println(); But on th console I got a dump of a lot of library symbols and a bugtrace. Both are attached in the bug.txt. How I run the code is in the scriptconsole.cpp and scriptconsole.h attached aswell. Can you tell me if this is a fault of my poor coding skills or something below. And if I did it wrong what is it that I did wrong? Sincerely, xxtjaxx. FILES: The backtrace: http://pastebin.ca/1803972 ScriptConsole.cpp: http://pastebin.ca/1803969 ScriptConsole.h: http://pastebin.ca/1803971
My blog :
http://adreasdevblog.wordpress.com I work with the head developer on this one: http://techbase.kde.org/Projects/Aki My code repository on github: https://github.com/xxtjaxx/xxtjaxxRepository/tree |
![]() Administrator ![]()
|
See http://api.kde.org/4.x-api/kdelibs-apid ... 406ad734c1
It states "The URL should point to a valid scripting file. This Action will be filled with the content of the file (e.g. the file is read and code should return its content and it's also tried to determine the interpreter ). Remember to use QUrl c'tor explicitly. The name will be set to url.path() " In this case you use KUrl, and you pass "", hence when you construct the second one it has the same object name as the previous, and probably causes Kross internals to foul themselves up. You should use the first constructor, generating the name from a random string or something...
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
randomly changing the file name (using QTemporaryFile) doesnt help in anyway. I looked at the output if the filename changes properly and it does. I still crashes the program. Besides that, dont you think that it would make sense to rather fix the underlying problem instead of working around problems we are maybe affraid to address to the people who have actually wrote the underlying things?
My blog :
http://adreasdevblog.wordpress.com I work with the head developer on this one: http://techbase.kde.org/Projects/Aki My code repository on github: https://github.com/xxtjaxx/xxtjaxxRepository/tree |
![]() Registered Member ![]()
|
Clarification: it was KJsEmbed that caused the Problem not Kross::Action itself. So as I heard KJsEmbed is dead and everybody (instead) tries to formalize an own set of ways to make plugins.
Amarok,Ktorrent,Aki are prime examples how parts of applications that seem to ignore previously wrote possibillities but instead try to reinvent the wheel sad as it is.
My blog :
http://adreasdevblog.wordpress.com I work with the head developer on this one: http://techbase.kde.org/Projects/Aki My code repository on github: https://github.com/xxtjaxx/xxtjaxxRepository/tree |
![]() Administrator ![]()
|
Most of those applications are using QtScript which is the Qt scripting engine, powered by the WebKit javascript engine.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]