View Issue Details

IDProjectCategoryView StatusLast Update
0001314Double CommanderPluginspublic2020-06-19 21:52
Reporterjakubklos Assigned ToAlexx2000  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
ProjectionnoneETAnone 
PlatformLinuxOSUbuntuOS Version14.04
Product Version0.7.0 
Target Version0.7.2Fixed in Version0.7.2 
Summary0001314: Plugin including the Interfaces unit crashes DC when unloading the module
DescriptionCreating a wfx plugin with Forms (and the Interfaces unit) crashes when DC unloads the module. This is especially critical when adding a new module and results in not being able to add any such module.

See the crash log

PollThread: Interrupted system call
Dialog executed
TWFXmodule created
WFX module loaded /home/jakub/Downloads/xadb.wfx at 00000000041CA2A0
WFXModule Loaded
WFX Module Unloaded
WFX sPluginName=ADB=/home/jakub/Downloads/xadb.wfx
WFX Item Added
WFX Freed
TApplication.HandleException Access violation
  Stack trace:
  $00007F6105837C00 in
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00007F6105837C00 in
TApplication.HandleException: there was another exception during showing the first exception
  Stack trace:
  $00007F6105837C00 in
Destroying main form
Drive watcher finished
Waiting for workers thread 00000000039E5D98
Finalized workers thread 00000000039E5D98
Waiting for FileSystemWatcher thread
Waiting for workers thread 00000000039E6CB8
Finalized workers thread 00000000039E6CB8
Destroying TFileSystemFileSource when refcount=0
Main form destroyed
Finishing GuiMessageQueue
PollThread: RemovePoll 20
PollThread: Finish polling
Shutting down PixmapManager
Steps To ReproduceVery simple in fact.
Create a new library in Lazaraus:

library test;
uses Interfaces, Forms;
end.

DC correctly reports it is not a WFX module but then crashes. The crash occurs for a real WFX or any SO that uses the Interfaces unit.

I have tried both Qt and gtk2 but it seems not to be related.
TagsNo tags attached.
Fixed in Revision6710,6817
Operating systemLinux
WidgetsetGTK2, QT4
Architecture64-bit

Activities

Alexx2000

2016-03-14 16:55

administrator   ~0001677

I don't sure that it is DC problem. Lazarus has many problems when use LCL in DLL, see http://bugs.freepascal.org/view.php?id=7182 and related bug reports.
For simple GUI in wfx plugin you can use DialogAPI instead. See ftp and samba plugins as examples.

jakubklos

2016-03-15 10:28

reporter   ~0001679

Ok, thank you for explaining. DialogAPI seems to be reasonable. Still I would like to find a workaround. LCL works fine in the plugin, it is just the initial checking. If I add it manually in the doublecmd.xml it all works including the dialogs. Would it be too bold to ask modules not to be unloaded maybe? That would solve it. Any other idea? Thank you again

Alexx2000

2016-03-17 23:16

administrator   ~0001684

I don't see another way. I will do it.

jakubklos

2016-03-18 10:24

reporter   ~0001685

Thank you

Issue History

Date Modified Username Field Change
2016-03-14 13:07 jakubklos New Issue
2016-03-14 16:55 Alexx2000 Note Added: 0001677
2016-03-14 16:55 Alexx2000 Status new => feedback
2016-03-15 10:28 jakubklos Note Added: 0001679
2016-03-15 10:28 jakubklos Status feedback => new
2016-03-17 23:15 Alexx2000 Assigned To => Alexx2000
2016-03-17 23:15 Alexx2000 Status new => assigned
2016-03-17 23:16 Alexx2000 Note Added: 0001684
2016-03-18 10:24 jakubklos Note Added: 0001685
2016-03-19 11:58 Alexx2000 Fixed in Revision => 6710
2016-03-19 11:58 Alexx2000 Status assigned => resolved
2016-03-19 11:58 Alexx2000 Resolution open => fixed
2016-03-27 17:19 Alexx2000 Target Version => 0.7.2
2016-04-29 10:14 Alexx2000 Fixed in Revision 6710 => 6710,6817
2016-04-29 10:14 Alexx2000 Fixed in Version => 0.7.2
2020-06-19 21:52 Alexx2000 Status resolved => closed